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,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.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 {
})
];
}

View File

@@ -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)