Merge pull request #270916 from nbraud/mpvScripts/buildLua/strippedName
mpvScripts.buildLua: Strip `mpv-` from `pname` when inferring `scriptName`
This commit is contained in:
commit
a42aa9875a
@ -20,11 +20,17 @@ lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy
|
||||
, extraScripts ? []
|
||||
, ... }@args:
|
||||
let
|
||||
strippedName = with builtins;
|
||||
let groups = match "mpv[-_](.*)" pname; in
|
||||
if groups != null
|
||||
then head groups
|
||||
else pname
|
||||
;
|
||||
# either passthru.scriptName, inferred from scriptPath, or from pname
|
||||
scriptName = (args.passthru or {}).scriptName or (
|
||||
if args ? scriptPath
|
||||
then fileName args.scriptPath
|
||||
else "${pname}.lua"
|
||||
else "${strippedName}.lua"
|
||||
);
|
||||
scriptPath = args.scriptPath or "./${scriptName}";
|
||||
in {
|
||||
|
@ -17,8 +17,6 @@ buildLua rec {
|
||||
'youtube_dl_executable = "${lib.getBin yt-dlp}/bin/yt-dlp"',
|
||||
'';
|
||||
|
||||
scriptPath = "playlistmanager.lua";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mpv lua script to create and manage playlists";
|
||||
homepage = "https://github.com/jonniek/mpv-playlistmanager";
|
||||
|
@ -15,7 +15,6 @@ buildLua rec {
|
||||
hash = "sha256-yrcTxqpLnOI1Tq3khhflO3wzhyeTPuvKifyH5/P57Ns=";
|
||||
};
|
||||
|
||||
scriptPath = "quality-menu.lua";
|
||||
extraScripts = lib.optional oscSupport "quality-menu-osc.lua";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -11,8 +11,6 @@ buildLua {
|
||||
hash = "sha256-5u5WBvWOEydJrnr/vilEgW4+fxkxM6wNjb9Fyyxx/1c=";
|
||||
};
|
||||
|
||||
scriptPath = "thumbfast.lua";
|
||||
|
||||
passthru.extraWrapperArgs = [
|
||||
"--prefix" "PATH" ":" "${lib.getBin mpv-unwrapped}/bin"
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user