* Use a setup hook to set PKG_CONFIG_PATH.

svn path=/nixpkgs/trunk/; revision=822
This commit is contained in:
Eelco Dolstra 2004-03-09 10:45:01 +00:00
parent 5c5db47443
commit c8455be838
3 changed files with 22 additions and 9 deletions

View File

@ -1,10 +1,13 @@
#! /bin/sh
. $stdenv/setup || exit 1
. $stdenv/setup
tar xvfz $src || exit 1
cd pkgconfig-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
mkdir $out || exit 1
make install || exit 1
tar xvfz $src
cd pkgconfig-*
./configure --prefix=$out
make
mkdir $out
make install
mkdir $out/nix-support
cp $setupHook $out/nix-support/setup-hook

View File

@ -1,10 +1,13 @@
{stdenv, fetchurl}: derivation {
{stdenv, fetchurl}:
derivation {
name = "pkgconfig-0.15.0";
system = stdenv.system;
builder = ./builder.sh;
setupHook = ./setup-hook.sh;
src = fetchurl {
url = http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-0.15.0.tar.gz;
md5 = "a7e4f60a6657dbc434334deb594cc242";
};
stdenv = stdenv;
inherit stdenv;
}

View File

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