about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/mpv/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/mpv/scripts')
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/default.nix1
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix42
-rw-r--r--nixpkgs/pkgs/applications/video/mpv/scripts/occivink.nix6
3 files changed, 46 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
index 3451b6e3dc47..68ccc3b139d1 100644
--- a/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/default.nix
@@ -69,6 +69,7 @@ let
     cutter = callPackage ./cutter.nix { };
     inhibit-gnome = callPackage ./inhibit-gnome.nix { };
     mpris = callPackage ./mpris.nix { };
+    mpv-cheatsheet = callPackage ./mpv-cheatsheet.nix { };
     mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };
     mpv-webm = callPackage ./mpv-webm.nix { };
     mpvacious = callPackage ./mpvacious.nix { };
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
new file mode 100644
index 000000000000..56013b1fceeb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpv-cheatsheet.nix
@@ -0,0 +1,42 @@
+{ lib, fetchFromGitHub, nodePackages, stdenvNoCC }:
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "mpv-cheatsheet";
+  version = "0.30.0.2";
+
+  src = fetchFromGitHub {
+    owner = "ento";
+    repo = "mpv-cheatsheet";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-MWK0CYto3zgn3fivmL43tvgZn6XrjPxKLp0lgTFdplM=";
+  };
+
+  nativeBuildInputs = [
+    nodePackages.browserify
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    make dist/${finalAttrs.passthru.scriptName}
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D dist/${finalAttrs.passthru.scriptName} $out/share/mpv/scripts/${finalAttrs.passthru.scriptName}
+
+    runHook postInstall
+  '';
+
+
+  passthru.scriptName = "cheatsheet.js";
+
+  meta = with lib; {
+    description = "mpv script for looking up keyboard shortcuts";
+    homepage = "https://github.com/ento/mpv-cheatsheet";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ambroisie ];
+  };
+})
diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/occivink.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/occivink.nix
index f4ea27c1c1aa..1f17a2717287 100644
--- a/nixpkgs/pkgs/applications/video/mpv/scripts/occivink.nix
+++ b/nixpkgs/pkgs/applications/video/mpv/scripts/occivink.nix
@@ -13,12 +13,12 @@ let
   mkScript = name: args:
     let self = rec {
       pname = camelToKebab name;
-      version = "unstable-2023-12-18";
+      version = "unstable-2024-01-11";
       src = fetchFromGitHub {
         owner = "occivink";
         repo = "mpv-scripts";
-        rev = "f0426bd6b107b1f4b124552dae923b62f58ce3b6";
-        hash = "sha256-oag5lcDoezyNXs5EBr0r0UE3ikeftvbfxSzfbxV1Oy0=";
+        rev = "d0390c8e802c2e888ff4a2e1d5e4fb040f855b89";
+        hash = "sha256-pc2aaO7lZaoYMEXv5M0WI7PtmqgkNbdtNiLZZwVzppM=";
       };
       passthru.updateScript = unstableGitUpdater {};