setup-hooks using addToSearchPath

I've accidentially reverted setup-hooks while merging with trunk. Correcting it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=9821
This commit is contained in:
Yury G. Kudryashov 2007-12-01 20:05:26 +00:00
parent c4640d5f49
commit 62676e09eb
8 changed files with 17 additions and 38 deletions

View File

@ -1,7 +1,5 @@
addPerlLibPath () { addPerlLibPath () {
if test -d $1/lib/site_perl; then addToSearchPath PERL5LIB /lib/site_perl "" $1
export PERL5LIB="${PERL5LIB}${PERL5LIB:+:}$1/lib/site_perl"
fi
} }
envHooks=(${envHooks[@]} addPerlLibPath) envHooks=(${envHooks[@]} addPerlLibPath)

View File

@ -1,8 +1,5 @@
addPythonPath() { addPythonPath() {
local p=$1/lib/python2.5/site-packages addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.5/site-packages "" $1
if test -d $p; then
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p"
fi
} }
toPythonPath() { toPythonPath() {

View File

@ -1,8 +1,5 @@
addPythonPath() { addPythonPath() {
local p=$1/lib/python2.4/site-packages addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.4/site-packages "" $1
if test -d $p; then
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p"
fi
} }
toPythonPath() { toPythonPath() {

View File

@ -1,15 +1,16 @@
addCMakeParamsInclude() addCMakeParamsInclude()
{ {
if [ -d $1/include ]; then addToSearchPath CMAKE_INCLUDE_PATH /include "" $1
export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH}${CMAKE_INCLUDE_PATH:+:}$1/include"
fi
} }
addCMakeParamsLibs() addCMakeParamsLibs()
{ {
if [ -d $1/lib ]; then addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1
export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}${CMAKE_LIBRARY_PATH:+:}$1/lib" }
fi
addCMakeModulePath()
{
addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1
} }
fixCmakeFiles() fixCmakeFiles()
@ -45,4 +46,4 @@ if [ -z "$noCmakeTewaks" ]; then
postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}" postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}"
fi; fi;
envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs) envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs addCMakeModulePath)

View File

@ -1,7 +1,5 @@
addAclocals () { addAclocals () {
if test -d $1/share/aclocal; then addToSearchPathWithCustomDelimiter : ACLOCAL_PATH /share/aclocal "" $1
export ACLOCAL_PATH="$ACLOCAL_PATH${ACLOCAL_PATH:+:}$1/share/aclocal"
fi
} }
envHooks=(${envHooks[@]} addAclocals) envHooks=(${envHooks[@]} addAclocals)

View File

@ -1,10 +0,0 @@
source $stdenv/setup
postInstall() {
test -x $out/nix-support || mkdir $out/nix-support
cp $setupHook $out/nix-support/setup-hook
}
postInstall=postInstall
genericBuild

View File

@ -1,12 +1,11 @@
{stdenv, fetchurl}: {stdenv, fetchurl}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "pkgconfig-0.21"; name = "pkgconfig-0.22";
builder = ./builder.sh;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
src = fetchurl { src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/pkg-config-0.21.tar.gz; url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz;
md5 = "476f45fab1504aac6697aa7785f0ab91"; sha256 = "1rpb5wygmp0f8nal7y3ga4556i7hkjdslv3wdq04fj30gns621vy";
}; };
patches = [ patches = [
@ -19,3 +18,4 @@ stdenv.mkDerivation {
}) })
]; ];
} }

View File

@ -1,7 +1,5 @@
addPkgConfigPath () { addPkgConfigPath () {
if test -d $1/lib/pkgconfig; then addToSearchPath PKG_CONFIG_PATH /lib/pkgconfig "" $1
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH:+:}$1/lib/pkgconfig"
fi
} }
envHooks=(${envHooks[@]} addPkgConfigPath) envHooks=(${envHooks[@]} addPkgConfigPath)