2021-01-17 02:09:27 +00:00
|
|
|
{ lib, stdenv, fetchpatch, fetchFromGitHub, pkg-config, glib, mpv-unwrapped }:
|
2018-03-10 11:09:03 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-03 19:05:15 +01:00
|
|
|
pname = "mpv-mpris";
|
2020-04-27 13:22:38 +01:00
|
|
|
version = "0.5";
|
2018-03-10 11:09:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hoyon";
|
|
|
|
repo = "mpv-mpris";
|
2018-08-10 20:28:53 +01:00
|
|
|
rev = version;
|
2020-04-27 13:22:38 +01:00
|
|
|
sha256 = "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk";
|
2018-03-10 11:09:03 +00:00
|
|
|
};
|
2020-05-03 19:05:15 +01:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
2018-03-10 11:09:03 +00:00
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-03-10 11:09:03 +00:00
|
|
|
|
2020-10-17 01:18:07 +01:00
|
|
|
buildInputs = [ glib mpv-unwrapped ];
|
2018-03-10 11:09:03 +00:00
|
|
|
|
2020-05-03 19:05:15 +01:00
|
|
|
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";
|
2018-03-10 11:09:03 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-03-10 11:09:03 +00:00
|
|
|
description = "MPRIS plugin for mpv";
|
2020-02-10 17:55:23 +00:00
|
|
|
homepage = "https://github.com/hoyon/mpv-mpris";
|
2018-03-10 11:09:03 +00:00
|
|
|
license = licenses.mit;
|
2020-05-03 19:13:15 +01:00
|
|
|
platforms = platforms.linux;
|
2018-03-10 11:09:03 +00:00
|
|
|
maintainers = with maintainers; [ jfrankenau ];
|
|
|
|
};
|
|
|
|
}
|