From 5a23451fd37a63a16b7270f1043973b4fb2159c4 Mon Sep 17 00:00:00 2001 From: Ken Micklas Date: Sat, 16 Jan 2021 10:59:52 -0500 Subject: [PATCH 1/2] maintainers: add kmicklas --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 50efa11c97c6..d376cbecf575 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4815,6 +4815,12 @@ github = "kmein"; githubId = 10352507; }; + kmicklas = { + email = "maintainer@kmicklas.com"; + name = "Ken Micklas"; + github = "kmicklas"; + githubId = 929096; + }; knairda = { email = "adrian@kummerlaender.eu"; name = "Adrian Kummerlaender"; From 6960160acb50275fa8d343243bd9ee4cd78c90e8 Mon Sep 17 00:00:00 2001 From: Ken Micklas Date: Sat, 16 Jan 2021 11:01:38 -0500 Subject: [PATCH 2/2] mpvScripts.mpvacious: init at 0.12 --- .../video/mpv/scripts/mpvacious.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/applications/video/mpv/scripts/mpvacious.nix diff --git a/pkgs/applications/video/mpv/scripts/mpvacious.nix b/pkgs/applications/video/mpv/scripts/mpvacious.nix new file mode 100644 index 000000000000..5bfcd2ac32c0 --- /dev/null +++ b/pkgs/applications/video/mpv/scripts/mpvacious.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitHub, curl, xclip }: + +stdenv.mkDerivation rec { + pname = "mpvacious"; + version = "0.12"; + + src = fetchFromGitHub { + owner = "Ajatt-Tools"; + repo = "mpvacious"; + rev = "v${version}"; + sha256 = "1xz4qh2ibfv03m3pfdasim9byvlm78wigx1linmih19vgg99vky2"; + }; + + postPatch = '' + substituteInPlace subs2srs.lua \ + --replace "'curl'" "'${curl}/bin/curl'" \ + --replace "xclip" "${xclip}/bin/xclip" + ''; + + dontBuild = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/mpv/scripts + cp subs2srs.lua $out/share/mpv/scripts + runHook postInstall + ''; + + passthru.scriptName = "subs2srs.lua"; + + meta = with lib; { + description = "Adds mpv keybindings to create Anki cards from movies and TV shows"; + homepage = "https://github.com/Ajatt-Tools/mpvacious"; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ kmicklas ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 355df6b465fb..482fdf1c5bcd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23610,6 +23610,7 @@ in autoload = callPackage ../applications/video/mpv/scripts/autoload.nix {}; convert = callPackage ../applications/video/mpv/scripts/convert.nix {}; mpris = callPackage ../applications/video/mpv/scripts/mpris.nix {}; + mpvacious = callPackage ../applications/video/mpv/scripts/mpvacious.nix {}; simple-mpv-webui = callPackage ../applications/video/mpv/scripts/simple-mpv-webui.nix {}; sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {}; };