about summary refs log tree commit diff
path: root/pkgs/applications/video/mpv/scripts/mpv-webm.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/mpv/scripts/mpv-webm.nix')
-rw-r--r--pkgs/applications/video/mpv/scripts/mpv-webm.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/video/mpv/scripts/mpv-webm.nix b/pkgs/applications/video/mpv/scripts/mpv-webm.nix
new file mode 100644
index 0000000000000..983003d79d712
--- /dev/null
+++ b/pkgs/applications/video/mpv/scripts/mpv-webm.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+, luaPackages
+}:
+
+stdenvNoCC.mkDerivation {
+  pname = "mpv-webm";
+  version = "unstable-2023-02-23";
+
+  src = fetchFromGitHub {
+    owner = "ekisu";
+    repo = "mpv-webm";
+    rev = "a18375932e39e9b2a40d9c7ab52ea367b41e2558";
+    hash = "sha256-aetkQ1gU/6Yys5FJS/N06ED9tCSvL6BAgUGdNmNmpbU=";
+  };
+
+  nativeBuildInputs = [ luaPackages.moonscript ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/mpv/scripts
+    install -m 644 build/webm.lua $out/share/mpv/scripts/
+    runHook postInstall
+  '';
+
+  passthru.scriptName = "webm.lua";
+
+  meta = with lib; {
+    description = "Simple WebM maker for mpv, with no external dependencies";
+    homepage = "https://github.com/ekisu/mpv-webm";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ pbsds ];
+  };
+}