| 11 Oct 2023 |
infinisil | piegames: The order of overlays would determine which one gets the final (hah) say: https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/stage.nix#L284-L295 | 15:37:49 |
@piegames:matrix.org | So my idea would work if I represent it as an overlay? | 15:38:17 |
infinisil | Oh but also, there's CI to ensure all of pkgs/by-name are derivations | 15:38:23 |
infinisil | piegames: Only if the attribute names of the overlay don't depend on final | 15:38:55 |
@piegames:matrix.org | So I am basically pushing down the trust/invariant to the files being imported. Which sounds doable | 15:39:49 |
infinisil | Btw here's a simplified example of the problem:
nix-repl> lib.fix (lib.extends (self: super: { y = 10; } // self.x) (self: { attrs = { z = 10; }; }))
| 15:40:16 |
@piegames:matrix.org | Okay now I slowly begin to understand the situation and the difference to by-name. In the latter case, the names are static as file paths | 15:40:42 |
infinisil | Just an overlay and a fixed-point function, but this causes infinite rec because the attributes of the overlay depend on final/self | 15:40:51 |