2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitUpdater,
|
|
|
|
pkg-config,
|
|
|
|
glib,
|
|
|
|
mpv-unwrapped,
|
|
|
|
ffmpeg,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "mpv-mpris";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hoyon";
|
|
|
|
repo = "mpv-mpris";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-vZIO6ILatIWa9nJYOp4AMKwvaZLahqYWRLMDOizyBI0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
mpv-unwrapped
|
|
|
|
ffmpeg
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
2024-05-15 15:35:15 +00:00
|
|
|
substituteInPlace Makefile --replace-fail 'PKG_CONFIG =' 'PKG_CONFIG ?='
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
installFlags = [ "SCRIPTS_DIR=${placeholder "out"}/share/mpv/scripts" ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
# 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";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "MPRIS plugin for mpv";
|
|
|
|
homepage = "https://github.com/hoyon/mpv-mpris";
|
|
|
|
license = licenses.mit;
|
2020-05-15 21:57:56 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ ajs124 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/hoyon/mpv-mpris/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|