about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-08-26 12:26:42 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-08-26 12:26:42 -0500
commit2ed4284917bed2614eae086da98c35fa25c7374f (patch)
treebdd33250e5700a0049059eaa7e5f06acbfcdf85a
parent27233c2ea59ed4524548ab0cfc4f2909ecdc0c32 (diff)
parentce79122119736a63030aa2beb2de6a7c723c2e2c (diff)
Merge branch 'pypy'
-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 a4eb7439b0d5e..f5cf11ead970c 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"