81047829ea
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
83 lines
1.7 KiB
Nix
83 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitLab
|
|
, fetchpatch
|
|
, 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";
|
|
version = "0.4.8";
|
|
|
|
outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.freedesktop.org";
|
|
owner = "pipewire";
|
|
repo = "wireplumber";
|
|
rev = version;
|
|
sha256 = "sha256-xwfggrjKHh5mZdvH6dKqQo6o1ltxuYdjoGYaWl31C/Y=";
|
|
};
|
|
|
|
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}"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|