Open avdv opened 7 months ago
Yes, correct, before that commit x
and pkgsStatic.x
would be exactly the same. After that commit it's now attempting to build packages statically. Unfortunately since that combination of packages and stdenv weren't being built before, most of them didn't build. We've got pkgsStatic.nix
building, although that was on aarch64
. x86_64
doesn't work, the exact reason why is beyond my understanding of how stdenvs are wired together, but https://github.com/NixOS/nixpkgs/issues/180771 has more context, and https://github.com/NixOS/nixpkgs/pull/256590 has a potential fix (it's for cross compilation, but it also changes how things are passed through stdenv, so it affects pkgsStatic
which is implemented as cross compilation).
I think it's fine to keep this issue open to track pkgsStatic.coreutils
specifically, but do note that in general pkgsStatic
/ cross compiled packages aren't checked so they break a lot. I suggest setting up your own nix ci to verify whether upstream nixpkgs bumps will break these packages if you care about them so you can open issues immediately after they get broken.
In the meantime can you verify that the PR fixes your issue?
In the meantime can you verify that the PR fixes your issue?
Yes, it fixes the issue at hand and it is building pkgsStatic.coreutils
again, but it seems the package is not really static:
$ otool -L /nix/store/fbzhv146kg8b8mp90q8ncrqj7l2fj4wy-coreutils-9.3/bin/coreutils
/nix/store/fbzhv146kg8b8mp90q8ncrqj7l2fj4wy-coreutils-9.3/bin/coreutils:
/nix/store/7flhczqiibyhadll32xx83awsg1bcmbi-gmp-with-cxx-6.3.0/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
Like before, coreutils
and pkgsStatic.coreutils
seem to be the same:
$ nix-shell --argstr localSystem x86_64-darwin -I nixpkgs=./. --pure -p which pkgsStatic.coreutils --run 'which coreutils'
/nix/store/fbzhv146kg8b8mp90q8ncrqj7l2fj4wy-coreutils-9.3/bin/coreutils
$ nix-shell --argstr localSystem x86_64-darwin -I nixpkgs=./. --pure -p which coreutils --run 'which coreutils'
/nix/store/fbzhv146kg8b8mp90q8ncrqj7l2fj4wy-coreutils-9.3/bin/coreutils
Describe the bug
Trying to use the
pkgsStatic.coreutils
package on x86_64 Darwin fails when using nixos-unstable:(it works on aarch64-darwin)
Steps To Reproduce
Steps to reproduce the behavior:
nix-shell --argstr localSystem x86_64-darwin -I nixpkgs=./. --show-trace -p pkgsStatic.coreutils
Expected behavior
We should be able to use
pkgsStatic.coreutils
on x86_64-darwin.Additional context
I git bisected the problem to commit 42b5817e6b94974614cc9d0f803c14551274d6c5 which actually introduced support for non-linux host platforms in the first place. This would probably mean that before this change package
x
andpkgsStatic.x
would be exactly the same on Darwin?We used the
pkgsStatic.coreutils
package from nixos-22.11 before, but ran into this problem after upgrading to nixos-unstable, see https://github.com/tweag/rules_nixpkgs/issues/424Notify maintainers
cc @uri-canva
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Priorities
Add a :+1: reaction to issues you find important.