Open rawkode opened 2 months ago
Debugging this, I've found that the unbound variable is here:
Blame shows @pwaller worked on this. Any chance of an assist? As I don't understand what is happening :)
A mysterious problem indeed. Happy to help if I can but there isn't enough information to reproduce - what's the nixpkgs hash? Ideally please provide a nix build nixpkgs/<hash>#package
invocation that reproduces the failure.
Here's what I get:
$ NIXPKGS_ALLOW_UNFREE=1 nix build --impure nixpkgs/12228ff1752d7b7624a54e9c1af4b222b3c1073b#pkgsStatic._1password-gui --dry-run
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation '1password-static-x86_64-unknown-linux-musl-8.10.36'
whose name attribute is located at /nix/store/bd4fmzws6n5542khxbifbkr6nrygi232-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'installPhase' of derivation '1password-static-x86_64-unknown-linux-musl-8.10.36'
at /nix/store/bd4fmzws6n5542khxbifbkr6nrygi232-source/pkgs/applications/misc/1password-gui/linux.nix:70:3:
69|
70| installPhase =
| ^
71| let
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'sharedLibrary' missing
at /nix/store/bd4fmzws6n5542khxbifbkr6nrygi232-source/pkgs/development/libraries/gobject-introspection/default.nix:146:33:
145| postCheck = ''
146| rm $out/lib/libregress-1.0${stdenv.targetPlatform.extensions.sharedLibrary}
| ^
147| '';
I've passed pkgsStatic
because I see that your drv has musl in the name, but that's just me trying to guess your machine configuration.
I see my ask is not so straightforward, that it's actually the security wrapper which is failing. I'll take another look when I get a chance.
Yeah. It's the security wrapper.
Would sharing my flake.lock help?
I don't have or specify musl anywhere, I believe this is the security wrapper.
Though I'm using the same lockfile across machines and one machine is fine.
For completeness, just need the nixpkgs rev from the lock file.
However, I'm still unable to reproduce, this builds on nixos-unstable and a commit from a 1st Sept, so I'm still missing something:
nix build -I nixpkgs=flake:nixpkgs/nixos-unstable --impure --expr '
with import <nixpkgs> {};
pkgsStatic.callPackage <nixpkgs/nixos/modules/security/wrappers/wrapper.nix> {
sourceProg = "${pkgs.hello}/bin/hello";
debug = true;
unsecvars = lib.overrideDerivation (pkgs.srcOnly pkgs.glibc) ({ name, ... }: { name = "${name}-unsecvars"; installPhase = "mkdir $out; cp sysdeps/generic/unsecvars.h $out"; });
}'
FWIW I was also able to put your repro into a nixos config and it builds fine for me on nixpkgs/9357f4f23713673f310988025d9dc261c20e70c6 (nixos-unstable today).
As I have the same lock on two devices and only one has the error, I guess you're fortunate enough to be in the position of the former.
Do you know what would cause NIX_LDFLAGS_BEFORE_x86_64_unknown_linux_musl
to be undefined?
Can I brute force this somehow?
❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.10.9-zen1, NixOS, 24.11 (Vicuna), 24.11.20240921.9357f4f`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.23.3`
- nixpkgs: `/nix/store/y6205wq8hxvpqvl8l9d1n9xah01kg0lq-source`
❯ uname -a
Linux p4x-framework-13-nixos 6.10.9-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 x86_64 GNU/Linux
❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.10.9-zen1, NixOS, 24.11 (Vicuna), 24.11.20240921.9357f4f`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.23.3`
- nixpkgs: `/nix/store/y6205wq8hxvpqvl8l9d1n9xah01kg0lq-source`
Linux p4x-desktop-nixos 6.10.9-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 x86_64 GNU/Linux
What your two host os revisions show is that they're both based on the same nixpkgs revision (9357f4f
), which is also the one I tested. Therefore I conclude there is very likely something in your configuration on the broken side which is breaking the package.
I'm afraid I don't know the answer to your question of what would cause it to become undefined.
In terms of brute forcing it, I would remove things from the broken configuration until it's equal to the working configuration.
No problem. The only difference between the two machines is the hardware.nix
, but I'll see if I can isolate this and report back.
Thank you for your help, I really appreciate it.
Describe the bug
This only happens on unstable.
Steps To Reproduce