about summary refs log tree commit diff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-11-29T16·18+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-11-29T16·18+0000
commit633518628f48fb9c06bfd570eeca6f62696aba05 (patch)
tree33313707305a011265e30d4670264a9b7979d298 /src/libstore/store-api.hh
parent12d0a1eb753567bb2083aadb4ee3d325d3f29c70 (diff)
* nix-env -e: support uninstalling by path, so that one can say
    $ nix-env -e $(which firefox)

  or

    $ nix-env -e /nix/store/nywzlygrkfcgz7dfmhm5xixlx1l0m60v-pan-0.132

* nix-env -i: if an argument contains a slash anywhere, treat it as a
  path and follow it through symlinks into the Nix store.  This allows
  things like

    $ nix-build -A firefox
    $ nix-env -i ./result

* nix-env -q/-i/-e: don't complain when the `*' selector doesn't match
  anything.  In particular, `nix-env -q \*' doesn't fail anymore on an
  empty profile.

Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index f133302b2f84..e44259ddaf09 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -174,11 +174,21 @@ 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);
 
 
+/* Follow symlinks until we end up with a path in the Nix store. */
+Path followLinksToStore(const Path & path);
+
+
+/* Same as followLinksToStore(), but apply toStorePath() to the
+   result. */
+Path followLinksToStorePath(const Path & path);
+
+
 /* Constructs a unique store path name. */
 Path makeStorePath(const string & type,
     const Hash & hash, const string & suffix);