summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2024-04-07 18:24:35 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2024-04-11 08:26:39 -0700
commit636edfdeb1a8f2af9ed3313f7b306285f00bb6f7 (patch)
tree40b0596bae3f18818174b9c7ba7b41cec1092e64
parent94a214b95f89753640a772b7d8143c3ca1229a81 (diff)
Revert "Unwrap python scripts when building an environment"
-rw-r--r--pkgs/development/interpreters/python/wrapper.nix10
1 files changed, 1 insertions, 9 deletions
diff --git a/pkgs/development/interpreters/python/wrapper.nix b/pkgs/development/interpreters/python/wrapper.nix
index aa568a01b1b0..f5f9b03e0fd3 100644
--- a/pkgs/development/interpreters/python/wrapper.nix
+++ b/pkgs/development/interpreters/python/wrapper.nix
@@ -35,8 +35,6 @@ let
fi
mkdir -p "$out/bin"
- rm -f $out/bin/.*-wrapped
-
for path in ${lib.concatStringsSep " " paths}; do
if [ -d "$path/bin" ]; then
cd "$path/bin"
@@ -44,13 +42,7 @@ let
if [ -f "$prg" ]; then
rm -f "$out/bin/$prg"
if [ -x "$prg" ]; then
- if [ -f ".$prg-wrapped" ]; then
- echo "#!${pythonExecutable}" > "$out/bin/$prg"
- sed -e '1d' -e '3d' ".$prg-wrapped" >> "$out/bin/$prg"
- chmod +x "$out/bin/$prg"
- else
- makeWrapper "$path/bin/$prg" "$out/bin/$prg" --inherit-argv0 --resolve-argv0 ${lib.optionalString (!permitUserSite) ''--set PYTHONNOUSERSITE "true"''} ${lib.concatStringsSep " " makeWrapperArgs}
- fi
+ makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set NIX_PYTHONPREFIX "$out" --set NIX_PYTHONEXECUTABLE ${pythonExecutable} --set NIX_PYTHONPATH ${pythonPath} ${lib.optionalString (!permitUserSite) ''--set PYTHONNOUSERSITE "true"''} ${lib.concatStringsSep " " makeWrapperArgs}
fi
fi
done