From ff35c6cf96a55832221b53ec37559000664070cc Mon Sep 17 00:00:00 2001 From: QJoly Date: Thu, 1 Jun 2023 08:04:01 +0200 Subject: [PATCH] subtitlr: init at 0.1.0 Fix path Fix all-packages.nix --- pkgs/applications/audio/subtitlr/default.nix | 35 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/applications/audio/subtitlr/default.nix diff --git a/pkgs/applications/audio/subtitlr/default.nix b/pkgs/applications/audio/subtitlr/default.nix new file mode 100644 index 000000000000..04c377c21059 --- /dev/null +++ b/pkgs/applications/audio/subtitlr/default.nix @@ -0,0 +1,35 @@ +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: + +buildGoModule rec { + pname = "Subtitlr"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "yoanbernabeu"; + repo = pname; + rev = version; + hash = "sha256-fwDIE8DFVd7NRhi8bBmFxrmGdT2ZtSFWBaynV+xz3ms="; + }; + + vendorHash = "sha256-t92nz42sv8bE0JIkSFB2+WBz1Um8kcRSotpXcPIy3eQ="; + + ldflags = [ "-s" "-w" ]; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = '' + installShellCompletion --cmd Subtitlr \ + --bash <($out/bin/Subtitlr completion bash) \ + --fish <($out/bin/Subtitlr completion fish) \ + --zsh <($out/bin/Subtitlr completion zsh) + ''; + + meta = with lib; { + description = "This application, a subtitle generator for YouTube, utilizes OpenAI's Whisper API."; + homepage = "https://github.com/yoanbernabeu/Subtitlr/"; + license = licenses.mit; + maintainers = with maintainers; [ qjoly ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f68c6da33dfa..b58b118a48cd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34417,6 +34417,8 @@ with pkgs; sublime-music = callPackage ../applications/audio/sublime-music { }; + subtitlr = callPackage ../applications/audio/subtitlr { }; + subunit = callPackage ../development/libraries/subunit { }; surf = callPackage ../applications/networking/browsers/surf { gtk = gtk2; };