Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 34 lines 975 B view raw
1{ lib, fetchurl, buildPythonPackage, python, pkgconfig, dbus, dbus-glib, isPyPy 2, ncurses, pygobject3 }: 3 4if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else buildPythonPackage rec { 5 pname = "dbus-python"; 6 version = "1.2.4"; 7 format = "other"; 8 9 outputs = [ "out" "dev" "doc" ]; 10 11 src = fetchurl { 12 url = "https://dbus.freedesktop.org/releases/dbus-python/${pname}-${version}.tar.gz"; 13 sha256 = "1k7rnaqrk7mdkg0k6n2jn3d1mxsl7s3i07g5a8va5yvl3y3xdwg2"; 14 }; 15 16 patches = [ 17 ./fix-includedir.patch 18 ]; 19 20 nativeBuildInputs = [ pkgconfig ]; 21 buildInputs = [ dbus dbus-glib ] 22 # My guess why it's sometimes trying to -lncurses. 23 # It seems not to retain the dependency anyway. 24 ++ lib.optional (! python ? modules) ncurses; 25 26 doCheck = true; 27 checkInputs = [ dbus.out pygobject3 ]; 28 29 meta = { 30 description = "Python DBus bindings"; 31 license = lib.licenses.mit; 32 platforms = dbus.meta.platforms; 33 }; 34}