my-env: pull --norc shell flag out into shell parameter

As zsh's corresponding flag is called --no-rcs, the build environment
couldn't be configured to use zsh at all.

Even then the custom PS1 won't work on zsh, but it's usable enough.

Close #1040.
This commit is contained in:
Jonas Hoersch 2013-10-04 10:02:30 +02:00 committed by Evgeny Egorochkin
parent 6cb91c33d0
commit a917b7b011
2 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,7 @@
{ mkDerivation, substituteAll, pkgs }:
{ stdenv ? pkgs.stdenv, name, buildInputs ? []
, propagatedBuildInputs ? [], gcc ? stdenv.gcc, cTags ? [], extraCmds ? ""
, cleanupCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash"}:
, cleanupCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash --norc"}:
mkDerivation {
# The setup.sh script from stdenv will expect the native build inputs in
@ -146,8 +146,8 @@ mkDerivation {
EOF
mkdir -p $out/bin
sed -e s,@shell@,${shell}, -e s,@myenvpath@,$out/dev-envs/${name}, \
-e s,@name@,${name}, ${./loadenv.sh} > $out/bin/load-env-${name}
sed -e 's,@shell@,${shell},' -e s,@myenvpath@,$out/dev-envs/${name}, \
-e 's,@name@,${name},' ${./loadenv.sh} > $out/bin/load-env-${name}
chmod +x $out/bin/load-env-${name}
'';
}

View File

@ -10,5 +10,5 @@ export buildInputs
export NIX_STRIP_DEBUG=0
export TZ="$OLDTZ"
@shell@ --norc
@shell@