summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/dbus-python/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/dbus-python/default.nix')
-rw-r--r--pkgs/development/python-modules/dbus-python/default.nix168
1 files changed, 84 insertions, 84 deletions
diff --git a/pkgs/development/python-modules/dbus-python/default.nix b/pkgs/development/python-modules/dbus-python/default.nix
index 22025ce6d7cb..937ec9511ef5 100644
--- a/pkgs/development/python-modules/dbus-python/default.nix
+++ b/pkgs/development/python-modules/dbus-python/default.nix
@@ -1,106 +1,106 @@
-{ lib
-, fetchPypi
-, buildPythonPackage
-, fetchpatch
-, isPyPy
-, python
+{
+ lib,
+ fetchPypi,
+ buildPythonPackage,
+ fetchpatch,
+ isPyPy,
+ python,
-# build-system
-, meson
-, meson-python
-, pkg-config
+ # build-system
+ meson,
+ meson-python,
+ pkg-config,
-# native dependencies
-, dbus
-, dbus-glib
+ # native dependencies
+ dbus,
+ dbus-glib,
}:
-lib.fix (finalPackage: buildPythonPackage rec {
- pname = "dbus-python";
- version = "1.3.2";
- pyproject = true;
+lib.fix (
+ finalPackage:
+ buildPythonPackage rec {
+ pname = "dbus-python";
+ version = "1.3.2";
+ pyproject = true;
- disabled = isPyPy;
+ disabled = isPyPy;
- outputs = [
- "out"
- "dev"
- ];
+ outputs = [
+ "out"
+ "dev"
+ ];
- src = fetchPypi {
- inherit pname version;
- hash = "sha256-rWeBkwhhi1BpU3viN/jmjKHH/Mle5KEh/mhFsUGCSPg=";
- };
+ src = fetchPypi {
+ inherit pname version;
+ hash = "sha256-rWeBkwhhi1BpU3viN/jmjKHH/Mle5KEh/mhFsUGCSPg=";
+ };
- patches = [
- # reduce required dependencies
- # https://gitlab.freedesktop.org/dbus/dbus-python/-/merge_requests/23
- (fetchpatch {
- url = "https://gitlab.freedesktop.org/dbus/dbus-python/-/commit/d5e19698a8d6e1485f05b67a5b2daa2392819aaf.patch";
- hash = "sha256-Rmj/ByRLiLnIF3JsMBElJugxsG8IARcBdixLhoWgIYU=";
- })
- ];
+ patches = [
+ # reduce required dependencies
+ # https://gitlab.freedesktop.org/dbus/dbus-python/-/merge_requests/23
+ (fetchpatch {
+ url = "https://gitlab.freedesktop.org/dbus/dbus-python/-/commit/d5e19698a8d6e1485f05b67a5b2daa2392819aaf.patch";
+ hash = "sha256-Rmj/ByRLiLnIF3JsMBElJugxsG8IARcBdixLhoWgIYU=";
+ })
+ ];
- postPatch = ''
- # we provide patchelf natively, not through the python package
- sed -i '/patchelf/d' pyproject.toml
+ postPatch = ''
+ # we provide patchelf natively, not through the python package
+ sed -i '/patchelf/d' pyproject.toml
- # dont run autotols configure phase
- rm configure.ac configure
+ # dont run autotols configure phase
+ rm configure.ac configure
- patchShebangs test/*.sh
- '';
+ patchShebangs test/*.sh
+ '';
- nativeBuildInputs = [
- dbus # build systems checks for `dbus-run-session` in PATH
- meson
- meson-python
- pkg-config
- ];
+ nativeBuildInputs = [
+ dbus # build systems checks for `dbus-run-session` in PATH
+ meson
+ meson-python
+ pkg-config
+ ];
- buildInputs = [
- dbus
- dbus-glib
- ];
+ buildInputs = [
+ dbus
+ dbus-glib
+ ];
- pypaBuildFlags = [
- # Don't discard meson build directory, still needed for tests!
- "-Cbuild-dir=_meson-build"
- ];
+ pypaBuildFlags = [
+ # Don't discard meson build directory, still needed for tests!
+ "-Cbuild-dir=_meson-build"
+ ];
- mesonFlags = [
- (lib.mesonBool "tests" finalPackage.doInstallCheck)
- ];
+ mesonFlags = [ (lib.mesonBool "tests" finalPackage.doInstallCheck) ];
- # workaround bug in meson-python
- # https://github.com/mesonbuild/meson-python/issues/240
- postInstall = ''
- mkdir -p $dev/lib
- mv $out/${python.sitePackages}/.dbus_python.mesonpy.libs/pkgconfig/ $dev/lib
- '';
+ # workaround bug in meson-python
+ # https://github.com/mesonbuild/meson-python/issues/240
+ postInstall = ''
+ mkdir -p $dev/lib
+ mv $out/${python.sitePackages}/.dbus_python.mesonpy.libs/pkgconfig/ $dev/lib
+ '';
- # make sure the Cflags in the pkgconfig file are correct and make the structure backwards compatible
- postFixup = ''
- ln -s $dev/include/*/dbus_python/dbus-1.0/ $dev/include/dbus-1.0
- '';
+ # make sure the Cflags in the pkgconfig file are correct and make the structure backwards compatible
+ postFixup = ''
+ ln -s $dev/include/*/dbus_python/dbus-1.0/ $dev/include/dbus-1.0
+ '';
- nativeCheckInputs = [
- dbus.out
- ];
+ nativeCheckInputs = [ dbus.out ];
- checkPhase = ''
- runHook preCheck
+ checkPhase = ''
+ runHook preCheck
- meson test -C _meson-build --no-rebuild --print-errorlogs
+ meson test -C _meson-build --no-rebuild --print-errorlogs
- runHook postCheck
- '';
+ runHook postCheck
+ '';
- meta = with lib; {
- description = "Python DBus bindings";
- homepage = "https://gitlab.freedesktop.org/dbus/dbus-python";
- license = licenses.mit;
- platforms = dbus.meta.platforms;
- maintainers = with maintainers; [ ];
- };
-})
+ meta = with lib; {
+ description = "Python DBus bindings";
+ homepage = "https://gitlab.freedesktop.org/dbus/dbus-python";
+ license = licenses.mit;
+ platforms = dbus.meta.platforms;
+ maintainers = with maintainers; [ ];
+ };
+ }
+)