diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-16 16:04:47 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-22 09:59:51 +0200 |
commit | 8d9f7048cd3b09fb58f6bad0328f644b0ddaaa16 (patch) | |
tree | 18a10edb9f4c675bb4c5b88dfdea121a9c92c425 /src/nix/app.cc | |
parent | 95e915a993f77cf17124f7866b542939c03d375a (diff) |
Use eval-store in more places
In particular, this now works:
$ nix path-info --eval-store auto --store https://cache.nixos.org nixpkgs#hello
Previously this would fail as it would try to upload the hello .drv to
cache.nixos.org. Now the .drv is instantiated in the local store, and
then we check for the existence of the outputs in cache.nixos.org.
Diffstat (limited to 'src/nix/app.cc')
-rw-r--r-- | src/nix/app.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/app.cc b/src/nix/app.cc index 01a0064db..9719a65dd 100644 --- a/src/nix/app.cc +++ b/src/nix/app.cc @@ -100,7 +100,8 @@ UnresolvedApp Installable::toApp(EvalState & state) throw Error("attribute '%s' has unsupported type '%s'", attrPath, type); } -App UnresolvedApp::resolve(ref<Store> store) +// FIXME: move to libcmd +App UnresolvedApp::resolve(ref<Store> evalStore, ref<Store> store) { auto res = unresolved; @@ -110,7 +111,7 @@ App UnresolvedApp::resolve(ref<Store> store) installableContext.push_back( std::make_shared<InstallableDerivedPath>(store, ctxElt.toDerivedPath())); - auto builtContext = build(store, Realise::Outputs, installableContext); + auto builtContext = build(evalStore, store, Realise::Outputs, installableContext); res.program = resolveString(*store, unresolved.program, builtContext); if (!store->isInStore(res.program)) throw Error("app program '%s' is not in the Nix store", res.program); |