diff options
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r-- | src/nix/develop.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc index f22335023..92e31599a 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -5,7 +5,6 @@ #include "store-api.hh" #include "path-with-outputs.hh" #include "derivations.hh" -#include "affinity.hh" #include "progress-bar.hh" #include "run.hh" @@ -195,7 +194,7 @@ static StorePath getDerivationEnvironment(ref<Store> store, ref<Store> evalStore 'buildDerivation', but that's privileged. */ drv.name += "-env"; drv.inputSrcs.insert(std::move(getEnvShPath)); - if (settings.isExperimentalFeatureEnabled("ca-derivations")) { + if (settings.isExperimentalFeatureEnabled(Xp::CaDerivations)) { for (auto & output : drv.outputs) { output.second = { .output = DerivationOutputDeferred{}, @@ -326,8 +325,15 @@ struct Common : InstallableCommand, MixProfile Strings getDefaultFlakeAttrPaths() override { - return {"devShell." + settings.thisSystem.get(), "defaultPackage." + settings.thisSystem.get()}; + Strings paths{ + "devShells." + settings.thisSystem.get() + ".default", + "devShell." + settings.thisSystem.get(), + }; + for (auto & p : SourceExprCommand::getDefaultFlakeAttrPaths()) + paths.push_back(p); + return paths; } + Strings getDefaultFlakeAttrPathPrefixes() override { auto res = SourceExprCommand::getDefaultFlakeAttrPathPrefixes(); @@ -473,9 +479,11 @@ struct CmdDevelop : Common, MixEnvironment else { script = "[ -n \"$PS1\" ] && [ -e ~/.bashrc ] && source ~/.bashrc;\n" + script; if (developSettings.bashPrompt != "") - script += fmt("[ -n \"$PS1\" ] && PS1=%s;\n", shellEscape(developSettings.bashPrompt)); + script += fmt("[ -n \"$PS1\" ] && PS1=%s;\n", + shellEscape(developSettings.bashPrompt.get())); if (developSettings.bashPromptSuffix != "") - script += fmt("[ -n \"$PS1\" ] && PS1+=%s;\n", shellEscape(developSettings.bashPromptSuffix)); + script += fmt("[ -n \"$PS1\" ] && PS1+=%s;\n", + shellEscape(developSettings.bashPromptSuffix.get())); } writeFull(rcFileFd.get(), script); @@ -497,7 +505,8 @@ struct CmdDevelop : Common, MixEnvironment this, state, installable->nixpkgsFlakeRef(), - Strings{"bashInteractive"}, + "bashInteractive", + Strings{}, Strings{"legacyPackages." + settings.thisSystem.get() + "."}, nixpkgsLockFlags); |