about summary refs log tree commit diff
path: root/pkgs/applications/video/sub-batch
diff options
context:
space:
mode:
authorJustin Humm <justin.humm@posteo.de>2021-02-26 23:05:22 +0100
committerJustin Humm <justin.humm@posteo.de>2021-02-28 19:58:30 +0100
commit7dda4b853f1885985f88b796771654977b7c7ec5 (patch)
tree63637c5d709be559cc785b851463fca8895e9548 /pkgs/applications/video/sub-batch
parent09caeaeb3d9398c5353b75a6102e67cfaa75c6fa (diff)
sub-batch: 0.3.0 -> 0.4.0
Also use release tags and use alass as a dependency.
Diffstat (limited to 'pkgs/applications/video/sub-batch')
-rw-r--r--pkgs/applications/video/sub-batch/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/applications/video/sub-batch/default.nix b/pkgs/applications/video/sub-batch/default.nix
index 070bcc90685fc..9cda6eb0a2b07 100644
--- a/pkgs/applications/video/sub-batch/default.nix
+++ b/pkgs/applications/video/sub-batch/default.nix
@@ -1,21 +1,29 @@
-{ lib, stdenv
+{ stdenv
+, lib
 , fetchFromGitHub
 , rustPlatform
+, makeWrapper
+, alass
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "sub-batch";
-  version = "0.3.0";
+  version = "0.4.0";
 
   src = fetchFromGitHub {
     owner = "kl";
     repo = pname;
-    # Upstream doesn't tag releases.
-    rev = "631bd6e2d931f8a8e12798f4b6460739a14bcfff";
-    sha256 = "sha256-424e40v2LBxlmgDKxvsT/iuUn/IKWPKMwih0cSQ5sFE=";
+    rev = "v${version}";
+    sha256 = "sha256-5fDnSmnnVB1RGrNrnmp40OGFF+OAhppnhOjVgnYxXr0=";
   };
 
-  cargoSha256 = "sha256-l+BTF9PGb8bG8QHhNCoBsrsVX8nlRjPlaea1ESFfMW0=";
+  cargoSha256 = "sha256-cj1htJcUPCeYbP0t15UcMv4WQAG7tUROb97v4rUeMvU=";
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram "$out/bin/sub-batch" --prefix PATH : "${lib.makeBinPath [ alass ]}"
+  '';
 
   meta = with lib; {
     description = "Match and rename subtitle files to video files and perform other batch operations on subtitle files";