2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPackages
|
|
|
|
, docbook_xsl
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk-doc
|
|
|
|
, meson
|
|
|
|
, mesonEmulatorHook
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, withDocs ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "playerctl";
|
2021-09-26 12:46:18 +00:00
|
|
|
version = "2.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "acrisci";
|
|
|
|
repo = "playerctl";
|
|
|
|
rev = "v${version}";
|
2021-09-26 12:46:18 +00:00
|
|
|
sha256 = "sha256-OiGKUnsKX0ihDRceZoNkcZcEAnz17h2j2QUOSVcxQEY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
docbook_xsl
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
] ++ lib.optionals (withDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
|
|
mesonEmulatorHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ glib ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
mesonFlags = [
|
2024-09-19 14:19:46 +00:00
|
|
|
(lib.mesonBool "bash-completions" true)
|
|
|
|
(lib.mesonBool "zsh-completions" true)
|
2023-10-09 19:29:22 +00:00
|
|
|
(lib.mesonBool "gtk-doc" withDocs)
|
|
|
|
];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line utility and library for controlling media players that implement MPRIS";
|
|
|
|
homepage = "https://github.com/acrisci/playerctl";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ puffnfresh ];
|
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "playerctl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|