mpvScripts.mpris: use patch sent upstream for make DESTDIR=

Make sure mpris.so is stripped.
mpv-with-scripts: use a standard location for scripts in $out.
mpvScripts.convert: install to the new location of mpv scripts.
Replaced gobject-introspection dependency with glib.
This commit is contained in:
Doron Behar
2020-05-06 10:30:20 +03:00
parent f388ca8ac8
commit b0ac6a009b
3 changed files with 22 additions and 9 deletions
+16 -6
View File
@@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, pkgconfig, gobject-introspection, mpv }:
{ stdenv, fetchpatch, fetchFromGitHub, pkgconfig, glib, mpv }:
stdenv.mkDerivation rec {
name = "mpv-mpris-${version}.so";
pname = "mpv-mpris";
version = "0.5";
src = fetchFromGitHub {
@@ -10,14 +10,24 @@ stdenv.mkDerivation rec {
rev = version;
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 ];
buildInputs = [ gobject-introspection mpv ];
buildInputs = [ glib mpv ];
installPhase = ''
cp mpris.so $out
'';
installFlags = [ "SCRIPTS_DIR=$(out)/share/mpv/scripts" ];
# 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; {
description = "MPRIS plugin for mpv";