about summary refs log tree commit diff
path: root/pkgs/development/python-modules/notify-py/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/notify-py/default.nix')
-rw-r--r--pkgs/development/python-modules/notify-py/default.nix118
1 files changed, 59 insertions, 59 deletions
diff --git a/pkgs/development/python-modules/notify-py/default.nix b/pkgs/development/python-modules/notify-py/default.nix
index 9e4a972386995..cc46dbe77fdf0 100644
--- a/pkgs/development/python-modules/notify-py/default.nix
+++ b/pkgs/development/python-modules/notify-py/default.nix
@@ -1,24 +1,24 @@
-{ lib
-, stdenv
-, buildPythonPackage
-, pythonOlder
-, fetchFromGitHub
-, substituteAll
-, alsa-utils
-, libnotify
-, which
-, poetry-core
-, pythonRelaxDepsHook
-, jeepney
-, loguru
-, pytest
-, dbus
-, coreutils
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  substituteAll,
+  alsa-utils,
+  libnotify,
+  which,
+  poetry-core,
+  jeepney,
+  loguru,
+  pytest,
+  dbus,
+  coreutils,
 }:
 
 buildPythonPackage rec {
   pname = "notify-py";
-  version = "0.3.42";
+  version = "0.3.43";
   format = "pyproject";
 
   disabled = pythonOlder "3.6";
@@ -27,57 +27,54 @@ buildPythonPackage rec {
     owner = "ms7m";
     repo = pname;
     rev = "refs/tags/v${version}";
-    hash = "sha256-XtjJImH9UwPPZS/Yqs8S5xGXOLBRmJRawzxWXoPWvrM=";
+    hash = "sha256-4PJ/0dLG3bWDuF1G/qUmvNaIUFXgPP2S/0uhZz86WRA=";
   };
 
-  patches = lib.optionals stdenv.isLinux [
-    # hardcode paths to aplay and notify-send
-    (substituteAll {
-      src = ./linux-paths.patch;
-      aplay = "${alsa-utils}/bin/aplay";
-      notifysend = "${libnotify}/bin/notify-send";
-    })
-  ] ++ lib.optionals stdenv.isDarwin [
-    # hardcode path to which
-    (substituteAll {
-      src = ./darwin-paths.patch;
-      which = "${which}/bin/which";
-    })
-  ];
+  patches =
+    lib.optionals stdenv.hostPlatform.isLinux [
+      # hardcode paths to aplay and notify-send
+      (substituteAll {
+        src = ./linux-paths.patch;
+        aplay = "${alsa-utils}/bin/aplay";
+        notifysend = "${libnotify}/bin/notify-send";
+      })
+    ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [
+      # hardcode path to which
+      (substituteAll {
+        src = ./darwin-paths.patch;
+        which = "${which}/bin/which";
+      })
+    ];
 
   nativeBuildInputs = [
     poetry-core
-    pythonRelaxDepsHook
   ];
 
-  pythonRelaxDeps = [
-    "loguru"
-  ];
+  pythonRelaxDeps = [ "loguru" ];
 
-  propagatedBuildInputs = [
-    loguru
-  ] ++ lib.optionals stdenv.isLinux [
-    jeepney
-  ];
+  propagatedBuildInputs = [ loguru ] ++ lib.optionals stdenv.hostPlatform.isLinux [ jeepney ];
 
-  nativeCheckInputs = [
-    pytest
-  ] ++ lib.optionals stdenv.isLinux [
-    dbus
-  ];
+  nativeCheckInputs = [ pytest ] ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus ];
 
-  checkPhase = if stdenv.isDarwin then ''
-    # Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs
-    mkdir $TMP/bin
-    ln -s ${coreutils}/bin/true $TMP/bin/afplay
-    PATH="$TMP/bin:$PATH" pytest
-  '' else if stdenv.isLinux then ''
-    dbus-run-session \
-      --config-file=${dbus}/share/dbus-1/session.conf \
-      pytest
-  '' else ''
-    pytest
-  '';
+  checkPhase =
+    if stdenv.hostPlatform.isDarwin then
+      ''
+        # Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs
+        mkdir $TMP/bin
+        ln -s ${coreutils}/bin/true $TMP/bin/afplay
+        PATH="$TMP/bin:$PATH" pytest
+      ''
+    else if stdenv.hostPlatform.isLinux then
+      ''
+        dbus-run-session \
+          --config-file=${dbus}/share/dbus-1/session.conf \
+          pytest
+      ''
+    else
+      ''
+        pytest
+      '';
 
   # GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
   # org.freedesktop.Notifications was not provided by any .service files
@@ -91,6 +88,9 @@ buildPythonPackage rec {
     homepage = "https://github.com/ms7m/notify-py";
     changelog = "https://github.com/ms7m/notify-py/releases/tag/v${version}";
     license = licenses.mit;
-    maintainers = with maintainers; [ austinbutler dotlambda ];
+    maintainers = with maintainers; [
+      austinbutler
+      dotlambda
+    ];
   };
 }