summary refs log tree commit diff
diff options
context:
space:
mode:
authornicoo <nicoo@mur.at>2023-10-18 08:05:06 +0000
committernicoo <nicoo@mur.at>2023-11-09 16:01:41 +0000
commitc2f3e206fe7e390050099d7f20a10042222252ef (patch)
treea61e98a010b9726d58f53e19f19d66ee699adf31
parent22e859ae442d8db72711dfb69aeaeae5df5df18f (diff)
downloadnixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar.gz
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar.bz2
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar.lz
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar.xz
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.tar.zst
nixpkgs-c2f3e206fe7e390050099d7f20a10042222252ef.zip
mpvScripts.convert: Refactor with `buildLua`
-rw-r--r--pkgs/applications/video/mpv/scripts/convert.nix12
-rw-r--r--pkgs/applications/video/mpv/scripts/default.nix2
2 files changed, 4 insertions, 10 deletions
diff --git a/pkgs/applications/video/mpv/scripts/convert.nix b/pkgs/applications/video/mpv/scripts/convert.nix
index 40a1050cd32..4f90b0c62ed 100644
--- a/pkgs/applications/video/mpv/scripts/convert.nix
+++ b/pkgs/applications/video/mpv/scripts/convert.nix
@@ -1,7 +1,7 @@
-{ stdenvNoCC, fetchgit, lib
+{ lib, fetchgit, buildLua
 , yad, mkvtoolnix-cli, libnotify }:
 
-stdenvNoCC.mkDerivation {
+buildLua {
   pname = "mpv-convert-script";
   version = "2016-03-18";
   src = fetchgit {
@@ -22,15 +22,9 @@ stdenvNoCC.mkDerivation {
                 'yad_exe = "${yad}/bin/yad"' \
       --replace 'notify_send_exe = "notify-send"' \
                 'notify_send_exe = "${libnotify}/bin/notify-send"' \
-
   '';
 
-  dontBuild = true;
-  installPhase = ''
-    mkdir -p $out/share/mpv/scripts
-    cp convert_script.lua $out/share/mpv/scripts
-  '';
-  passthru.scriptName = "convert_script.lua";
+  scriptPath = "convert_script.lua";
 
   meta = with lib; {
     description = "Convert parts of a video while you are watching it in mpv";
diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix
index 562e3de1645..00db5224d53 100644
--- a/pkgs/applications/video/mpv/scripts/default.nix
+++ b/pkgs/applications/video/mpv/scripts/default.nix
@@ -11,7 +11,7 @@ in lib.recurseIntoAttrs
     autodeint = callPackage ./autodeint.nix { };
     autoload = callPackage ./autoload.nix { };
     chapterskip = callPackage ./chapterskip.nix { inherit buildLua; };
-    convert = callPackage ./convert.nix { };
+    convert = callPackage ./convert.nix { inherit buildLua; };
     inhibit-gnome = callPackage ./inhibit-gnome.nix { };
     mpris = callPackage ./mpris.nix { };
     mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { };