1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 nix-update-script,
6 # base build deps
7 meson,
8 pkg-config,
9 ninja,
10 # docs build deps
11 python3,
12 doxygen,
13 graphviz,
14 # GI build deps
15 gobject-introspection,
16 # runtime deps
17 glib,
18 systemd,
19 lua5_4,
20 pipewire,
21 # options
22 enableDocs ? true,
23 enableGI ? true,
24}:
25
26stdenv.mkDerivation rec {
27 pname = "wireplumber";
28 version = "0.5.10";
29
30 outputs = [
31 "out"
32 "dev"
33 ]
34 ++ lib.optional enableDocs "doc";
35
36 src = fetchFromGitLab {
37 domain = "gitlab.freedesktop.org";
38 owner = "pipewire";
39 repo = "wireplumber";
40 rev = version;
41 hash = "sha256-CZjVCy9FKTBO7C5f+vOejJyVjo2a5YoOKgqzH+w2k3w=";
42 };
43
44 nativeBuildInputs = [
45 meson
46 pkg-config
47 ninja
48 ]
49 ++ lib.optionals enableDocs [
50 graphviz
51 ]
52 ++ lib.optionals enableGI [
53 gobject-introspection
54 ]
55 ++ lib.optionals (enableDocs || enableGI) [
56 doxygen
57 (python3.pythonOnBuildForHost.withPackages (
58 ps:
59 with ps;
60 lib.optionals enableDocs [
61 sphinx
62 sphinx-rtd-theme
63 breathe
64 ]
65 ++ lib.optionals enableGI [ lxml ]
66 ))
67 ];
68
69 buildInputs = [
70 glib
71 systemd
72 lua5_4
73 pipewire
74 ];
75
76 mesonFlags = [
77 (lib.mesonBool "system-lua" true)
78 (lib.mesonEnable "elogind" false)
79 (lib.mesonEnable "doc" enableDocs)
80 (lib.mesonEnable "introspection" enableGI)
81 (lib.mesonBool "systemd-system-service" true)
82 (lib.mesonOption "systemd-system-unit-dir" "${placeholder "out"}/lib/systemd/system")
83 (lib.mesonOption "sysconfdir" "/etc")
84 ];
85
86 passthru.updateScript = nix-update-script { };
87
88 meta = with lib; {
89 description = "Modular session / policy manager for PipeWire";
90 homepage = "https://pipewire.org";
91 license = licenses.mit;
92 platforms = platforms.linux;
93 maintainers = with maintainers; [ k900 ];
94 };
95}