mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-01 07:07:12 +00:00
Merge #20264: root: fix environment setup
This commit is contained in:
commit
4c19651108
3 changed files with 19 additions and 1 deletions
|
@ -21,6 +21,9 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "186i7ni75yvjydy6lpmaplqxfb5z2019bgpbhff1n6zn2qlrff2r";
|
sha256 = "186i7ni75yvjydy6lpmaplqxfb5z2019bgpbhff1n6zn2qlrff2r";
|
||||||
})
|
})
|
||||||
./sw_vers.patch
|
./sw_vers.patch
|
||||||
|
|
||||||
|
# this prevents thisroot.sh from setting $p, which interferes with stdenv setup
|
||||||
|
./thisroot.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
|
|
@ -6,4 +6,4 @@ thisroot () {
|
||||||
source @out@/bin/thisroot.sh
|
source @out@/bin/thisroot.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
envHooks+=(thisroot)
|
postHooks+=(thisroot)
|
||||||
|
|
15
pkgs/applications/science/misc/root/thisroot.patch
Normal file
15
pkgs/applications/science/misc/root/thisroot.patch
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/config/thisroot.sh b/config/thisroot.sh
|
||||||
|
index 85dee20..532cb28 100644
|
||||||
|
--- a/config/thisroot.sh
|
||||||
|
+++ b/config/thisroot.sh
|
||||||
|
@@ -15,8 +15,8 @@ drop_from_path()
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- p=$1
|
||||||
|
- drop=$2
|
||||||
|
+ local p=$1
|
||||||
|
+ local drop=$2
|
||||||
|
|
||||||
|
newpath=`echo $p | sed -e "s;:${drop}:;:;g" \
|
||||||
|
-e "s;:${drop};;g" \
|
Loading…
Add table
Reference in a new issue