about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-06T12·54+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-06T12·54+0200
commit6519f06f397448c3f1677e87e385012e2507164b (patch)
treed09ef46afe5e8a60b84def346a14b696ecdf1a3d /src/libexpr/parser.y
parent0705d04dfab60b0c98fbd170b9cc3fcd073918bb (diff)
nix-env/nix-instantiate/nix-build: Support URIs
For instance, you can install Firefox from a specific Nixpkgs revision
like this:

  $ nix-env -f https://github.com/NixOS/nixpkgs/archive/63def04891a0abc328b1b0b3a78ec02c58f48583.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
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index e3f2f09b20bd..26168b2ed420 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -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('=');