From 055608227f5a003825a905b0eb2aea39cba5ca16 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 17 Sep 2007 16:08:24 +0000 Subject: * nix-env: allow ~/.nix-defexpr to be a directory. If it is, then the Nix expressions in that directory are combined into an attribute set {file1 = import file1; file2 = import file2; ...}, i.e. each Nix expression is an attribute with the file name as the attribute name. Also recurses into directories. * nix-env: removed the "--import" (-I) option which set the ~/.nix-defexpr symlink. * nix-channel: don't use "nix-env --import", instead symlink ~/.nix-defexpr/channels. So finally nix-channel --update doesn't override any default Nix expressions but combines with them. This means that you can have (say) a local Nixpkgs SVN tree and use it as a default for nix-env: $ ln -s .../path-to-nixpkgs-tree ~/.nix-defexpr/nixpkgs_svn and be subscribed to channels (including Nixpkgs) at the same time. (If there is any ambiguity, the -A flag can be used to disambiguate, e.g. "nix-env -i -A nixpkgs_svn.pan".) --- src/libexpr/get-drvs.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libexpr') diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index d2d01072f..6fa9b3f21 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -171,8 +171,8 @@ static void getDerivations(EvalState & state, Expr e, ATermMap drvMap(ATgetLength(es)); queryAllAttrs(e, drvMap); - /* !!! undocumented hackery to support - corepkgs/channels/unpack.sh. */ + /* !!! undocumented hackery to support combining channels in + nix-env.cc. */ Expr e2 = drvMap.get(toATerm("_combineChannels")); bool combineChannels = e2 && evalBool(state, e2); -- cgit v1.2.3