about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-08-26 09:35:48 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-08-26 09:35:48 -0500
commitce79122119736a63030aa2beb2de6a7c723c2e2c (patch)
treed7abdfd8fde1fd38bd089b7abc63b6d6b5814a44 /pkgs/development/interpreters
parentd60c099a3c192e0799415c87ff6bae8468c60639 (diff)
downloadnixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar.gz
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar.bz2
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar.lz
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar.xz
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.tar.zst
nixlib-ce79122119736a63030aa2beb2de6a7c723c2e2c.zip
pypy: wrap original, not symlink
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/pypy/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix
index a4eb7439b0d5..f5cf11ead970 100644
--- a/pkgs/development/interpreters/pypy/default.nix
+++ b/pkgs/development/interpreters/pypy/default.nix
@@ -100,7 +100,12 @@ let
        ln -s $out/pypy-c/include $out/include/${libPrefix}
        ln -s $out/pypy-c/lib-python/${pythonVersion} $out/lib/${libPrefix}
 
-       wrapProgram "$out/bin/pypy" \
+       # We must wrap the original, not the symlink.
+       # PyPy uses argv[0] to find its standard library, and while it knows
+       # how to follow symlinks, it doesn't know about wrappers. So, it
+       # will think the wrapper is the original. As long as the wrapper has
+       # the same path as the original, this is OK.
+       wrapProgram "$out/pypy-c/pypy-c" \
          --set LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:$out/lib" \
          --set LIBRARY_PATH "${LIBRARY_PATH}:$out/lib"