generated from nix-community/nur-packages-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
41 lines (38 loc) · 989 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
./result/bin/srtgen
*/
{
pkgs ? import <nixpkgs> {}
}:
let
python = pkgs.python3;
buildPythonPackage = python.pkgs.buildPythonPackage;
lib = pkgs.lib;
fetchFromGitHub = pkgs.fetchFromGitHub;
in
buildPythonPackage rec {
pname = "srtgen";
version = "0.1.0";
src = fetchFromGitHub {
# https://github.com/milahu/srtgen
owner = "milahu";
repo = "srtgen";
rev = "1e279a1172c0379d6339ee61f2b5c0e9954667c9";
sha256 = "9x7qRbJktA8SBXsWj1In+mb2E8WP8YO9KxCyHcCAJpE=";
};
propagatedBuildInputs = with python.pkgs; [
pydub
google-cloud-speech
setuptools # workaround https://github.com/NixOS/nixpkgs/pull/162173
#SpeechRecognition
];
postInstall = ''
mv -v $out/bin/srtgen.py $out/bin/srtgen
'';
meta = with lib; {
homepage = "https://github.com/milahu/srtgen";
description = "Generate subtitles for video file";
license = licenses.mit;
};
}