mpvScripts.mpvacious: Refactor with buildLua & upstream's install target

This commit is contained in:
nicoo 2023-10-18 11:46:47 +00:00
parent e8c0fde6b3
commit fc5965587a
2 changed files with 4 additions and 11 deletions

View File

@ -16,7 +16,7 @@ in lib.recurseIntoAttrs
mpris = callPackage ./mpris.nix { };
mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { inherit buildLua; };
mpv-webm = callPackage ./mpv-webm.nix { };
mpvacious = callPackage ./mpvacious.nix { };
mpvacious = callPackage ./mpvacious.nix { inherit buildLua; };
quality-menu = callPackage ./quality-menu.nix { inherit buildLua; };
simple-mpv-webui = callPackage ./simple-mpv-webui.nix { };
sponsorblock = callPackage ./sponsorblock.nix { };

View File

@ -1,12 +1,12 @@
{ lib
, stdenvNoCC
, buildLua
, fetchFromGitHub
, curl
, wl-clipboard
, xclip
}:
stdenvNoCC.mkDerivation rec {
buildLua rec {
pname = "mpvacious";
version = "0.24";
@ -26,23 +26,16 @@ stdenvNoCC.mkDerivation rec {
--replace "'xclip" "'${xclip}/bin/xclip"
'';
dontBuild = true;
installPhase = ''
runHook preInstall
rm -r .github
mkdir -p $out/share/mpv/scripts
cp -r . $out/share/mpv/scripts/mpvacious
make PREFIX=$out/share/mpv install
runHook postInstall
'';
passthru.scriptName = "mpvacious";
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 ];
};
}