Skip to content

Commit

Permalink
python: don't use keep for hooks, so they will be spliced
Browse files Browse the repository at this point in the history
as far as i can see there should be no reason to not splice the hooks

wrapPython for some reason has to be not spliced because 'substitutions.pythonHost = python;' causes
```
error: output '/nix/store/li07bad6s9brxx7cf8j408631nca39ka-python3.10-chardet-5.1.0-aarch64-unknown-linux-gnu' is not allowed to refer to the following paths:
         /nix/store/fdqpyj613dr0v1l1lrzqhzay7sk4xg87-python3-3.10.10
```

ericson said in NixOS#104201 (comment) that the reason they were in keep was to not splice them but before the commit which broke hook splicing (33d12e5) everything appeared to be working correctly when cross-compiling

we also somehow get a correctly spliced python in nativeBuildInputs for free
  • Loading branch information
Artturin committed Sep 14, 2024
1 parent 00ca48e commit 9e1684f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/interpreters/python/passthrufun.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
};
hooks = import ./hooks/default.nix;
keep = self: hooks self {};
keep = self: { inherit (self) wrapPython; };
optionalExtensions = cond: as: lib.optionals cond as;
pythonExtension = import ../../../top-level/python-packages.nix;
python2Extension = import ../../../top-level/python2-packages.nix;
Expand Down

0 comments on commit 9e1684f

Please sign in to comment.