python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / bluetooth / blueman / default.nix
blob27d4f2d7f1affaa6857175c850ad930673578a22
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 }:
6 let
7   pythonPackages = python3Packages;
9 in stdenv.mkDerivation rec {
10   pname = "blueman";
11   version = "2.3.4";
13   src = fetchurl {
14     url = "https://github.com/blueman-project/blueman/releases/download/${version}/${pname}-${version}.tar.xz";
15     sha256 = "sha256-wgYzghQ38yydPRkOzXDR4vclXXSn1pefInEb3C5WAVI=";
16   };
18   nativeBuildInputs = [
19     gobject-introspection intltool pkg-config pythonPackages.cython
20     pythonPackages.wrapPython wrapGAppsHook
21   ];
23   buildInputs = [ bluez gtk3 pythonPackages.python librsvg
24                   gnome.adwaita-icon-theme iproute2 networkmanager ]
25                 ++ pythonPath
26                 ++ lib.optional withPulseAudio libpulseaudio;
28   postPatch = lib.optionalString withPulseAudio ''
29     sed -i 's,CDLL(",CDLL("${libpulseaudio.out}/lib/,g' blueman/main/PulseAudioUtils.py
30   '';
32   pythonPath = with pythonPackages; [ pygobject3 pycairo ];
34   propagatedUserEnvPkgs = [ obex_data_server ];
36   configureFlags = [
37     "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
38     "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
39     (lib.enableFeature withPulseAudio "pulseaudio")
40   ];
42   makeWrapperArgs = [
43     "--prefix PATH ':' ${lib.makeBinPath [ dnsmasq dhcp iproute2 ]}"
44     "--suffix PATH ':' ${lib.makeBinPath [ xdg-utils ]}"
45   ];
47   postFixup = ''
48     # This mimics ../../../development/interpreters/python/wrap.sh
49     wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
50     wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
51   '';
53   meta = with lib; {
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 ];
59   };