nixpkgs/pkgs/development/interpreters/python/2.5/setup-hook.sh
Yury G. Kudryashov 62676e09eb setup-hooks using addToSearchPath
I've accidentially reverted setup-hooks while merging with trunk. Correcting it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=9821
2007-12-01 20:05:26 +00:00

16 lines
338 B
Bash

addPythonPath() {
addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.5/site-packages "" $1
}
toPythonPath() {
local paths="$1"
local result=
for i in $paths; do
p="$i/lib/python2.5/site-packages"
result="${result}${result:+:}$p"
done
echo $result
}
envHooks=(${envHooks[@]} addPythonPath)