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(drv.queryDrvPath()); printMissing(*store, paths);