mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Allow URLs in the Nix search path
E.g. to install "hello" from the latest Nixpkgs:
$ nix-build '<nixpkgs>' -A hello -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz
Or to install a specific version of NixOS:
$ nixos-rebuild switch -I nixpkgs=63def04891
.tar.gz
This commit is contained in:
parent
35d30d67eb
commit
9451ef3731
6 changed files with 123 additions and 99 deletions
|
@ -1423,6 +1423,8 @@ int main(int argc, char * * argv)
|
|||
|
||||
if (!op) throw UsageError("no operation specified");
|
||||
|
||||
store = openStore();
|
||||
|
||||
globals.state = std::shared_ptr<EvalState>(new EvalState(searchPath));
|
||||
globals.state->repair = repair;
|
||||
|
||||
|
@ -1441,8 +1443,6 @@ int main(int argc, char * * argv)
|
|||
: canonPath(settings.nixStateDir + "/profiles/default");
|
||||
}
|
||||
|
||||
store = openStore();
|
||||
|
||||
op(globals, opFlags, opArgs);
|
||||
|
||||
globals.state->printStats();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue