Go to file
Wolfgang Walther 3c21a5c9d6
lib/systems: elaborate properly with non-matching system / config / parsed args
When elaborating a system with both "config" and "system" arguments
given, they might not match the parsed results.  Example:

elaborate {
  config = "i686-unknown-linux-gnu";
  system = "x86_64-linux";
}

This would result in a parsed system for i686, because the config
argument is preferred.  But since "// args //" comes after system has
been inferred from parsed, it is overwritten again.  This results in
config and parsed all pointing to i686, while system still tells the
story of x86_64.

Inconsistent arguments can also be given when passing "parsed" directly.
This happened in stage.nix for the various package sets.

The solution is simple: One of the three arguments needs to be treated
as the ultimate source of truth.  "system" can already be losslessly
extracted from "parsed".  However, "config" currently can not, for
example for various -mingw32 cases.  Thus everything must be derived
from "config".

To do so, "system" and "parsed" arguments are made non-overrideable for
systems.elaborate.  This means, that "system" will be used to parse when
"config" is not given - and "parsed" will be ignored entirely.

The systemToAttrs helper is exposed on lib.systems, because it's useful
to deal with top-level localSystem / crossSystem arguments elsewhere.
2024-11-03 17:38:19 +01:00
.github .github/labeler.yml: add nixos label to switch-to-configuration-ng pull requests 2024-11-01 11:50:13 +01:00
ci OWNERS: Also make @philiptaron an owner of OWNERS 2024-11-01 12:32:37 +01:00
doc doc/languages-frameworks/java: remove reference to oraclejdk 2024-11-02 21:10:32 +00:00
lib lib/systems: elaborate properly with non-matching system / config / parsed args 2024-11-03 17:38:19 +01:00
maintainers deepsource: init at 0.8.6 (#324286) 2024-11-03 11:35:17 +08:00
nixos nixos/renovate: set service type to simple (#334557) 2024-11-03 16:52:53 +01:00
pkgs lib/systems: elaborate properly with non-matching system / config / parsed args 2024-11-03 17:38:19 +01:00
.editorconfig .editorconfig: accept package.json indent as is 2024-07-29 19:24:33 +02:00
.git-blame-ignore-revs .git-blame-ignore-revs: add 'sqlc: format with nixfmt' 2024-10-28 02:27:24 +00:00
.gitattributes .gitattributes: Mark ci/OWNERS as CODEOWNERS 2024-10-10 01:40:43 +02:00
.gitignore Ignore Direnv files 2024-07-23 17:06:34 +07:00
.mailmap mailmap: remap cafkafk 2024-09-23 04:07:26 +02:00
.version
CONTRIBUTING.md CONTRIBUTING.md: extend section on getting your PR merged (#350227) 2024-10-24 14:27:52 +02:00
COPYING
default.nix
flake.nix flake.nix: exclude armv6-linux, riscv64-linux, and FreeBSD from devShells 2024-10-16 08:46:44 -07:00
README.md
shell.nix ci: Add default.nix with exposed pkgs 2024-10-08 22:13:59 +02:00

NixOS logo

Contributors badge Open Collective supporters

Nixpkgs is a collection of over 100,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

Manuals

  • NixOS Manual - how to install, configure, and maintain a purely-functional Linux distribution
  • Nixpkgs Manual - contributing to Nixpkgs and using programming-language-specific Nix expressions
  • Nix Package Manager Manual - how to write Nix expressions (programs), and how to use Nix command line tools

Community

Other Project Repositories

The sources of all official Nix-related projects are in the NixOS organization on GitHub. Here are some of the main ones:

  • Nix - the purely functional package manager
  • NixOps - the tool to remotely deploy NixOS machines
  • nixos-hardware - NixOS profiles to optimize settings for different hardware
  • Nix RFCs - the formal process for making substantial changes to the community
  • NixOS homepage - the NixOS.org website
  • hydra - our continuous integration system
  • NixOS Artwork - NixOS artwork

Continuous Integration and Distribution

Nixpkgs and NixOS are built and tested by our continuous integration system, Hydra.

Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/. When successful build and test criteria are met, the Nixpkgs expressions are distributed via Nix channels.

Contributing

Nixpkgs is among the most active projects on GitHub. While thousands of open issues and pull requests might seem a lot at first, it helps consider it in the context of the scope of the project. Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution. The GitHub Insights page gives a sense of the project activity.

Community contributions are always welcome through GitHub Issues and Pull Requests.

For more information about contributing to the project, please visit the contributing page.

Donations

The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the NixOS Foundation. To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.

You can donate to the NixOS foundation through SEPA bank transfers or by using Open Collective:

License

Nixpkgs is licensed under the MIT License.

Note: MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.