about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
blob: 3e3a04499d08f1af048e7e4b92387441627e278d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  lib,
  buildLua,
  fetchFromGitHub,
  fetchpatch,
  unstableGitUpdater,
  libnotify,
}:

buildLua rec {
  pname = "mpv-notify-send";
  version = "0-unstable-2020-02-24";

  src = fetchFromGitHub {
    owner = "emilazy";
    repo = pname;
    rev = "a2bab8b2fd8e8d14faa875b5cc3a73f1276cd88a";
    sha256 = "sha256-EwVkhyB87TJ3i9xJmmZMSTMUKvfbImI1S+y1vgRWbDk=";
  };

  patches = [
    # show title of online videos instead of url
    (fetchpatch {
      url = "https://github.com/emilazy/mpv-notify-send/pull/6.patch";
      hash = "sha256-7aXQ8qeqG4yX0Uyn09xCIESnwPZsb6Frd7C49XgbpFw=";
    })
  ];

  passthru.extraWrapperArgs = [
    "--prefix"
    "PATH"
    ":"
    (lib.makeBinPath libnotify)
  ];

  passthru.updateScript = unstableGitUpdater { };

  meta = with lib; {
    description = "A Lua script for mpv to send notifications with notify-send";
    homepage = "https://github.com/emilazy/mpv-notify-send";
    license = licenses.wtfpl;
    maintainers = with maintainers; [ r3n3gad3p3arl ];
  };
}