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:
parent
6cb91c33d0
commit
a917b7b011
@ -59,7 +59,7 @@
|
|||||||
{ mkDerivation, substituteAll, pkgs }:
|
{ mkDerivation, substituteAll, pkgs }:
|
||||||
{ stdenv ? pkgs.stdenv, name, buildInputs ? []
|
{ stdenv ? pkgs.stdenv, name, buildInputs ? []
|
||||||
, propagatedBuildInputs ? [], gcc ? stdenv.gcc, cTags ? [], extraCmds ? ""
|
, propagatedBuildInputs ? [], gcc ? stdenv.gcc, cTags ? [], extraCmds ? ""
|
||||||
, cleanupCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash"}:
|
, cleanupCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash --norc"}:
|
||||||
|
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
# The setup.sh script from stdenv will expect the native build inputs in
|
# The setup.sh script from stdenv will expect the native build inputs in
|
||||||
@ -146,8 +146,8 @@ mkDerivation {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
sed -e s,@shell@,${shell}, -e s,@myenvpath@,$out/dev-envs/${name}, \
|
sed -e 's,@shell@,${shell},' -e s,@myenvpath@,$out/dev-envs/${name}, \
|
||||||
-e s,@name@,${name}, ${./loadenv.sh} > $out/bin/load-env-${name}
|
-e 's,@name@,${name},' ${./loadenv.sh} > $out/bin/load-env-${name}
|
||||||
chmod +x $out/bin/load-env-${name}
|
chmod +x $out/bin/load-env-${name}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ export buildInputs
|
|||||||
export NIX_STRIP_DEBUG=0
|
export NIX_STRIP_DEBUG=0
|
||||||
export TZ="$OLDTZ"
|
export TZ="$OLDTZ"
|
||||||
|
|
||||||
@shell@ --norc
|
@shell@
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user