nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

buildShellEnv: Make prompt overridable

+8 -2
+8 -2
pkgs/build-support/dev-shell-tools/default.nix
··· 85 85 ); 86 86 87 87 buildShellEnv = 88 - { drvAttrs }: 88 + { 89 + drvAttrs, 90 + promptPrefix ? "build shell", 91 + promptName ? null, 92 + }: 89 93 let 90 94 name = drvAttrs.pname or drvAttrs.name or "shell"; 91 95 env = unstructuredDerivationInputEnv { inherit drvAttrs; }; ··· 130 126 esac 131 127 132 128 # Prefix a line to the prompt to indicate that we are in a build shell 133 - PS1=$"\n(\[\033[1;33m\]build shell: \[\033[1;34m\]$name\[\033[1;33m\]\[\033[0m\]) $PS1" 129 + PS1=$"\n(\[\033[1;33m\]"${lib.escapeShellArg promptPrefix}$": \[\033[1;34m\]"${ 130 + if promptName != null then lib.escapeShellArg promptName else ''"$name"'' 131 + }"\[\033[1;33m\]\[\033[0m\]) $PS1" 134 132 135 133 runHook shellHook 136 134 '';