nixpkgs/pkgs/development/libraries/pipewire/wireplumber.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
1.8 KiB
Nix
Raw Normal View History

2021-12-13 15:00:06 +00:00
{ lib
, stdenv
, fetchFromGitLab
, nix-update-script
, # base build deps
meson
, pkg-config
, ninja
, # docs build deps
python3
, doxygen
, graphviz
, # GI build deps
gobject-introspection
, # runtime deps
glib
, systemd
, lua5_4
, pipewire
, # options
enableDocs ? true
, enableGI ? stdenv.hostPlatform == stdenv.buildPlatform
}:
let
mesonEnableFeature = b: if b then "enabled" else "disabled";
in
stdenv.mkDerivation rec {
pname = "wireplumber";
2022-05-10 14:45:42 +00:00
version = "0.4.10";
2021-12-13 15:00:06 +00:00
outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "wireplumber";
rev = version;
2022-05-10 14:45:42 +00:00
sha256 = "sha256-Z5Uqjw05SdEU9bGLuhdS+hDv7Fgqx4oW92k4AG1p3Ug=";
2021-12-13 15:00:06 +00:00
};
nativeBuildInputs = [
meson
pkg-config
ninja
] ++ lib.optionals enableDocs [
graphviz
] ++ lib.optionals enableGI [
gobject-introspection
] ++ lib.optionals (enableDocs || enableGI) [
doxygen
(python3.withPackages (ps: with ps;
lib.optionals enableDocs [ sphinx sphinx_rtd_theme breathe ] ++
lib.optionals enableGI [ lxml ]
))
];
buildInputs = [
glib
systemd
lua5_4
pipewire
];
mesonFlags = [
"-Dsystem-lua=true"
"-Delogind=disabled"
"-Ddoc=${mesonEnableFeature enableDocs}"
"-Dintrospection=${mesonEnableFeature enableGI}"
2022-02-20 07:00:45 +00:00
"-Dsystemd-system-service=true"
"-Dsystemd-system-unit-dir=${placeholder "out"}/lib/systemd/system"
"-Dsysconfdir=/etc"
2021-12-13 15:00:06 +00:00
];
passthru.updateScript = nix-update-script {
attrPath = pname;
};
meta = with lib; {
description = "A modular session / policy manager for PipeWire";
homepage = "https://pipewire.org";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ k900 ];
};
}