Merge pull request #272108 from nbraud/mpvScripts/occivink

mpvScripts.{blacklistExtensions, seekTo}: unstable-2022-10-02 → 2023-11-25
This commit is contained in:
Peder Bergebakken Sundt 2023-12-19 13:59:31 +01:00 committed by GitHub
commit e6cb452bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
{ lib
, fetchFromGitHub
, unstableGitUpdater
, buildLua
}:
@ -10,15 +11,16 @@ let
in stringAsChars (c: if isUpper c != null then "-${toLower c}" else c);
mkScript = name: args:
buildLua (lib.attrsets.recursiveUpdate rec {
let self = rec {
pname = camelToKebab name;
version = "unstable-2023-12-18";
src = fetchFromGitHub {
owner = "occivink";
repo = "mpv-scripts";
rev = "af360f332897dda907644480f785336bc93facf1";
hash = "sha256-KdCrUkJpbxxqmyUHksVVc8KdMn8ivJeUA2eerFZfEE8=";
rev = "f0426bd6b107b1f4b124552dae923b62f58ce3b6";
hash = "sha256-oag5lcDoezyNXs5EBr0r0UE3ikeftvbfxSzfbxV1Oy0=";
};
version = "unstable-2022-10-02";
passthru.updateScript = unstableGitUpdater {};
scriptPath = "scripts/${pname}.lua";
@ -27,19 +29,17 @@ let
license = licenses.unlicense;
maintainers = with maintainers; [ nicoo ];
};
} args);
# Sadly needed to make `common-updaters` work here
pos = builtins.unsafeGetAttrPos "version" self;
};
in buildLua (lib.attrsets.recursiveUpdate self args);
in
lib.mapAttrs (name: lib.makeOverridable (mkScript name)) {
# Usage: `pkgs.mpv.override { scripts = [ pkgs.mpvScripts.seekTo ]; }`
seekTo = {
meta.description = "Mpv script for seeking to a specific position";
outputHash = "sha256-3RlbtUivmeoR9TZ6rABiZSd5jd2lFv/8p/4irHMLshs=";
};
blacklistExtensions = {
meta.description = "Automatically remove playlist entries based on their extension.";
outputHash = "sha256-qw9lz8ofmvvh23F9aWLxiU4YofY+YflRETu+nxMhvVE=";
};
seekTo.meta.description = "Mpv script for seeking to a specific position";
blacklistExtensions.meta.description =
"Automatically remove playlist entries based on their extension.";
}