From a917b7b0112ddb8473bb27eae16f943ef63ba9f2 Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Fri, 4 Oct 2013 10:02:30 +0200 Subject: [PATCH] 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. --- pkgs/misc/my-env/default.nix | 6 +++--- pkgs/misc/my-env/loadenv.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index ac2dc7f8cda..1c0dc0cbfe9 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -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} ''; } diff --git a/pkgs/misc/my-env/loadenv.sh b/pkgs/misc/my-env/loadenv.sh index 5d126f0c29b..6752d1c03b5 100644 --- a/pkgs/misc/my-env/loadenv.sh +++ b/pkgs/misc/my-env/loadenv.sh @@ -10,5 +10,5 @@ export buildInputs export NIX_STRIP_DEBUG=0 export TZ="$OLDTZ" -@shell@ --norc +@shell@