Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 876 B view raw
1{ lib, fetchurl, mkPythonDerivation, python, pkgconfig, dbus, dbus_glib, dbus_tools, isPyPy 2, ncurses, pygobject3 }: 3 4if isPyPy then throw "dbus-python not supported for interpreter ${python.executable}" else mkPythonDerivation rec { 5 name = "dbus-python-1.2.4"; 6 7 src = fetchurl { 8 url = "http://dbus.freedesktop.org/releases/dbus-python/${name}.tar.gz"; 9 sha256 = "1k7rnaqrk7mdkg0k6n2jn3d1mxsl7s3i07g5a8va5yvl3y3xdwg2"; 10 }; 11 12 postPatch = "patchShebangs ."; 13 14 buildInputs = [ pkgconfig dbus dbus_glib ] 15 ++ lib.optionals doCheck [ dbus_tools pygobject3 ] 16 # My guess why it's sometimes trying to -lncurses. 17 # It seems not to retain the dependency anyway. 18 ++ lib.optional (! python ? modules) ncurses; 19 20 doCheck = true; 21 22 meta = { 23 description = "Python DBus bindings"; 24 license = lib.licenses.mit; 25 platforms = dbus.meta.platforms; 26 }; 27}