From 1d9dcbba2268d9fc482746a5329b24ed9e7a59de Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Dec 2006 17:33:37 +0000 Subject: [PATCH] * Allow the patch flags to be overriden through $patchFlags. svn path=/nixpkgs/trunk/; revision=7493 --- pkgs/stdenv/generic/setup-new2.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/generic/setup-new2.sh b/pkgs/stdenv/generic/setup-new2.sh index 869f51e4f3db..3110637d2628 100644 --- a/pkgs/stdenv/generic/setup-new2.sh +++ b/pkgs/stdenv/generic/setup-new2.sh @@ -474,6 +474,10 @@ patchW() { return fi + if test -z "$patchFlags"; then + patchFlags="-p1" + fi + for i in $patches; do header "applying patch $i" 3 local uncompress=cat @@ -485,7 +489,7 @@ patchW() { uncompress=bunzip2 ;; esac - $uncompress < $i | patch -p1 || fail + $uncompress < $i | patch $patchFlags || fail stopNest done }