diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-06-23 11:26:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 11:26:22 +0200 |
commit | 7945055c6367527ba3ca2aebf19a5e448997078d (patch) | |
tree | 671c94f3777fdb917cd258730e2e2d005e87ecb4 /src | |
parent | 4a5aa1dbf625af795b19badd66c0a0891c9d5b49 (diff) | |
parent | 3b58dbb3561e02dc94e88b531d0942a7f8ccf8ea (diff) |
Merge pull request #4842 from NixOS/ca/fix-nix-shell
Make `nix-shell` support content-addressed derivations
Diffstat (limited to 'src')
-rwxr-xr-x | src/nix-build/nix-build.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 9acbedda2..3fec2c06c 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -387,6 +387,12 @@ static void main_nix_build(int argc, char * * argv) if (dryRun) return; + if (settings.isExperimentalFeatureEnabled("ca-derivations")) { + auto resolvedDrv = drv.tryResolve(*store); + assert(resolvedDrv && "Successfully resolved the derivation"); + drv = *resolvedDrv; + } + // Set the environment. auto env = getEnv(); |