about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/irc/weechat/scripts/weechat-notify-send/default.nix
blob: d8f2b9ba0028c80c76093693cfa4a1934fee4fc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchFromGitHub, libnotify }:

stdenv.mkDerivation rec {
  pname = "weechat-notify-send";
  version = "0.10";

  src = fetchFromGitHub {
    owner = "s3rvac";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-7uw0IdRSxhPrLqdgECKB9eOrtFj+2HTILBhakKiRuNQ=";
  };

  passthru.scripts = [ "notify_send.py" ];

  dontBuild = true;
  doCheck = false;

  installPhase = ''
    install -D notify_send.py $out/share/notify_send.py
    substituteInPlace $out/share/notify_send.py \
      --replace "'notify-send'" "'${libnotify}/bin/notify-send'"
  '';

  meta = with lib; {
    description = "A WeeChat script that sends highlight and message notifications through notify-send";
    homepage = "https://github.com/s3rvac/weechat-notify-send";
    license = licenses.mit;
    maintainers = with maintainers; [ tobim ];
  };
}