* Change extension .store' to .drv'.
* Re-enable `nix-store --query --requisites'.
This commit is contained in:
parent
863dcff6c5
commit
06c77bf7a8
12 changed files with 120 additions and 139 deletions
|
|
@ -12,11 +12,10 @@ Hash hashTerm(ATerm t)
|
|||
}
|
||||
|
||||
|
||||
Path writeTerm(ATerm t, const string & suffix)
|
||||
Path writeDerivation(const Derivation & drv, const string & name)
|
||||
{
|
||||
char * s = ATwriteToString(t);
|
||||
if (!s) throw Error("cannot print aterm");
|
||||
return addTextToStore(suffix + ".store", string(s));
|
||||
return addTextToStore(name + drvExtension,
|
||||
atPrint(unparseDerivation(drv)));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -133,3 +132,11 @@ ATerm unparseDerivation(const Derivation & drv)
|
|||
ATreverse(args),
|
||||
ATreverse(env));
|
||||
}
|
||||
|
||||
|
||||
bool isDerivation(const string & fileName)
|
||||
{
|
||||
return
|
||||
fileName.size() >= drvExtension.size() &&
|
||||
string(fileName, fileName.size() - drvExtension.size()) == drvExtension;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue