diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix index c7f510253f94..0027fa722596 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/buildLua.nix @@ -2,7 +2,6 @@ , stdenvNoCC }: let - inherit (lib) hasPrefix hasSuffix removeSuffix; escapedList = with lib; concatMapStringsSep " " (s: "'${escape [ "'" ] s}'"); fileName = pathStr: lib.last (lib.splitString "/" pathStr); scriptsDir = "$out/share/mpv/scripts"; @@ -37,6 +36,9 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy dontBuild = true; preferLocalBuild = true; + # Prevent `patch` from emitting `.orig` files (that end up in the output) + patchFlags = [ "--no-backup-if-mismatch" "-p1" ]; + outputHashMode = "recursive"; installPhase = '' runHook preInstall @@ -52,7 +54,7 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy exit 1 } mkdir -p "${scriptsDir}" - cp -a "${scriptPath}" "${scriptsDir}/${lib.removeSuffix ".lua" scriptName}" + cp -a "${scriptPath}" "${scriptsDir}/${scriptName}" else install -m644 -Dt "${scriptsDir}" \ ${escapedList ([ scriptPath ] ++ extraScripts)} |