Loading pkgs/applications/video/mpv/scripts/buildLua.nix +7 −4 Original line number Diff line number Diff line Loading @@ -2,7 +2,10 @@ , stdenvNoCC }: let escapedList = with lib; concatMapStringsSep " " (s: "'${escape [ "'" ] s}'"); # Escape strings for embedding in shell scripts escaped = s: "'${lib.escape [ "'" ] s}'"; escapedList = lib.concatMapStringsSep " " escaped; fileName = pathStr: lib.last (lib.splitString "/" pathStr); scriptsDir = "$out/share/mpv/scripts"; Loading Loading @@ -50,14 +53,14 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy } [ ${with builtins; toString (length extraScripts)} -eq 0 ] || { echo "mpvScripts.buildLua does not support 'extraScripts'" \ "when 'scriptPath' is a directory" "when 'scriptPath' is a directory" >&2 exit 1 } mkdir -p "${scriptsDir}" cp -a "${scriptPath}" "${scriptsDir}/${scriptName}" else install -m644 -Dt "${scriptsDir}" \ ${escapedList ([ scriptPath ] ++ extraScripts)} install -m644 -Dt "${scriptsDir}" ${escaped scriptPath} ${lib.optionalString (extraScripts != []) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''} fi runHook postInstall Loading pkgs/applications/video/mpv/scripts/cutter.nix +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ buildLua { extraScripts = [ "c_concat.sh" ]; postInstall = '' chmod 0755 $out/share/mpv/scripts/c_concat.sh wrapProgram $out/share/mpv/scripts/c_concat.sh \ --run "mkdir -p ~/.config/mpv/cutter/" ''; Loading pkgs/applications/video/mpv/scripts/sponsorblock.nix +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ buildLua { --replace 'mp.find_config_file("scripts")' "\"$out/share/mpv/scripts\"" ''; postInstall = "cp -a sponsorblock_shared $out/share/mpv/scripts/"; extraScripts = [ "sponsorblock_shared" ]; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; Loading Loading
pkgs/applications/video/mpv/scripts/buildLua.nix +7 −4 Original line number Diff line number Diff line Loading @@ -2,7 +2,10 @@ , stdenvNoCC }: let escapedList = with lib; concatMapStringsSep " " (s: "'${escape [ "'" ] s}'"); # Escape strings for embedding in shell scripts escaped = s: "'${lib.escape [ "'" ] s}'"; escapedList = lib.concatMapStringsSep " " escaped; fileName = pathStr: lib.last (lib.splitString "/" pathStr); scriptsDir = "$out/share/mpv/scripts"; Loading Loading @@ -50,14 +53,14 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy } [ ${with builtins; toString (length extraScripts)} -eq 0 ] || { echo "mpvScripts.buildLua does not support 'extraScripts'" \ "when 'scriptPath' is a directory" "when 'scriptPath' is a directory" >&2 exit 1 } mkdir -p "${scriptsDir}" cp -a "${scriptPath}" "${scriptsDir}/${scriptName}" else install -m644 -Dt "${scriptsDir}" \ ${escapedList ([ scriptPath ] ++ extraScripts)} install -m644 -Dt "${scriptsDir}" ${escaped scriptPath} ${lib.optionalString (extraScripts != []) ''cp -at "${scriptsDir}/" ${escapedList extraScripts}''} fi runHook postInstall Loading
pkgs/applications/video/mpv/scripts/cutter.nix +0 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ buildLua { extraScripts = [ "c_concat.sh" ]; postInstall = '' chmod 0755 $out/share/mpv/scripts/c_concat.sh wrapProgram $out/share/mpv/scripts/c_concat.sh \ --run "mkdir -p ~/.config/mpv/cutter/" ''; Loading
pkgs/applications/video/mpv/scripts/sponsorblock.nix +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ buildLua { --replace 'mp.find_config_file("scripts")' "\"$out/share/mpv/scripts\"" ''; postInstall = "cp -a sponsorblock_shared $out/share/mpv/scripts/"; extraScripts = [ "sponsorblock_shared" ]; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; Loading