at 23.05-pre 1.2 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 8 disabled = isPyPy; 9 format = "other"; 10 outputs = [ "out" "dev" ]; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"; 15 }; 16 17 patches = [ 18 ./fix-includedir.patch 19 ]; 20 21 preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) '' 22 MACOSX_DEPLOYMENT_TARGET=10.16 23 ''; 24 25 configureFlags = [ 26 "PYTHON=${python.pythonForBuild.interpreter}" 27 ]; 28 29 nativeBuildInputs = [ pkg-config ]; 30 buildInputs = [ dbus dbus-glib ] 31 # My guess why it's sometimes trying to -lncurses. 32 # It seems not to retain the dependency anyway. 33 ++ lib.optional (! python ? modules) ncurses; 34 35 doCheck = isPy3k; 36 checkInputs = [ dbus.out pygobject3 ]; 37 38 postInstall = '' 39 cp -r dbus_python.egg-info $out/${python.sitePackages}/ 40 ''; 41 42 meta = with lib; { 43 description = "Python DBus bindings"; 44 license = licenses.mit; 45 platforms = dbus.meta.platforms; 46 maintainers = with maintainers; [ ]; 47 }; 48}