mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Support Git repos in the Nix path
E.g. $ nix-build -I nixpkgs=git://github.com/NixOS/nixpkgs '<nixpkgs>' -A hello This is not extremely useful yet because you can't specify a branch/revision.
This commit is contained in:
parent
38539b943a
commit
d8bf0d4859
5 changed files with 71 additions and 37 deletions
|
@ -1082,6 +1082,12 @@ bool statusOk(int status)
|
|||
}
|
||||
|
||||
|
||||
bool hasPrefix(const string & s, const string & suffix)
|
||||
{
|
||||
return s.compare(0, suffix.size(), suffix) == 0;
|
||||
}
|
||||
|
||||
|
||||
bool hasSuffix(const string & s, const string & suffix)
|
||||
{
|
||||
return s.size() >= suffix.size() && string(s, s.size() - suffix.size()) == suffix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue