pythonPackages.dbus-python: fix includedir in pkg-config

This commit is contained in:
Jan Tojnar 2019-03-03 02:34:08 +01:00
parent 1eab40211e
commit c28848a3b3
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
3 changed files with 15 additions and 3 deletions

View File

@ -6,12 +6,16 @@ if isPyPy then throw "dbus-python not supported for interpreter ${python.executa
version = "1.2.4";
format = "other";
outputs = [ "out" "dev" "doc" ];
src = fetchurl {
url = "http://dbus.freedesktop.org/releases/dbus-python/${pname}-${version}.tar.gz";
sha256 = "1k7rnaqrk7mdkg0k6n2jn3d1mxsl7s3i07g5a8va5yvl3y3xdwg2";
};
postPatch = "patchShebangs .";
patches = [
./fix-includedir.patch
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dbus dbus-glib ]

View File

@ -0,0 +1,8 @@
--- a/dbus-python.pc.in
+++ b/dbus-python.pc.in
@@ -9,4 +9,4 @@
Description: Python bindings for D-Bus
Requires: dbus-1 >= 1.0
Version: @VERSION@
-Cflags: -I${includedir}
+Cflags: -I${includedir}/dbus-1.0

View File

@ -18,9 +18,9 @@ buildPythonPackage rec {
propagatedBuildInputs = [ python.pkgs.dbus-python ];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl) -I${python.pkgs.dbus-python}/include/dbus-1.0 $NIX_CFLAGS_COMPILE"
export NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl) -I${stdenv.lib.getDev python.pkgs.dbus-python}/include/dbus-1.0 $NIX_CFLAGS_COMPILE"
'';
preBuild = "${python.interpreter} setup.py build_ext";
installPhase= "${python.interpreter} setup.py install --prefix=$out";