about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-05-03 00:13:16 +0000
committerGitHub <noreply@github.com>2024-05-03 00:13:16 +0000
commit26d2f291dffdcb7e5f40896be3fc3bc72538dbd0 (patch)
tree5eab6c80968fb769f5433bc2fa6b96f102d17701 /pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
parent2918b2c876b74d0ba5e333676ee86228f51c24e8 (diff)
parent172094c8c1f83ee7f6d7dd10e64fdc7da0e4ac3b (diff)
Merge master into haskell-updates
Diffstat (limited to 'pkgs/applications/video/mpv/scripts/mpv-notify-send.nix')
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-notify-send.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix b/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
new file mode 100644
index 0000000000000..04b03670b79f2
--- /dev/null
+++ b/pkgs/applications/video/mpv/scripts/mpv-notify-send.nix
@@ -0,0 +1,39 @@
+{ 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 ];
+  };
+}