diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-04-07T14·01+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-04-07T14·01+0000 |
commit | c815aff21b668f5fe7bbd04086a988df51281840 (patch) | |
tree | 8532d7fab1ab916c99d9034cfa2167b73726aba4 /src/libstore/store.hh | |
parent | 57d023a184bdc2f30cd7052c157e43ba1bca8288 (diff) |
* `nix-store --add-fixed' to preload the outputs of fixed-output
derivations. This is mostly to simplify the implementation of nix-prefetch-{url, svn}, which now work properly in setuid installations. * Enforce valid store names in `nix-store --add / --add-fixed'.
Diffstat (limited to 'src/libstore/store.hh')
-rw-r--r-- | src/libstore/store.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/store.hh b/src/libstore/store.hh index 01a971404c5c..bcaea401e260 100644 --- a/src/libstore/store.hh +++ b/src/libstore/store.hh @@ -85,6 +85,8 @@ void assertStorePath(const Path & path); bool isInStore(const Path & path); bool isStorePath(const Path & path); +void checkStoreName(const string & name); + /* Chop off the parts after the top-level store name, e.g., /nix/store/abcd-foo/bar => /nix/store/abcd-foo. */ Path toStorePath(const Path & path); @@ -137,6 +139,13 @@ Path makeStorePath(const string & type, the resulting path. The resulting path is returned. */ Path addToStore(const Path & srcPath); +/* Like addToStore(), but for pre-adding the outputs of fixed-output + derivations. */ +Path addToStoreFixed(bool recursive, string hashAlgo, const Path & srcPath); + +Path makeFixedOutputPath(bool recursive, + string hashAlgo, Hash hash, string name); + /* Like addToStore, but the contents written to the output path is a regular file containing the given string. */ Path addTextToStore(const string & suffix, const string & s, |