1{ stdenv
2, buildPythonApplication
3, fetchFromGitHub
4, chardet
5, nose
6}:
7
8buildPythonApplication rec {
9 pname = "pysrt";
10 name = "${pname}-${version}";
11 version = "1.1.1";
12
13 src = fetchFromGitHub {
14 owner = "byroot";
15 repo = "pysrt";
16 rev = "v${version}";
17 sha256 = "0rwjaf26885vxhxnas5d8zwasvj7x88y4y2pdivjd4vdcpqrqdjn";
18 };
19
20 buildInputs = [ nose ];
21 checkPhase = ''
22 nosetests -v
23 '';
24
25 propagatedBuildInputs = [ chardet ];
26
27 meta = with stdenv.lib; {
28 homepage = https://github.com/byroot/pysrt;
29 license = licenses.gpl3;
30 description = "Python library used to edit or create SubRip files";
31 };
32}