nixpkgs/pkgs/by-name/pl/playerctl/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

55 lines
1.2 KiB
Nix

{ lib
, stdenv
, buildPackages
, docbook_xsl
, fetchFromGitHub
, glib
, gobject-introspection
, gtk-doc
, meson
, mesonEmulatorHook
, ninja
, pkg-config
, withDocs ? stdenv.hostPlatform.emulatorAvailable buildPackages
}:
stdenv.mkDerivation rec {
pname = "playerctl";
version = "2.4.1";
src = fetchFromGitHub {
owner = "acrisci";
repo = "playerctl";
rev = "v${version}";
sha256 = "sha256-OiGKUnsKX0ihDRceZoNkcZcEAnz17h2j2QUOSVcxQEY=";
};
nativeBuildInputs = [
docbook_xsl
gobject-introspection
gtk-doc
meson
ninja
pkg-config
] ++ lib.optionals (withDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
buildInputs = [ glib ];
mesonFlags = [
(lib.mesonBool "bash-completions" true)
(lib.mesonBool "zsh-completions" true)
(lib.mesonBool "gtk-doc" withDocs)
];
meta = with lib; {
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;
mainProgram = "playerctl";
};
}