aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-06-29 10:13:42 +0200
committerregnat <rg@regnat.ovh>2021-06-29 10:13:42 +0200
commitbf7960a4ede0f5ba7e88b939ed0f33aa6087cbc6 (patch)
tree0c083cdfcd9269424c14ff914ba60f43d24086b3 /src
parent9feca5cdf64b82bfb06dfda07d19d007a2dfa1c1 (diff)
develop: Discard the input{Overrides,Updates} when getting bash
`nix develop` is getting bash from an (assumed existing) `nixpkgs` flake. However, when doing so, it reuses the `lockFlags` passed to the current flake, including the `--input-overrides` and `--input-update` which generally don’t make sense anymore at that point (and trigger a warning because of that) Clear these overrides before getting the nixpkgs flake to get rid of the warning.
Diffstat (limited to 'src')
-rw-r--r--src/nix/develop.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index d77ff52d7..6c089469d 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -443,13 +443,17 @@ struct CmdDevelop : Common, MixEnvironment
try {
auto state = getEvalState();
+ auto nixpkgsLockFlags = lockFlags;
+ nixpkgsLockFlags.inputOverrides = {};
+ nixpkgsLockFlags.inputUpdates = {};
+
auto bashInstallable = std::make_shared<InstallableFlake>(
this,
state,
installable->nixpkgsFlakeRef(),
Strings{"bashInteractive"},
Strings{"legacyPackages." + settings.thisSystem.get() + "."},
- lockFlags);
+ nixpkgsLockFlags);
shell = state->store->printStorePath(
toStorePath(state->store, Realise::Outputs, OperateOn::Output, bashInstallable)) + "/bin/bash";