| 22 Apr 2026 |
raitobezarius | f pkgs pkgs → f pkgs.stdenv.__bootPackages pkgs → f (pkgs.stdenv.__bootPackages).stdenv.__bootPackages pkgs.stdenv.__bootPackages → ... until we find a pkgs` for which the host platform is not Darwin (i.e. cross compilation mode) OR we found the root stage0 of Darwin, that's the intent right? | 12:19:14 |
raitobezarius | and prev.darwin.sourceRelease is a function | 12:20:57 |
raitobezarius | why the trace is in pkgsExtraHardening ? | 12:22:06 |
raitobezarius | … while evaluating the attribute 'stdenv.__bootPackages'
at /nix/store/phggf546c3ig9x349z4rf0qr4ckdci62-source/pkgs/top-level/variants.nix:161:11:
160| pkgsExtraHardening = super';
161| stdenv = super'.withDefaultHardeningFlags (
| ^
162| super'.stdenv.cc.defaultHardeningFlags
error: attribute '__bootPackages' missing
at /nix/store/phggf546c3ig9x349z4rf0qr4ckdci62-source/pkgs/os-specific/darwin/by-name/av/AvailabilityVersions/package.nix:17:9:
16| else
17| f pkgs.stdenv.__bootPackages pkgs;
| ^
18| bootstrapSourceRelease = f pkgs pkgs;
| 12:22:14 |
raitobezarius | that top frame is evaluating a stdenv of the new top level pkgsExtraHardening | 12:22:25 |
raitobezarius | is this used in the Darwin bootstrapping? | 12:22:31 |
raitobezarius | ok | 12:23:37 |
raitobezarius | I found a shorter reproducer on CppNix | 12:23:42 |
raitobezarius | pkgs.pkgsExtraHardening on CppNix | 12:23:47 |
raitobezarius | OK, I think I understand what is going on | 12:27:42 |
raitobezarius | Lix won't fail on evaluating pkgs.pkgsExtraHardening but will fail on pkgs.pkgsExtraHardening.stdenv | 12:27:57 |
raitobezarius | Looks like a forcing/laziness issue somewhere | 12:28:11 |
raitobezarius | So, first of all, withDefaultHardeningFlags do not return a correctly formed stdenv with __bootPackages and that's arguably a pkgsExtraHardening bug | 12:28:43 |
raitobezarius | Second, I think we need to rule out should Lix force more thunks here or should CppNix force less thunks | 12:29:07 |
raitobezarius | If Lix can produce a list of attribute keys for pkgs.pkgsExtraHardening but CppNix cannot, either Lix is making up keys that cannot be calculated or CppNix is not lazy enough with respect to the attrset spine thingie | 12:29:58 |
Sergei Zimmerman (xokdvium) | Maybe easier to compare Lix 2.93/94? | 12:30:35 |
Sergei Zimmerman (xokdvium) | Those should differ too and it might be easier to gauge whether those differ intentionally | 12:30:56 |
raitobezarius | Meh I'm sure we will fall in the pointer tagging change and this won't help me understanding what is going on | 12:31:03 |
raitobezarius | I will try analyzing the forcing logic just by reading the frames | 12:31:31 |
raitobezarius | and if I fail, I will think about something else | 12:31:35 |
raitobezarius | found a nicer reproducer | 12:49:45 |
raitobezarius | nix-instantiate --eval -E 'import ./. { system = "x86_64-darwin"; allowAliases = false; overlays = [ (self: super: { stdenv = super.stdenv.override {}; }) ]; }' | 12:49:50 |
raitobezarius | CppNix explodes immediately, Lix produces a result | 12:49:57 |
emily | (nothing better than a language without semantics) | 12:51:55 |
raitobezarius | let's be even more precise | 12:52:06 |
raitobezarius | nix-instantiate --eval -E 'import ./. { system = "x86_64-darwin"; allowAliases = false; overlays = [ (self: super: { stdenv = super.stdenv // { __bootPackages = throw "bye"; }; }) ]; }' also differs in evaluation | 12:52:10 |
raitobezarius | it feels like what trips up the __bootPackages is the series of asserts inside the darwin/default.nix entrypoint | 12:52:40 |
raitobezarius | but I don't know if this needs to be forced to know the list of package names | 12:52:58 |
raitobezarius | On a conceptual level, no package name depends on the actual state of stdenv | 12:53:48 |
raitobezarius | There's no true evaluation bug because CppNix and Lix agrees that pkgs.pkgsExtraHardening.stdenv is cooked | 12:54:11 |