From d8bf0d4859e28ddd23401fbe89f4e528aa09ddb3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Apr 2016 21:04:40 +0200 Subject: Support Git repos in the Nix path E.g. $ nix-build -I nixpkgs=git://github.com/NixOS/nixpkgs '' -A hello This is not extremely useful yet because you can't specify a branch/revision. --- src/libutil/util.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 6e5ab55e31d7..f3f0f92a0aaa 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -333,6 +333,10 @@ template bool string2Float(const string & s, N & n) } +/* Return true iff `s' starts with `prefix'. */ +bool hasPrefix(const string & s, const string & prefix); + + /* Return true iff `s' ends in `suffix'. */ bool hasSuffix(const string & s, const string & suffix); -- cgit 1.4.1