about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-01-05T16·26+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-01-05T16·26+0000
commit4a373a3e9ac07a2d4c43d495c0a44883106ecfde (patch)
tree27f4e22f8d3573bfe1ebba1acfa2e46a735fecee /src/libutil/util.hh
parentf83c5e3e5f3e6b33c095d6559a4b3cd5922e88ce (diff)
* Implemented Eelco V.'s `nix-env -I' command to specify the default
  path of the Nix expression to be used with the import, upgrade, and
  query commands.  For instance,

  $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix

  $ nix-env --query --available   [aka -qa]
  sylpheed-0.9.7
  bison-1.875
  pango-1.2.5
  subversion-0.35.1
  ...

  $ nix-env -i sylpheed

  $ nix-env -u subversion

  There can be only one default at a time.

* If the path to a Nix expression is a symlink, follow the symlink
  prior to resolving relative path references in the expression.

Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r--src/libutil/util.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index 4126381d9e96..5d27ac1bddb4 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -73,6 +73,10 @@ string baseNameOf(const Path & path);
 /* Return true iff the given path exists. */
 bool pathExists(const Path & path);
 
+/* Read the contents (target) of a symbolic link.  The result is not
+   in any way canonicalised. */
+Path readLink(const Path & path);
+
 /* Read the contents of a directory.  The entries `.' and `..' are
    removed. */
 Strings readDirectory(const Path & path);