1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

nix-env/nix-instantiate/nix-build: Support URIs

For instance, you can install Firefox from a specific Nixpkgs revision
like this:

  $ nix-env -f 63def04891.tar.gz -iA firefox

Or build a package from the latest nixpkgs-unstable channel:

  $ nix-build https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz -A hello
This commit is contained in:
Eelco Dolstra 2015-05-06 14:54:31 +02:00
parent 0705d04dfa
commit 6519f06f39
5 changed files with 19 additions and 14 deletions

View file

@ -601,15 +601,6 @@ Expr * EvalState::parseExprFromString(const string & s, const Path & basePath)
}
bool isUri(const string & s)
{
size_t pos = s.find("://");
if (pos == string::npos) return false;
string scheme(s, 0, pos);
return scheme == "http" || scheme == "https";
}
void EvalState::addToSearchPath(const string & s, bool warn)
{
size_t pos = s.find('=');