From c28848a3b3b15417290fbfa7f3ea950b43920fad Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Mar 2019 02:34:08 +0100 Subject: [PATCH] pythonPackages.dbus-python: fix includedir in pkg-config --- pkgs/development/python-modules/dbus/default.nix | 6 +++++- pkgs/development/python-modules/dbus/fix-includedir.patch | 8 ++++++++ pkgs/development/python-modules/python-efl/default.nix | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/python-modules/dbus/fix-includedir.patch diff --git a/pkgs/development/python-modules/dbus/default.nix b/pkgs/development/python-modules/dbus/default.nix index 13465f1af2c..f686f067e7a 100644 --- a/pkgs/development/python-modules/dbus/default.nix +++ b/pkgs/development/python-modules/dbus/default.nix @@ -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 ] diff --git a/pkgs/development/python-modules/dbus/fix-includedir.patch b/pkgs/development/python-modules/dbus/fix-includedir.patch new file mode 100644 index 00000000000..e3bb0682b5c --- /dev/null +++ b/pkgs/development/python-modules/dbus/fix-includedir.patch @@ -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 diff --git a/pkgs/development/python-modules/python-efl/default.nix b/pkgs/development/python-modules/python-efl/default.nix index 8e3e9d9a584..48dbc9b710a 100644 --- a/pkgs/development/python-modules/python-efl/default.nix +++ b/pkgs/development/python-modules/python-efl/default.nix @@ -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";