splice.nix: make pkgs splicedPackages when required#362499
splice.nix: make pkgs splicedPackages when required#362499Artturin wants to merge 2 commits intoNixOS:masterfrom
Conversation
This will make `pkgs` used in `callPackage`, and `pkgsCross.X.pkgs` have packages with `__spliced`. https://www.github.com/NixOS/nixpkgs/blob/3029741718f4c765fbc5ebf76bea3d6c8ff15fe5/pkgs/development/interpreters/python/passthrufun.nix#L37 https://www.github.com/NixOS/nixpkgs/blob/d2bd9a39dec88eddd5c192abee69939e67f43d12/pkgs/top-level/python-packages.nix#L10720 ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced error: … while evaluating the attribute 'aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced' at /home/artturin/nixgits/my-nixpkgs/.worktree/1/pkgs/development/python-modules/protobuf/4.nix:119:13: 118| passthru = { 119| inherit protobuf; | ^ 120| }; error: attribute '__spliced' missing at «string»:1:1: 1| pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced | ^ ``` to ``` nix-repl> pkgsCross.aarch64-multiplatform.python3Packages.protobuf4.protobuf.__spliced { buildBuild = «derivation /nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»; buildHost = «derivation /nix/store/s7da5mfvx4h1n86j78knaj9cprglxqz6-protobuf-25.4.drv»; buildTarget = «repeated»; hostHost = «derivation /nix/store/mszvybzs4zxh43awyrjnybsfcb265n9r-protobuf-aarch64-unknown-linux-gnu-25.4.drv»; hostTarget = «repeated»; } ```
Now that `pkgs` is `__splicedPackages` on cross we can remove these variables I set. Assignments like `patchutils = pkgs.patchutils_0_3_3;` in `all-packages.nix` cannot be removed because the `pkgs` in `patchutils = pkgs.patchutils_0_3_3;` in `all-packages.nix` is coming from this `pkgs:` https://www.github.com/NixOS/nixpkgs/blob/b6e486730fc875ec79a3dea0f1f46eaf9f6ffa9d/pkgs/top-level/all-packages.nix#L9 instead of the `pkgs` in `with pkgs;`
|
Can we add a |
AFAIK currently |
|
How is intentionally referring to the unspliced current stage to avoid infinite recursions done with this? |
Weird that the ofborg eval in #349316 didn't catch the inf rec but the actions eval did. |
|
Ahh, |
|
Selectively patching splicing into things feels like a never ending workaround. Can't we make mkDerivation itself output splices for each package it generates? Then it would be everywhere by default. |
Take 2 of #349316
This will make
pkgsused incallPackage, andpkgsCross.X.pkgshavepackages with
__spliced.https://www.github.com/NixOS/nixpkgs/blob/3029741718f4c765fbc5ebf76bea3d6c8ff15fe5/pkgs/development/interpreters/python/passthrufun.nix#L37
https://www.github.com/NixOS/nixpkgs/blob/d2bd9a39dec88eddd5c192abee69939e67f43d12/pkgs/top-level/python-packages.nix#L10720
to