diff --git a/pkgs/development/interpreters/perl/setup-hook.sh b/pkgs/development/interpreters/perl/setup-hook.sh index 1f05581df97a..6903bddd4199 100644 --- a/pkgs/development/interpreters/perl/setup-hook.sh +++ b/pkgs/development/interpreters/perl/setup-hook.sh @@ -1,7 +1,5 @@ addPerlLibPath () { - if test -d $1/lib/site_perl; then - export PERL5LIB="${PERL5LIB}${PERL5LIB:+:}$1/lib/site_perl" - fi + addToSearchPath PERL5LIB /lib/site_perl "" $1 } envHooks=(${envHooks[@]} addPerlLibPath) diff --git a/pkgs/development/interpreters/python/2.5/setup-hook.sh b/pkgs/development/interpreters/python/2.5/setup-hook.sh index 11551235c1f8..27ad62260301 100644 --- a/pkgs/development/interpreters/python/2.5/setup-hook.sh +++ b/pkgs/development/interpreters/python/2.5/setup-hook.sh @@ -1,8 +1,5 @@ addPythonPath() { - local p=$1/lib/python2.5/site-packages - if test -d $p; then - export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p" - fi + addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.5/site-packages "" $1 } toPythonPath() { diff --git a/pkgs/development/interpreters/python/setup-hook.sh b/pkgs/development/interpreters/python/setup-hook.sh index 3bc86c582298..58b8d1cab760 100644 --- a/pkgs/development/interpreters/python/setup-hook.sh +++ b/pkgs/development/interpreters/python/setup-hook.sh @@ -1,8 +1,5 @@ addPythonPath() { - local p=$1/lib/python2.4/site-packages - if test -d $p; then - export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p" - fi + addToSearchPathWithCustomDelimiter : PYTHONPATH /lib/python2.4/site-packages "" $1 } toPythonPath() { diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh index f65b09f88d4a..4712ef2b6483 100755 --- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh +++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh @@ -1,15 +1,16 @@ addCMakeParamsInclude() { - if [ -d $1/include ]; then - export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH}${CMAKE_INCLUDE_PATH:+:}$1/include" - fi + addToSearchPath CMAKE_INCLUDE_PATH /include "" $1 } addCMakeParamsLibs() { - if [ -d $1/lib ]; then - export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}${CMAKE_LIBRARY_PATH:+:}$1/lib" - fi + addToSearchPath CMAKE_LIBRARY_PATH /lib "" $1 +} + +addCMakeModulePath() +{ + addToSearchPath CMAKE_MODULE_PATH /share/cmake-2.4/Modules "" $1 } fixCmakeFiles() @@ -45,4 +46,4 @@ if [ -z "$noCmakeTewaks" ]; then postUnpack="cmakePostUnpack${postUnpack:+; }${postUnpack}" fi; -envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs) +envHooks=(${envHooks[@]} addCMakeParamsInclude addCMakeParamsLibs addCMakeModulePath) diff --git a/pkgs/development/tools/misc/automake/setup-hook.sh b/pkgs/development/tools/misc/automake/setup-hook.sh index 097b7b6cbe57..4489d343510d 100644 --- a/pkgs/development/tools/misc/automake/setup-hook.sh +++ b/pkgs/development/tools/misc/automake/setup-hook.sh @@ -1,7 +1,5 @@ addAclocals () { - if test -d $1/share/aclocal; then - export ACLOCAL_PATH="$ACLOCAL_PATH${ACLOCAL_PATH:+:}$1/share/aclocal" - fi + addToSearchPathWithCustomDelimiter : ACLOCAL_PATH /share/aclocal "" $1 } envHooks=(${envHooks[@]} addAclocals) diff --git a/pkgs/development/tools/misc/pkgconfig/builder.sh b/pkgs/development/tools/misc/pkgconfig/builder.sh deleted file mode 100644 index 6d281da71e4d..000000000000 --- a/pkgs/development/tools/misc/pkgconfig/builder.sh +++ /dev/null @@ -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 - diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix index be8c4febe03a..41a61f600e04 100644 --- a/pkgs/development/tools/misc/pkgconfig/default.nix +++ b/pkgs/development/tools/misc/pkgconfig/default.nix @@ -1,12 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "pkgconfig-0.21"; - builder = ./builder.sh; + name = "pkgconfig-0.22"; setupHook = ./setup-hook.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/pkg-config-0.21.tar.gz; - md5 = "476f45fab1504aac6697aa7785f0ab91"; + url = http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz; + sha256 = "1rpb5wygmp0f8nal7y3ga4556i7hkjdslv3wdq04fj30gns621vy"; }; patches = [ @@ -19,3 +18,4 @@ stdenv.mkDerivation { }) ]; } + diff --git a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh index f9e7805ccbf7..f13a44eb9995 100644 --- a/pkgs/development/tools/misc/pkgconfig/setup-hook.sh +++ b/pkgs/development/tools/misc/pkgconfig/setup-hook.sh @@ -1,7 +1,5 @@ addPkgConfigPath () { - if test -d $1/lib/pkgconfig; then - export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}${PKG_CONFIG_PATH:+:}$1/lib/pkgconfig" - fi + addToSearchPath PKG_CONFIG_PATH /lib/pkgconfig "" $1 } envHooks=(${envHooks[@]} addPkgConfigPath)