commit 731e59f8fed6fd689d337809933b03baa3bde58f
parent 7824d42be71a9dd7822d05bfadb86673f5dcb518
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 12 Feb 2022 16:08:56 +0000
create derivation for notify-send.py
It's a more fully-featured client than libnotify's notify-send: we
don't need to install it but it's handly for testing the server
Diffstat:
1 file changed, 32 insertions(+), 0 deletions(-)
diff --git a/crier/notify-send.nix b/crier/notify-send.nix
@@ -0,0 +1,32 @@
+
+# notify-send.py is not needed for installation but it's
+# handy for testing, as it supports more features of the
+# notification protocol than the basic notify-send.
+#
+# https://wiki.archlinux.org/title/Desktop_notifications#Tips_and_tricks
+#
+# Getting it to build in nixpkgs was fun: it requires the
+# deprecated dbus-notify library, which doesn't play nice with
+# standard Python tooling
+
+{ pkgs, lib, dbus, fetchpatch, fetchFromGitHub, python38Packages }:
+
+python38Packages.buildPythonApplication rec {
+ pname = "notify-send";
+ version = "git";
+ format = "pyproject";
+ src = fetchFromGitHub {
+ owner = "phuhl";
+ repo = "notify-send.py";
+ rev = "0575c79f10d10892c41559dd3695346d16a8b184";
+ hash = "sha256:09m15h1yja5x2ihrp92ab3q220mgdcb0k4ld00dccn4krzcn3a7v";
+ };
+
+ patchPhase = ''
+ sed -i pyproject.toml -e 's/"dbus-python",//'
+ '';
+
+ propagatedBuildInputs = with python38Packages; [
+ dbus-python pygobject3 setuptools flit pip
+ ];
+}