about summary refs log tree commit diff
path: root/src/nix-env/nix-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/nix-env.cc')
-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 c24165da8f1d..f5e8ee08c42f 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);