From fbc434ee4c39e7516f3634371442899864786584 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Feb 2005 14:32:44 +0000 Subject: * `nix-store -qb' to query derivation environment bindings. Useful for finding build-time dependencies (possibly after a build). E.g., $ nix-store -qb aterm $(nix-store -qd $(which strc)) /nix/store/jw7c7s65n1gwhxpn35j9rgcci6ilzxym-aterm-2.3.1 * Arguments to nix-store can be files within store objects, e.g., /nix/store/jw7c...-aterm-2.3.1/bin/baffle. * Idem for garbage collector roots. --- src/libstore/store.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore/store.hh') diff --git a/src/libstore/store.hh b/src/libstore/store.hh index 95c738ed1..1f2b630e1 100644 --- a/src/libstore/store.hh +++ b/src/libstore/store.hh @@ -63,8 +63,13 @@ void registerValidPath(const Transaction & txn, /* Throw an exception if `path' is not directly in the Nix store. */ void assertStorePath(const Path & path); +bool isInStore(const Path & path); bool isStorePath(const Path & path); +/* 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); + /* "Fix", or canonicalise, the meta-data of the files in a store path after it has been built. In particular: - the last modification date on each file is set to 0 (i.e., -- cgit v1.2.3