zsh profile load tweaking only on nixos
svn path=/nixpkgs/trunk/; revision=31149
This commit is contained in:
parent
0009c1f650
commit
89c3120b20
|
@ -31,17 +31,25 @@ stdenv.mkDerivation {
|
||||||
tar xf ${documentation} -C $out/share
|
tar xf ${documentation} -C $out/share
|
||||||
ensureDir $out/etc/
|
ensureDir $out/etc/
|
||||||
cat > $out/etc/zprofile <<EOF
|
cat > $out/etc/zprofile <<EOF
|
||||||
if test -r /etc/zprofile; then
|
if test -e /etc/NIXOS; then
|
||||||
. /etc/zprofile
|
if test -r /etc/zprofile; then
|
||||||
|
. /etc/zprofile
|
||||||
|
else
|
||||||
|
emulate bash
|
||||||
|
alias shopt=false
|
||||||
|
. /etc/profile
|
||||||
|
unalias shopt
|
||||||
|
emulate zsh
|
||||||
|
fi
|
||||||
|
if test -r /etc/zprofile.local; then
|
||||||
|
. /etc/zprofile.local
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
emulate bash
|
# on non-nixos we just source the global /etc/zprofile as if we did
|
||||||
alias shopt=false
|
# not use the configure flag
|
||||||
. /etc/profile
|
if test -r /etc/zprofile; then
|
||||||
unalias shopt
|
. /etc/zprofile
|
||||||
emulate zsh
|
fi
|
||||||
fi
|
|
||||||
if test -r /etc/zprofile.local; then
|
|
||||||
. /etc/zprofile.local
|
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
$out/bin/zsh -c "zcompile $out/etc/zprofile"
|
$out/bin/zsh -c "zcompile $out/etc/zprofile"
|
||||||
|
|
Loading…
Reference in New Issue