1 { config, stdenv, lib, fetchurl, intltool, pkg-config, python3Packages, bluez, gtk3
2 , obex_data_server, xdg-utils, dnsmasq, dhcp, libappindicator, iproute2
3 , gnome, librsvg, wrapGAppsHook, gobject-introspection
4 , networkmanager, withPulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:
7 pythonPackages = python3Packages;
9 in stdenv.mkDerivation rec {
14 url = "https://github.com/blueman-project/blueman/releases/download/${version}/${pname}-${version}.tar.xz";
15 sha256 = "sha256-wgYzghQ38yydPRkOzXDR4vclXXSn1pefInEb3C5WAVI=";
19 gobject-introspection intltool pkg-config pythonPackages.cython
20 pythonPackages.wrapPython wrapGAppsHook
23 buildInputs = [ bluez gtk3 pythonPackages.python librsvg
24 gnome.adwaita-icon-theme iproute2 networkmanager ]
26 ++ lib.optional withPulseAudio libpulseaudio;
28 postPatch = lib.optionalString withPulseAudio ''
29 sed -i 's,CDLL(",CDLL("${libpulseaudio.out}/lib/,g' blueman/main/PulseAudioUtils.py
32 pythonPath = with pythonPackages; [ pygobject3 pycairo ];
34 propagatedUserEnvPkgs = [ obex_data_server ];
37 "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
38 "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
39 (lib.enableFeature withPulseAudio "pulseaudio")
43 "--prefix PATH ':' ${lib.makeBinPath [ dnsmasq dhcp iproute2 ]}"
44 "--suffix PATH ':' ${lib.makeBinPath [ xdg-utils ]}"
48 # This mimics ../../../development/interpreters/python/wrap.sh
49 wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
50 wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
54 homepage = "https://github.com/blueman-project/blueman";
55 description = "GTK-based Bluetooth Manager";
56 license = licenses.gpl3;
57 platforms = platforms.linux;
58 maintainers = with maintainers; [ abbradar ];