aboutsummaryrefslogtreecommitdiff
path: root/src/nix-env
diff options
context:
space:
mode:
authorShell Turner <cam.turn@gmail.com>2014-09-16 18:34:59 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-23 15:11:24 +0200
commitcf72a61af2975979bbfda773cc17ef617d61cdac (patch)
treef4366541fb32d3844ae2000a7247bac1257eb727 /src/nix-env
parent9dd54bc7bbc404e8e4513b712e0af9ac5b4439bd (diff)
Add --force-name support for --set in nix-env, to support nix-install-package --set
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index c24165da8..f5e8ee08c 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -700,6 +700,9 @@ static void opSet(Globals & globals, Strings opFlags, Strings opArgs)
DrvInfo & drv(elems.front());
+ if (globals.forceName != "")
+ drv.name = globals.forceName;
+
if (drv.queryDrvPath() != "") {
PathSet paths = singleton<PathSet>(drv.queryDrvPath());
printMissing(*store, paths);