eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

notify-send.nix (965B)


      1 
      2 # notify-send.py is not needed for installation but it's
      3 # handy for testing, as it supports more features of the
      4 # notification protocol than the basic notify-send.
      5 #
      6 # https://wiki.archlinux.org/title/Desktop_notifications#Tips_and_tricks
      7 #
      8 # Getting it to build in nixpkgs was fun: it requires the
      9 # deprecated dbus-notify library, which doesn't play nice with
     10 # standard Python tooling
     11 
     12 { pkgs, lib, dbus, fetchpatch, fetchFromGitHub, python38Packages }:
     13 
     14 python38Packages.buildPythonApplication rec {
     15   pname = "notify-send";
     16   version = "git";
     17   format = "pyproject";
     18   src = fetchFromGitHub {
     19     owner = "phuhl";
     20     repo = "notify-send.py";
     21     rev = "0575c79f10d10892c41559dd3695346d16a8b184";
     22     hash = "sha256:09m15h1yja5x2ihrp92ab3q220mgdcb0k4ld00dccn4krzcn3a7v";
     23   };
     24 
     25   patchPhase = ''
     26     sed -i pyproject.toml -e 's/"dbus-python",//'
     27   '';
     28 
     29   propagatedBuildInputs = with python38Packages; [
     30     dbus-python pygobject3 setuptools flit pip
     31   ];
     32 }