Merge pull request #86124 from doronbehar/update-mpv-mpris

mpvScripts.mpris: 0.4 -> 0.5
This commit is contained in:
Jörg Thalheim 2020-05-06 10:36:40 +01:00 committed by GitHub
commit e3d1f2c8b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 12 deletions

View File

@ -2,7 +2,8 @@
, yad, mkvtoolnix-cli, libnotify }: , yad, mkvtoolnix-cli, libnotify }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "mpv-convert-script-2016-03-18.lua"; pname = "mpv-convert-script";
version = "2016-03-18";
src = fetchgit { src = fetchgit {
url = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0"; url = "https://gist.github.com/Zehkul/25ea7ae77b30af959be0";
rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d"; rev = "f95cee43e390e843a47e8ec9d1711a12a8cd343d";
@ -24,8 +25,10 @@ stdenv.mkDerivation {
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
cp convert_script.lua $out mkdir -p $out/share/mpv/scripts
cp convert_script.lua $out/share/mpv/scripts
''; '';
passthru.scriptName = "convert_script.lua";
meta = { meta = {
description = "Convert parts of a video while you are watching it in mpv"; description = "Convert parts of a video while you are watching it in mpv";

View File

@ -1,28 +1,39 @@
{ stdenv, fetchFromGitHub, pkgconfig, gobject-introspection, mpv }: { stdenv, fetchpatch, fetchFromGitHub, pkgconfig, glib, mpv }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mpv-mpris-${version}.so"; pname = "mpv-mpris";
version = "0.4"; version = "0.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hoyon"; owner = "hoyon";
repo = "mpv-mpris"; repo = "mpv-mpris";
rev = version; rev = version;
sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"; sha256 = "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk";
}; };
patches = [
# Enables to "make SCRIPTS_DIR=... install" https://github.com/hoyon/mpv-mpris/pull/38
(fetchpatch {
url = "https://github.com/hoyon/mpv-mpris/commit/f1482350868bf20e4575f923943ec998469b255e.patch";
sha256 = "1lqy867wpmj6hv3zgi6g679a7x3dv5skpw24hwd05b28galnyd4l";
})
];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gobject-introspection mpv ]; buildInputs = [ glib mpv ];
installPhase = '' installFlags = [ "SCRIPTS_DIR=$(out)/share/mpv/scripts" ];
cp mpris.so $out
''; # Otherwise, the shared object isn't `strip`ped. See:
# https://discourse.nixos.org/t/debug-why-a-derivation-has-a-reference-to-gcc/7009
stripDebugList = [ "share/mpv/scripts" ];
passthru.scriptName = "mpris.so";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "MPRIS plugin for mpv"; description = "MPRIS plugin for mpv";
homepage = "https://github.com/hoyon/mpv-mpris"; homepage = "https://github.com/hoyon/mpv-mpris";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau ]; maintainers = with maintainers; [ jfrankenau ];
}; };
} }

View File

@ -9,6 +9,6 @@ symlinkJoin {
postBuild = '' postBuild = ''
wrapProgram $out/bin/mpv \ wrapProgram $out/bin/mpv \
--add-flags "${stdenv.lib.concatMapStringsSep " " (x: "--script=" + x) scripts}" --add-flags "${stdenv.lib.concatMapStringsSep " " (x: "--script=${x}/share/mpv/scripts/${x.scriptName}") scripts}"
''; '';
} }

View File

@ -20749,7 +20749,7 @@ in
mpv-with-scripts = callPackage ../applications/video/mpv/wrapper.nix { }; mpv-with-scripts = callPackage ../applications/video/mpv/wrapper.nix { };
mpvScripts = { mpvScripts = recurseIntoAttrs {
convert = callPackage ../applications/video/mpv/scripts/convert.nix {}; convert = callPackage ../applications/video/mpv/scripts/convert.nix {};
mpris = callPackage ../applications/video/mpv/scripts/mpris.nix {}; mpris = callPackage ../applications/video/mpv/scripts/mpris.nix {};
}; };