From 26566f97ddde1d717bd4d52b5bd278d2ea25d787 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Fri, 16 Aug 2024 16:45:13 +0200 Subject: [PATCH] pkgs/mkScriptOverride: support for default name from path --- pkgs/by-name/mk/mkScriptOverride/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/mk/mkScriptOverride/package.nix b/pkgs/by-name/mk/mkScriptOverride/package.nix index 6777a0c..e71d07c 100644 --- a/pkgs/by-name/mk/mkScriptOverride/package.nix +++ b/pkgs/by-name/mk/mkScriptOverride/package.nix @@ -11,7 +11,9 @@ lib.hiPrio (stdenv.mkDerivation ( { src = src; - name = "${src.name}-script-override"; + name = if lib.isDerivation src + then "${src.name}-script-override" + else "${builtins.baseNameOf src}-script-override"; phases = [ "installPhase" "scriptOverridePhase" ]; installPhase = '' runHook preInstall