summaryrefslogtreecommitdiff
path: root/pkgs/top-level/stage.nix (follow)
Commit message (Expand)AuthorAgeFilesLines
* treewide: remove references to the xorg namespace in `pkgs` (manual)•••this was done manually, fixing the eval and any remaining stuff of the previous commit together with the previous commit this shouldn't create any rebuilds quantenzitrone2026-01-251-2/+1
* treewide: remove redundant parentheses•••Auto-fixed by nixf-diagnose. Wolfgang Walther2025-10-051-2/+2
* pkgs: remove optional builtins prefixes from prelude functions•••Remove optional builtins prefixes from prelude functions by running: builtins=( abort baseNameOf break derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true ) fd \ --type file \ . \ pkgs \ --exec-batch sed --in-place --regexp-extended " s/\<builtins\.($( printf '%s\n' "${builtins[@]}" | paste --delimiter '|' --serial - ))\>/\1/g " nix fmt NAHO2025-10-041-1/+1
* stdenvNoCC: fix `extraBuildInputs` on Darwin•••Closes: #371465 Fixes: 4928668e21d1efb681434c1caa95c449db9dd599 Emily2025-07-291-2/+2
* pkgsx86_64Darwin: move behind allowVariants•••This is already not used in-tree, so should be a variant. Wolfgang Walther2025-07-241-22/+0
* treewide: run nixfmt 1.0.0Wolfgang Walther2025-07-241-3/+6
* pkgsi686Linux: only throw with aliases enabled•••For the regular user, this still throws early whenever an attribute tries to use `pkgsi686Linux`. For CI, this doesn't throw, but instead overwrites `mkDerivation` to return only derivations marked as `meta.broken`. This propagates to all reverse dependencies and allows filtering out these attributes nicely on unsupported platforms. Wolfgang Walther2025-07-231-4/+24
* pkgs/top-level/stage.nix: fix allowVariants with variants setTristan Ross2025-07-181-9/+13
* treewide: fix typosPeder Bergebakken Sundt2025-06-021-1/+1
* pkgs/top-level/stage.nix: move most nixpkgs sets to variantsTristan Ross2025-05-171-102/+12
* Revert "stdenv: add uutils-coreutils stdenv"Ben Siraphob2025-05-141-15/+0
* pkgsUutils: initSandro Jäckel2025-05-141-0/+15
* Merge staging-next into stagingnixpkgs-ci[bot]2025-04-241-24/+0
|\
| * Revert "pkgs/top-level/stage.nix: add pkgsLLVMLibc"•••This reverts commit 41b14024d24bd7488b58d7a252f8f16b194d57f9. zowoq2025-04-241-24/+0
* | cc-wrapper: add nostrictaliasing hardening flag support•••this equates to -fno-strict-aliasing this is not a particularly new flag and is supported by all our gcc and clang versions. add to pkgsExtraHardening's defaultHardeningFlags. Robert Scott2025-04-061-0/+1
|/
* Merge remote-tracking branch 'upstream/staging-next' into stagingSilvan Mosberger2025-04-021-177/+242
|\
| * treewide: Format all Nix files•••Format all Nix files using the officially approved formatter, making the CI check introduced in the previous commit succeed: nix-build ci -A fmt.check This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153) of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166). This commit will lead to merge conflicts for a number of PRs, up to an estimated ~1100 (~33%) among the PRs with activity in the past 2 months, but that should be lower than what it would be without the previous [partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537). Merge conflicts caused by this commit can now automatically be resolved while rebasing using the [auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase). If you run into any problems regarding any of this, please reach out to the [formatting team](https://nixos.org/community/teams/formatting/) by pinging @NixOS/nix-formatting. Silvan Mosberger2025-04-011-177/+245
* | rocmPackages: 6.0.2 -> 6.3.3, and various ROCm build fixes and new packages (...Pavol Rusnak2025-03-241-0/+9
|\ \
| * | pkgsRocm: add package set with cuda config off, rocm config onLuna Nova2025-03-191-0/+9
| |/
* / stdenvNoCC: drop `extraBuildInputs` on Darwin•••Darwin includes its SDK in `extraBuildInputs`, which isn’t needed in `stdenvNoCC` because it depends on a compiler. Including it greatly increases the size of the `stdenvNoCC` closure (by ~1 GiB). This wasn’t an issue in the past when darwin included CoreFoundation because CoreFoundation on its own is very small. Now that it includes the whole SDK and links some bintools, it pulls in 300~400 MiB for the SDK plus another ~445 MiB for LLVM. Fixes #371465 Randy Eckenrode2025-03-241-1/+9
|/
* bintools-wrapper: enable `stackclashprotection` hardening flag by default (#3...Martin Weinelt2025-02-081-1/+0
|\
| * bintools-wrapper: enable stackclashprotection by defaultRobert Scott2025-01-111-1/+0
* | Revert "Reapply "pkgs/top-level: make package sets composable""•••This reverts commit d2faa1bbca1b1e4962ce7373c5b0879e5b12cef2. Robert Hensing2025-02-051-83/+123
* | Reapply "pkgs/top-level: make package sets composable"•••This reverts commit 7c251e2b5fda2b42c3ff2983fdcc9eac82f2ced6. Left out eec21001b0f7961cb84fe40512e8238ec3effb87, which changed nixos/nixpkgs, doing it differently this time. Wolfgang Walther2025-02-011-123/+83
* | Revert "pkgs/top-level: make package sets composable"K9002025-01-261-83/+123
* | pkgs/top-level: fix composing "native cross" package sets•••When using pkgsCross with a system that ends up the same as the localSystem, then modifications for package sets like pksgMusl need to be done for **both** localSystem and crossSystem. Consider the following on x86_64-linux: pkgsCross.gnu64.pkgsMusl Before this change, this would result in a musl buildPlatform, but a gnu hostPlatform. This breaks the promise of "stacking" package sets on top of each other. After this change, it results in a musl buildPlatform and a musl hostPlatform. This works better. One could expect this to result in the same as pkgsCross.musl64, i.e. a gnu buildPlatform and a musl hostPlatform, however I couldn't get this to work without increasing memory usage for ci/eval by many, many GB. This is caused by usage of pkgsi686Linux inside the main package set, which follows the same hybrid pattern. Wolfgang Walther2025-01-251-4/+7
* | pkgs/top-level: refactor mkHybridPkgsWolfgang Walther2025-01-251-29/+23
* | pkgs/top-level: refactor mkCrossPkgsWolfgang Walther2025-01-251-44/+34
* | pkgs/top-level: make package sets composable•••The various pkgsXYZ top-level package sets did not pass localSystem / crossSystem to lower levels, so far. This change propagates original arguments to lower levels, which include the overrides made by an upper package sets. There is an extensive test-suite to test various combinations of package sets in pkgs/test/top-level. There are a few basic promises made: - Package sets must be idempotent. pkgsMusl.pkgsMusl === pkgsMusl. - Once pkgsCross is used any subsequent package sets should affect the **host platform** and not the build platform. Examples: - pkgsMusl.pkgsCross.aarch64-multiplatform is a cross compilation from musl to glibc/aarch64 - pkgsCross.aarch64-multiplatform.pkgsMusl is a cross compilation to musl/aarch64 - Modifications from an earlier layer should not be lost, unless explicitly overwritten. Examples: - pkgsStatic.pkgsMusl should still be static. - pkgsStatic.pkgsCross.gnu64 should be static, but with glibc instead of musl. Exceptions / TODOs: - pkgsExtraHardening is currently not idempotent, because it applies the same flags over and over again. Supersedes #136549 Resolves #114510 Resolves #212494 Resolves #281596 Wolfgang Walther2025-01-251-45/+47
* | pkgs/top-level: refactor mkPkgs•••Sharing a first piece of common code between all package sets makes it easier to maintain and less likely to introduce a new package set without this. Wolfgang Walther2025-01-251-45/+21
* | pkgs/top-level/stage: refactor moving more generic package sets to the bottom•••No change, just move appendOverlays and extend to the bottom, since they will be changed much less often. This makes it easier to compare the other package sets side-by-side. Wolfgang Walther2025-01-251-17/+17
* | pkgs/top-level: rewrite some outdated comments•••This removes all specific references to pkgsCross or pkgsi686Linux, because they have become outdated with the addition of many more package sets. Wolfgang Walther2025-01-251-6/+1
* | pkgs/top-level/stage.nix: add pkgsLLVMLibcTristan Ross2025-01-101-0/+17
|/
* pkgsLLVM: Fix unwanted target offset•••pkgsLLVM introduced an unwanted target offset, as can be seen with the following commands. Before this commit: ``` $ nix eval --system x86_64-linux -f . pkgsCross.aarch64-multiplatform.buildPackages.stdenv.hostPlatform.config "x86_64-unknown-linux-gnu" $ nix eval --system x86_64-linux -f . pkgsCross.aarch64-multiplatform.buildPackages.pkgsLLVM.stdenv.hostPlatform.config "aarch64-unknown-linux-gnu" Explaination: These two should be the same, since the only difference between them is the addition of "pkgsLLVM". The buildPackages of the pkgsCross set should have a hostPlatform which is the native platform. ``` After this commit: ``` $ nix eval --system x86_64-linux -f . pkgsCross.aarch64-multiplatform.buildPackages.stdenv.hostPlatform.config "x86_64-unknown-linux-gnu" $ nix eval --system x86_64-linux -f . pkgsCross.aarch64-multiplatform.buildPackages.pkgsLLVM.stdenv.hostPlatform.config "x86_64-unknown-linux-gnu" ``` Peter Waller2024-12-101-1/+1
* 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. Wolfgang Walther2024-11-031-7/+8
* treewide: replace `stdenv.is` with `stdenv.hostPlatform.is`•••In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ``` Artturin2024-09-251-1/+1
* Clean up cross bootstrapping•••For a long time, we've had `crossLibcStdenv`, `*Cross` libc attributes, and `*bsdCross` pre-libc package sets. This was always bad because having "cross" things is "not declarative": the naming doesn't reflect what packages *need* but rather how we *provide* something. This is ugly, and creates needless friction between cross and native building. Now, almost all of these `*Cross` attributes are gone: just these are kept: - Glibc's and Musl's are kept, because those packages are widely used and I didn't want to risk changing the native builds of those at this time. - generic `libcCross`, `theadsCross`, and friends, because these relate to the convolulted GCC bootstrap which still needs to be redone. The BSD and obscure Linux or freestnanding libcs have conversely all been made to use a new `stdenvNoLibc`, which is like the old `crossLibcStdenv` except: 1. It usable for native and cross alike 2. It named according to what it *is* ("a standard environment without libc but with a C compiler"), rather than some non-compositional jargon ("the stdenv used for building libc when cross compiling", yuck). I should have done this change long ago, but I was stymied because of "infinite recursions". The problem was that in too many cases we are overriding `stdenv` to *remove* things we don't need, and this risks cyles since those more minimal stdenvs are used to build things in the more maximal stdenvs. The solution is to pass `stage.nix` `stdenvNoCC`, so we can override to *build up* rather than *tear down*. For now, the full `stdenv` is also passed, so I don't need to change the native bootstraps, but I can see this changing as we make things more uniform and clean those up. (adapted from commit 51f1ecaa59a3b7c182b24e71a3176c83d6cd601e) (adapted from commit 1743662e55669081056743f22f6e616588061cba) John Ericson2024-09-061-1/+5
* Merge remote-tracking branch 'origin/staging-next' into stagingK9002024-07-311-1/+1
|\
| * pkgsLLVM: use target platform to fix crossTristan Ross2024-07-261-1/+1
* | cc-wrapper: add support for pacret hardening flag on aarch64Robert Scott2024-07-281-0/+1
* | Merge pull request #318034 from ExpidusOS/feat/zig-cc•••Add stdenv & CC support for Zigtomberek2024-07-281-0/+30
|\ \
| * | arocc: init at 0-unstable-06-01Tristan Ross2024-07-271-0/+15
| * | pkgs/top-level/{release,stage}.nix: add zig package setTristan Ross2024-07-271-0/+15
| |/
* | pcre: expose enableJit argument, disable shadowstack when enabledRobert Scott2024-07-281-0/+5
* | glibc: enableCETRuntimeDefault for pkgsExtraHardeningRobert Scott2024-07-151-0/+4
* | cc-wrapper: add support for shadowstack hardening flagRobert Scott2024-07-141-0/+1
|/
* cc-wrapper: add stack clash protection hardening flag•••Most Linux distributions are enabling this these days and it does protect against real world vulnerabilities as demonstrated by CVE-2018-16864 and CVE-2018-16865. Fix #53753. Information on llvm version support gleaned from https://github.com/llvm/llvm-project/commit/6609892a2dcdd1a4f6adefe191b55524861f020c https://github.com/llvm/llvm-project/commit/68e07da3e5d5175e24caa309e2b13cb333365c8c https://github.com/llvm/llvm-project/commit/092507a730fa4fad6dbe544cd139cfb7e8179aa4 Information on gcc version support a lot harder to gather, but both 32bit and 64bit arm do appear to be supported based on the test suite. Franz Pletz2024-06-071-0/+1
* stdenv: promote zerocallusedregs to defaultHardeningFlagsRobert Scott2024-06-021-1/+0
* Merge pull request #283460 from rodarima/fix-pkgs-static-gcc-march•••pkgsStatic: Pass hostPlatform.gcc attributeAleksana2024-05-161-2/+2
|\
| * pkgsStatic: Pass hostPlatform.gcc attribute•••To build the security wrappers[1] the pkgsStatic stdenv is used, so the binaries are static. However, the hostPlatform may have gcc attributes that are *required* to build binaries so they can run on the host platform. In particular, this is the case when using gcc.arch, which ends up injecting -march=... in the gcc wrapper. Those attributes are not contained in hostPlatform.parsed. This change sets the same gcc attributes found in the hostPlatform for the pkgsStatic cross system, so it can build binaries with the same gcc flags. [1]: nixos/modules/security/wrappers/default.nix Rodrigo Arias Mallo2024-05-161-2/+2