···100100 ln -s $out/pypy-c/include $out/include/${libPrefix}
101101 ln -s $out/pypy-c/lib-python/${pythonVersion} $out/lib/${libPrefix}
102102103103- wrapProgram "$out/bin/pypy" \
103103+ # We must wrap the original, not the symlink.
104104+ # PyPy uses argv[0] to find its standard library, and while it knows
105105+ # how to follow symlinks, it doesn't know about wrappers. So, it
106106+ # will think the wrapper is the original. As long as the wrapper has
107107+ # the same path as the original, this is OK.
108108+ wrapProgram "$out/pypy-c/pypy-c" \
104109 --set LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:$out/lib" \
105110 --set LIBRARY_PATH "${LIBRARY_PATH}:$out/lib"
106111