| Commit message (Expand) | Author | Age | Files | Lines |
| * | mold: switch to wrapped by default | Dawid Ciężarkiewicz | 2025-12-08 | 1 | -3/+8 |
| * | wild: make wrapped default, add wild-unwrapped | Dawid Ciężarkiewicz | 2025-11-10 | 1 | -1/+1 |
| * | adapters: Add useWildLinker | Ross Smyth | 2025-11-05 | 1 | -0/+16 |
| * | Merge remote-tracking branch 'origin/master' into staging-next | K900 | 2025-10-04 | 1 | -1/+1 |
| |\ |
|
| | * | 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
| NAHO | 2025-10-04 | 1 | -1/+1 |
| * | | overrideLibcxx: drop•••We now use the latest SDK’s libc++ headers, and longer have Clang
versions old enough for version compatibility to be a concern.
| Emily | 2025-09-15 | 1 | -44/+0 |
| |/ |
|
| * | {darwin.*,overrideSDK}: convert compatibility stubs to throws | Emily | 2025-08-16 | 1 | -3/+0 |
| * | pkgsStatic: fix in combination with __structuredAttrs•••pkgsStatic injects { NIX_CFLAGS_COMPILE = " -static"; }. When
__structuredAttrs is true, it must inject { env.NIX_CFLAGS_COMPILE = "
-static"; } instead, as attributes outside env are ignored.
| Guillaume Girol | 2025-07-26 | 1 | -16/+18 |
| * | stdenvAdapters.keepDebugInfo: add Rust support•••These are the flags we use in the separateDebugInfo hook, plus
disabling optimisations in line with what we do for C.
This fixes e.g. enableDebugging amberol.
| Alyssa Ross | 2025-07-14 | 1 | -0/+1 |
| * | Fix useMoldLinker when cross compiling (#400749) | Ben Siraphob | 2025-05-12 | 1 | -2/+3 |
| |\ |
|
| | * | Fix useMoldLinker when cross compiling•••After #400734 we can make useMoldLinker work when cross compiling.
We need the following:
- Need to use pkgs.buildPackages.mold so that we use mold binaries
for the build machine instead of the host.
- Need to create unprefixed ld.mold wrapper because gcc will not look
for a triple-prefixed ld.mold when passing -fuse-ld=mold.
Tested on an aarch64 machine with this change + #400734:
$ nix-build -K --expr 'with import "${./.}" { crossSystem = { config = "x86_64-unknown-linux-gnu"; }; }; hello.override { stdenv = useMoldLinker stdenv; }' && strings result/bin/hello | grep mold
/nix/store/w1yg0am7iyqsgi253h84lsp92178sgfi-hello-x86_64-unknown-linux-gnu-2.12.1
mold 2.37.1 (compatible with GNU ld)
| Peter Collingbourne | 2025-04-21 | 1 | -2/+3 |
| * | | overrideSDK: add deprecation warning | Emily | 2025-04-20 | 1 | -9/+1 |
| * | | pkgsStatic.stdenv: fix eval on darwin | Tristan Ross | 2025-04-09 | 1 | -1/+2 |
| |/ |
|
| * | 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 Mosberger | 2025-04-01 | 1 | -201/+314 |
| * | stdenvAdapters: set default_both_libraries for meson in makeStaticLibrary•••The default value of `default_both_libraries` is 'shared'. This change
supplements the existing `default_library` flag for static builds.
| Kiskae | 2024-11-02 | 1 | -1/+4 |
| * | overrideSDK: update for the new SDK•••Change the adapter to add the requested SDK to the target’s build
inputs. Note that only the “11.0” (i.e., 11.3) and 12.3 SDKs are
supported. This adapter is retained for compatibility. The preferred way
to override the SDK is to add it to the appropriate inputs directly.
| Randy Eckenrode | 2024-10-10 | 1 | -11/+3 |
| * | makeStaticDarwin: handle when `env.NIX_CFLAGS_LINK` is set | Randy Eckenrode | 2024-10-10 | 1 | -5/+10 |
| * | makeStaticDarwin: drop darwin-portable-libSystem-hook•••`${stdenv.cc.libc}/lib/libSystem.B.dylib` does not exist and not existed
for as long as I have used nixpkgs. Since `/usr/lib/libSystem.B.dylib`
is already linked via text-based stubs, continue relying on those.
| Randy Eckenrode | 2024-10-10 | 1 | -10/+1 |
| * | darwin.stdenv: provide an SDK when cross-compiling•••Static can rely on the standard cross-SDK because it will be a static
SDK when building for static targets.
| Randy Eckenrode | 2024-10-10 | 1 | -2/+0 |
| * | stdenv: throw when using mold for targeting darwin•••Mold does not support linking Mach-O, but still can be used on MacOS to
emit ELF.
Fixes: #338970
| Azat Bahawi | 2024-09-02 | 1 | -19/+21 |
| * | stdenv: Fix args.env.NIX_CFLAGS_LINK/args.NIX_CFLAGS_LINK typo | adisbladis | 2024-08-07 | 1 | -1/+1 |
| * | stdenv: Take nested env.NIX_CFLAGS_LINK into account when making static binaries•••https://github.com/NixOS/nixpkgs/pull/315998/files#diff-2828f66a476875b1160e3c241960db085c2a3933211cc187bcd1fb456fb95e7fL213-R216 moved NIX_CFLAGS_LINK from a top-level `mkDerivation` argument to the nested `env` attribute.
This doesn't play nicely with how `stdenv/adapters.nix` adds it's NIX_CFLAGS_LINK in the top-level.
This changes the stdenv adapter to check for the presence of `env.NIX_CFLAGS_LINK`, and override that one if present, and only otherwise override on the top-level drv attrset.
| adisbladis | 2024-08-03 | 1 | -2/+6 |
| * | *bsdCross: Remove these package sets•••I realized what rhelmot did in 61202561d92cf1cd74532fcbd8b9d6662c5bc57b
(specify what packages just need `stdenvNoLibc`) is definitely the right
approach for this, and adjusted NetBSD and OpenBSD to likewise use it.
With that change, we don't need these confusing and ugly `*bsdCross`
package sets at all!
We can get rid of a lot more libc-related `*Cross`, and I will do so
soon, but this is the first step.
(adapted from commit 51f1ecaa59a3b7c182b24e71a3176c83d6cd601e)
| John Ericson | 2024-06-21 | 1 | -1/+5 |
| * | Revert #320852: Clean up cross bootstrapping•••It rebuilt stdenv on *-darwin; we can't do that in nixpkgs master.
This reverts commit 2f20501c5f188ab0c4c430519ce77bc6b988202b, reversing
changes made to fd469c24af2e16aad2c2b4fc90fc8c74af36e773.
| Vladimír Čunát | 2024-06-21 | 1 | -5/+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.
Finally, the BSDs also had to be cleaned up, since they have a few
pre-libc dependencies, demanding a systematic approach. I realized what
rhelmot did in 61202561d92cf1cd74532fcbd8b9d6662c5bc57b (specify what
packages just need `stdenvNoLibc`) is definitely the right approach for
this, and adjusted NetBSD and OpenBSD to likewise use it.
| John Ericson | 2024-06-18 | 1 | -1/+5 |
| * | overrideSDK: support all deps attributes•••This is effectively a rewrite of `overrideSDK`. It was required because
`wrapGAppsHook` propagates `depsTargetTarget` with the expectation that
it will effectively be `buildInputs` when the hook is itself used as a
`nativeBuildInput`. This propagates Gtk, which itself propagates the
default Dariwn SDK, making it effectively impossible to override the SDK
when a package depends on Gtk and uses `wrapGAppsHook`.
This rewrite implements the following improvements:
* Cross-compilation should be supported correctly (untested);
* Supports public and private frameworks;
* Supports SDK `libs`;
* Remaps instead of replacing extra (native) build inputs in the stdenv;
* Updates any Darwin framework references in `nix-support`; and
* It updates `xcodebuild` regardless of which input its in.
The implementation avoids recursion for performance reasons. Instead, it
enumerates transitive dependencies and walks the list from the leaf
packages backwards to the parent packages.
| Randy Eckenrode | 2024-03-29 | 1 | -119/+11 |
| * | Merge pull request #297711 from hercules-ci/rename-adapters-finalAttrs•••pkgs/stdenv/adapters.nix: Rename internal name | Robert Hensing | 2024-03-21 | 1 | -3/+3 |
| |\ |
|
| | * | pkgs/stdenv/adapters.nix: Rename internal name•••`finalAttrs` is never the first argument. This should have been
called `prevAttrs` all along.
It confused me for a bit, because the callback _must not_ be strict
in `finalAttrs` (the first of _two_ parameters), or it will
recurse infinitely while trying to figure out what the attrNames are.
| Robert Hensing | 2024-03-21 | 1 | -3/+3 |
| * | | Merge master into staging-next | github-actions[bot] | 2024-03-20 | 1 | -5/+9 |
| |\ \ |
|
| | * | | stdenvAdapters.useLibsFrom: use targetStdenv.cc.override•••As @SomeoneSerge pointed out in https://github.com/NixOS/nixpkgs/pull/281371#discussion_r1531174155,
by avoiding `wrapCCWith` and using `targetStdenv.cc.override`, we avoid roundtrip wrapping and
are able to use `coreutils` from `targetStdenv`.
| Connor Baker | 2024-03-20 | 1 | -5/+9 |
| | |/ |
|
| * | | Merge master into staging-next | github-actions[bot] | 2024-03-14 | 1 | -1/+1 |
| |\| |
|
| | * | make-derivation.nix: Return mkDerivation as an attribute | Robert Hensing | 2024-03-11 | 1 | -1/+1 |
| * | | llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into...•••- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again
This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)
### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.
### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx
### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override
https://github.com/NixOS/nixpkgs/pull/292043 | a-n-n-a-l-e-e | 2024-03-11 | 1 | -16/+4 |
| |/ |
|
| * | stdenvAdapters.useLibsFrom: init | Someone Serge | 2024-01-12 | 1 | -0/+24 |
| * | Merge branch 'master' into staging-next | Weijia Wang | 2024-01-10 | 1 | -1/+4 |
| |\ |
|
| | * | stdenv.adapters: fixx `overrideLibcxx` to refer to existing `compiler-rt`•••Before the change `pkgsLLVM` attributes were failing to pull in
`compiler-rt` on `x86_64-linux`:
$ nix build --no-link -f. pkgsLLVM.asciidoc-full
error:
error: attribute 'llvmPackages_13' missing
at pkgs/stdenv/adapters.nix:86:32:
85| inherit libcxx;
86| extraPackages = [ cxxabi pkgs.pkgsTargetTarget."llvmPackages_${lib.versions.major llvmLibcxxVersion}".compiler-rt ];
| ^
87| });
It happens because `pkgs.pkgsTargetTarget` are always empty for
cross-packages like `pkgsLLVM.`, `pkgsCross.*.` or
`--arg crossSystem '...'`.
| Sergei Trofimovich | 2024-01-07 | 1 | -1/+4 |
| * | | stdenvAdapters: add withDefaultHardeningFlags | Robert Scott | 2023-12-09 | 1 | -0/+14 |
| |/ |
|
| * | Merge pull request #265307 from reckenrode/clang16-fixes-batch2•••rubyPackages.iconv, v8: fix build with clang 16 | Weijia Wang | 2023-11-04 | 1 | -0/+44 |
| |\ |
|
| | * | stdenvAdapters: add overrideLibcxx•••This was taken from #264091 to use in the interim before that PR lands
(sometime after the release of 23.11). It allows different versions of
clang to link the same libc++, allowing dependencies to be linked when
they are built with a different version of clang than the stdenv.
| Randy Eckenrode | 2023-11-03 | 1 | -0/+44 |
| * | | stdenvAdapters.overrideSDK: special case the 10.12 Libsystem•••The 10.12 Libsystem is not located as a sub-attribute of
`darwin.apple_sdk_10_12`. This will be fixed as part of the SDK changes
planned for post-23.11. In the meantime, special case it so the adapter
can be used to change the deployment target.
| Randy Eckenrode | 2023-11-04 | 1 | -2/+5 |
| |/ |
|
| * | stdenvAdapters.overrideSDK: handle non-drv nativeBuildInputs | Randy Eckenrode | 2023-11-01 | 1 | -1/+1 |
| * | stdenvAdapters.overrideSDK: also remap propagatedBuildInputs | Randy Eckenrode | 2023-11-01 | 1 | -0/+1 |
| * | stdenvAdapters.overrideSDK: update the SDK version recursively•••Update all propagated build inputs recursively, so that propagated
inputs with propagated inputs use the correct SDK.
| Randy Eckenrode | 2023-11-01 | 1 | -12/+15 |
| * | stdenvAdapters.overrideSDK: override xcodebuild to use the requested SDK | Randy Eckenrode | 2023-10-31 | 1 | -1/+22 |
| * | stdenvAdapters: add overrideSDK•••This is a replacement for using `darwin.apple_sdk_<ver>.callPackage`.
Instead of injecting the required packages, it provides a stdenv adapter
that modifies the derivation’s build inputs to use the requested SDK
versions. This modification extends to any build inputs propagated to it
as well. The `callPackage` approach is not deprecated yet, but it is
expected that it will be eventually.
Note that this is an MVP. It should work with most packages, but it only
handles build inputs and also only handles frameworks. Once more SDKs
are added (after #229210 is merged) and the SDK structure is normalized,
it can be extended to handle any package in the SDK namespace.
Cross-compilation may or may not work. Any cross-related issues can be
addressed after #256590 is merged.
| Randy Eckenrode | 2023-10-26 | 1 | -0/+99 |
| * | Merge staging-next into staging | github-actions[bot] | 2023-10-20 | 1 | -10/+4 |
| |\ |
|
| | * | stdenvAdapters.useMoldLinker: set `allowedRequisites` to `null` | Pavel Sobolev | 2023-10-19 | 1 | -10/+4 |
| * | | Merge staging-next into staging | github-actions[bot] | 2023-10-13 | 1 | -1/+4 |
| |\| |
|
| | * | stdenvAdapters.useMoldLinker: automatically add `allowedRequisites`•••Co-Authored-By: Pavel Sobolev <paveloom@riseup.net>
| Artturin | 2023-10-13 | 1 | -1/+4 |
| * | | Merge staging-next into staging | github-actions[bot] | 2023-10-13 | 1 | -2/+2 |
| |\| |
|