diff options
author | nicoo <nicoo@mur.at> | 2023-12-09 18:00:22 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-12-09 19:31:52 +0000 |
commit | cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d (patch) | |
tree | ef80835736e0b9a77277c70737a5332bfa0cceb0 /pkgs/applications | |
parent | 6ac78f1174be76d961c393d0d1b61967243cf010 (diff) | |
download | nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar.gz nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar.bz2 nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar.lz nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar.xz nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.tar.zst nixlib-cdc6ed5c2669bfd7d419091677f0cdb4cb6b097d.zip |
mpvScripts.cutter: simplify with `buildLua`
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/video/mpv/scripts/cutter.nix | 16 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/scripts/default.nix | 2 |
2 files changed, 7 insertions, 11 deletions
diff --git a/pkgs/applications/video/mpv/scripts/cutter.nix b/pkgs/applications/video/mpv/scripts/cutter.nix index 498fcb530a41..cf5d9830abde 100644 --- a/pkgs/applications/video/mpv/scripts/cutter.nix +++ b/pkgs/applications/video/mpv/scripts/cutter.nix @@ -1,6 +1,6 @@ -{ lib, stdenvNoCC, fetchFromGitHub, makeWrapper }: +{ lib, buildLua, fetchFromGitHub, makeWrapper }: -stdenvNoCC.mkDerivation { +buildLua { pname = "video-cutter"; version = "unstable-2021-02-03"; @@ -11,9 +11,6 @@ stdenvNoCC.mkDerivation { sha256 = "sha256-ramID1DPl0UqEzevpqdYKb9aaW3CAy3Dy9CPb/oJ4eY="; }; - dontBuild = true; - dontCheck = true; - nativeBuildInputs = [ makeWrapper ]; postPatch = '' @@ -27,16 +24,15 @@ stdenvNoCC.mkDerivation { --replace '~/.config/mpv/scripts' "''${XDG_CONFIG_HOME:-~/.config}/mpv/cutter" ''; - installPhase = '' - install -Dm755 c_concat.sh $out/share/mpv/scripts/c_concat.sh - install cutter.lua $out/share/mpv/scripts/cutter.lua + passthru.scriptName = "cutter.lua"; + extraScripts = [ "c_concat.sh" ]; + postInstall = '' + chmod 0755 $out/share/mpv/scripts/c_concat.sh wrapProgram $out/share/mpv/scripts/c_concat.sh \ --run "mkdir -p ~/.config/mpv/cutter/" ''; - passthru.scriptName = "cutter.lua"; - meta = with lib; { description = "Cut videos and concat them automatically"; homepage = "https://github.com/rushmj/mpv-video-cutter"; diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index fb75464ab98e..e14e7f762dcf 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -12,6 +12,7 @@ in lib.recurseIntoAttrs autoload = callPackage ./autoload.nix { }; chapterskip = callPackage ./chapterskip.nix { inherit buildLua; }; convert = callPackage ./convert.nix { inherit buildLua; }; + cutter = callPackage ./cutter.nix { inherit buildLua; }; inhibit-gnome = callPackage ./inhibit-gnome.nix { }; mpris = callPackage ./mpris.nix { }; mpv-playlistmanager = callPackage ./mpv-playlistmanager.nix { inherit buildLua; }; @@ -26,7 +27,6 @@ in lib.recurseIntoAttrs visualizer = callPackage ./visualizer.nix { }; vr-reversal = callPackage ./vr-reversal.nix { }; webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { }; - cutter = callPackage ./cutter.nix { }; } // (callPackage ./occivink.nix { inherit buildLua; })) // lib.optionalAttrs config.allowAliases { |