nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 44 lines 1.1 kB view raw
1{ lib, stdenv, fetchPypi, buildPythonPackage, python, pkg-config, dbus, dbus-glib, isPyPy 2, ncurses, pygobject3, isPy3k }: 3 4buildPythonPackage rec { 5 pname = "dbus-python"; 6 version = "1.2.18"; 7 format = "other"; 8 9 outputs = [ "out" "dev" ]; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"; 14 }; 15 16 patches = [ 17 ./fix-includedir.patch 18 ]; 19 20 disabled = isPyPy; 21 22 preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' 23 MACOSX_DEPLOYMENT_TARGET=10.16 24 '' else null; 25 26 configureFlags = [ 27 "PYTHON=${python.pythonForBuild.interpreter}" 28 ]; 29 30 nativeBuildInputs = [ pkg-config ]; 31 buildInputs = [ dbus dbus-glib ] 32 # My guess why it's sometimes trying to -lncurses. 33 # It seems not to retain the dependency anyway. 34 ++ lib.optional (! python ? modules) ncurses; 35 36 doCheck = isPy3k; 37 checkInputs = [ dbus.out pygobject3 ]; 38 39 meta = { 40 description = "Python DBus bindings"; 41 license = lib.licenses.mit; 42 platforms = dbus.meta.platforms; 43 }; 44}