From 9fa12fc2015c9cbc34bcf9d83e7396ba5dbc81a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 12 Dec 2012 16:01:46 +0100 Subject: Allow setting the profile location using $NIX_PROFILE Fixes #69. --- src/nix-env/nix-env.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index b57e54c758f6..68a3e89d8c7e 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -1350,6 +1350,9 @@ void run(Strings args) if (!op) throw UsageError("no operation specified"); + if (globals.profile == "") + globals.profile = getEnv("NIX_PROFILE", ""); + if (globals.profile == "") { Path profileLink = getHomeDir() + "/.nix-profile"; globals.profile = pathExists(profileLink) -- cgit 1.4.1