mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
@@ -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 ]
|
||||
|
||||
@@ -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
|
||||
@@ -10,7 +10,6 @@ let components = {
|
||||
hpmc = true;
|
||||
md = true;
|
||||
metal = true;
|
||||
testing = false;
|
||||
};
|
||||
onOffBool = b: if b then "ON" else "OFF";
|
||||
withMPI = (mpi != null);
|
||||
@@ -44,7 +43,6 @@ stdenv.mkDerivation rec {
|
||||
"-DBUILD_HPMC=${onOffBool components.hpmc}"
|
||||
"-DBUILD_MD=${onOffBool components.md}"
|
||||
"-DBUILD_METAL=${onOffBool components.metal}"
|
||||
"-DBUILD_TESTING=${onOffBool components.testing}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
@@ -9,7 +9,7 @@ buildPythonPackage rec {
|
||||
# pytz fake_factory django numpy pytest
|
||||
# If you need these, you can just add them to your environment.
|
||||
|
||||
version = "3.88.3";
|
||||
version = "4.7.3";
|
||||
pname = "hypothesis";
|
||||
|
||||
# Use github tarballs that includes tests
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyatspi";
|
||||
version = "2.30.0";
|
||||
version = "2.32.0";
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "11g7dx21brfmi5vrq289cw983rydalx0cy91afv5gigyadsmyam2";
|
||||
sha256 = "0jfmm5684sfb035ihvla75gxz4cls5d2vnf0s02y6dw7s12zbb8a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
@@ -3,13 +3,13 @@ pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome3 }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pygobject";
|
||||
version = "3.30.4";
|
||||
version = "3.32.0";
|
||||
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "0hscyvr6hh8l90fyz97b9d03506g3r8s5hl1bgk5aadq8jja3h9d";
|
||||
sha256 = "0agg8nxgqp96wyw4qnjjpiczf0j8aw454plwsfqccsyykzjxgx43";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@@ -12,7 +12,9 @@ buildPythonPackage rec {
|
||||
sha256 = "689de29ae747642ab230c6d37be2b969bf75663176658851f456619aacf27492";
|
||||
};
|
||||
|
||||
checkInputs = [ pytest pytestrunner pyenchant ];
|
||||
nativeBuildInputs = [ pytestrunner ];
|
||||
|
||||
checkInputs = [ pytest pyenchant ];
|
||||
|
||||
propagatedBuildInputs = [ astroid isort mccabe ];
|
||||
|
||||
|
||||
@@ -27,24 +27,26 @@ in buildPythonPackage rec {
|
||||
|
||||
buildInputs = [ dbus sip ];
|
||||
|
||||
propagatedBuildInputs = [ qtbase qtsvg qtwebengine ]
|
||||
propagatedBuildInputs = [ qtbase qtsvg qtwebengine dbus-python ]
|
||||
++ lib.optional (!isPy3k) enum34
|
||||
++ lib.optional withConnectivity qtconnectivity
|
||||
++ lib.optional withWebKit qtwebkit
|
||||
++ lib.optional withWebSockets qtwebsockets;
|
||||
|
||||
patches = [
|
||||
# Fix some wrong assumptions by ./configure.py
|
||||
# TODO: figure out how to send this upstream
|
||||
./pyqt5-fix-dbus-mainloop-support.patch
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
mkdir -p $out
|
||||
lndir ${dbus-python} $out
|
||||
rm -rf "$out/nix-support"
|
||||
|
||||
export PYTHONPATH=$PYTHONPATH:$out/${python.sitePackages}
|
||||
|
||||
${python.executable} configure.py -w \
|
||||
--confirm-license \
|
||||
--dbus=${dbus.dev}/include/dbus-1.0 \
|
||||
--dbus-moduledir=$out/${python.sitePackages}/dbus/mainloop \
|
||||
--no-qml-plugin \
|
||||
--bindir=$out/bin \
|
||||
--destdir=$out/${python.sitePackages} \
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
From 944d5467e1655aac20a14325631df6daccaf5804 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Tojnar <jtojnar@gmail.com>
|
||||
Date: Sun, 3 Mar 2019 01:13:46 +0100
|
||||
Subject: [PATCH] Fix building on Nix
|
||||
|
||||
./configure.py tries to find dbus-python header in dbus-1 includedir
|
||||
obtained from pkg-config or from --dbus flag. Unfortunately, when supplied,
|
||||
it also uses the flag for locating dbus-1 headers. This fails on Nix,
|
||||
since every package is installed into its own immutable tree so we cannot
|
||||
use a single directory for both dbus-python and dbus-1. We can fix this by
|
||||
using pkg-config for finding dbus-python headers too.
|
||||
|
||||
Additionally, the build system also tries to install the dbus support module
|
||||
to dbus-python tree. Often, it is possible to handle this in pkgconfig as well [1]
|
||||
but unfortunately, dbus-python does not export the moduledir in its pc file
|
||||
so I have decided to solve this with an extra configure flag.
|
||||
|
||||
[1]: https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
|
||||
---
|
||||
configure.py | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.py b/configure.py
|
||||
index a3450ca3..440d90a2 100644
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -905,6 +905,9 @@ class TargetConfiguration:
|
||||
if opts.pydbusincdir is not None:
|
||||
self.pydbus_inc_dir = opts.pydbusincdir
|
||||
|
||||
+ if opts.pydbusmoduledir is not None:
|
||||
+ self.pydbus_module_dir = opts.pydbusmoduledir
|
||||
+
|
||||
if opts.pyuicinterpreter is not None:
|
||||
self.pyuic_interpreter = opts.pyuicinterpreter
|
||||
|
||||
@@ -1184,6 +1187,11 @@ def create_optparser(target_config):
|
||||
metavar="DIR",
|
||||
help="the directory containing the dbus/dbus-python.h header is "
|
||||
"DIR [default: supplied by pkg-config]")
|
||||
+ g.add_option("--dbus-moduledir", dest='pydbusmoduledir', type='string',
|
||||
+ default=None, action='callback', callback=store_abspath,
|
||||
+ metavar="DIR",
|
||||
+ help="the directory where dbus support module will be installed to"
|
||||
+ "DIR [default: obtained from dbus.mainloop python module]")
|
||||
p.add_option_group(g)
|
||||
|
||||
# Installation.
|
||||
@@ -2149,7 +2157,7 @@ def check_dbus(target_config, verbose):
|
||||
|
||||
inform("Checking to see if the dbus support module should be built...")
|
||||
|
||||
- cmd = 'pkg-config --cflags-only-I --libs dbus-1'
|
||||
+ cmd = 'pkg-config --cflags-only-I --libs dbus-1 dbus-python'
|
||||
|
||||
if verbose:
|
||||
sys.stdout.write(cmd + "\n")
|
||||
@@ -2178,7 +2186,8 @@ def check_dbus(target_config, verbose):
|
||||
inform("The Python dbus module doesn't seem to be installed.")
|
||||
return
|
||||
|
||||
- target_config.pydbus_module_dir = dbus.mainloop.__path__[0]
|
||||
+ if target_config.pydbus_module_dir == '':
|
||||
+ target_config.pydbus_module_dir = dbus.mainloop.__path__[0]
|
||||
|
||||
# Try and find dbus-python.h. We don't use pkg-config because it is broken
|
||||
# for dbus-python (at least for versions up to and including v0.81.0).
|
||||
--
|
||||
2.18.0
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user