pkgs/mkScriptOverride: support for default name from path

This commit is contained in:
Wroclaw 2024-08-16 16:45:13 +02:00
parent 164ceef166
commit 26566f97dd

View file

@ -11,7 +11,9 @@
lib.hiPrio (stdenv.mkDerivation ( lib.hiPrio (stdenv.mkDerivation (
{ {
src = src; 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" ]; phases = [ "installPhase" "scriptOverridePhase" ];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall