* substitute: support patterns starting with a dash.

* Updated the kernel headers.
* ghc: setup hooks are now generated using substituteAll.

svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10838
This commit is contained in:
Eelco Dolstra 2008-02-22 18:19:04 +00:00
parent 359e488921
commit 2e92cabb37
7 changed files with 16 additions and 26 deletions

View File

@ -21,14 +21,6 @@ stdenv.mkDerivation (rec {
description = "The Glasgow Haskell Compiler";
};
postInstall = ''
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
'';
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-readline-libraries=${readline}/lib"

View File

@ -4,7 +4,7 @@ mkdir -p $ghc_support
# Create isolated package config
packages_db=$ghc_support/package.conf
cp $ghc/lib/ghc-*/package.conf $packages_db
cp @out@/lib/ghc-*/package.conf $packages_db
chmod +w $packages_db
# Generate wrappers for GHC that use the isolated package config

View File

@ -3,11 +3,11 @@
assert stdenv.isLinux;
stdenv.mkDerivation {
name = "linux-headers-2.6.23.8";
name = "linux-headers-2.6.23.16";
builder = ./builder.sh;
src = fetchurl {
url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.23.8.tar.bz2";
sha256 = "1sp2ww2ya0wyyyq0vdxbn6ydllv9gpmzw2yz66llgvgv32cix534";
url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.23.16.tar.bz2";
sha256 = "0drk3981rl5j16s6amb63lai9kpi0vf0kr6avhpd9nikj27bsa83";
};
platform =

View File

@ -249,10 +249,6 @@ substitute() {
local -a params=("$@")
local -a args=()
local sedScript=$NIX_BUILD_TOP/.sedargs
rm -f $sedScript
touch $sedScript
local n p pattern replacement varName
for ((n = 2; n < ${#params[*]}; n += 1)); do
@ -284,7 +280,7 @@ substitute() {
args[${#args[@]}]="$replacement"
done
replace-literal -e -s "${args[@]}" < "$input" > "$output".tmp
replace-literal -e -s -- "${args[@]}" < "$input" > "$output".tmp
if test -x "$output"; then
chmod +x "$output".tmp
fi

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl, pcre}:
stdenv.mkDerivation ({
stdenv.mkDerivation {
name = "gnugrep-2.5.3";
src = fetchurl {
@ -10,12 +10,12 @@ stdenv.mkDerivation ({
buildInputs = [pcre];
preBuild = ''
makeFlagsArray=(mkdir_p="mkdir -p")
'';
meta = {
homepage = http://www.gnu.org/software/grep/;
description = "GNU implementation of the Unix grep command";
};
} // (if stdenv.system == "i686-darwin" then {
preBuild = ''
makeFlagsArray=(mkdir_p="mkdir -p")
'';
} else {}))
}

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl}:
stdenv.mkDerivation ({
stdenv.mkDerivation {
name = "replace-2.24";
src = fetchurl {
@ -12,8 +12,10 @@ stdenv.mkDerivation ({
postInstall = "mv \$out/bin/replace \$out/bin/replace-literal";
patches = [./malloc.patch];
meta = {
homepage = http://replace.richardlloyd.org.uk/;
description = "A tool to replace verbatim strings";
};
} // (if stdenv.system == "i686-darwin" then {patches = [./malloc.patch];} else {}))
}

View File

@ -3792,7 +3792,7 @@ rec {
inherit fetchurl stdenv;
};
kernelHeaders_2_6_23 = import ../os-specific/linux/kernel-headers/2.6.23.8.nix {
kernelHeaders_2_6_23 = import ../os-specific/linux/kernel-headers/2.6.23.16.nix {
inherit fetchurl stdenv;
};