blob: 9972a1d29bfca5e17305eb68e07ae88c44c62b76 (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
rustPlatform,
pytestCheckHook,
libiconv,
}:
# r-ryantm wants to downgrade
# nixpkgs-update: no auto update
buildPythonPackage rec {
pname = "biliass";
version = "2.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "yutto-dev";
repo = "yutto";
tag = "biliass@${version}";
hash = "sha256-6lSXex9UOJn2bR6gigSBV4l1ecwtOIkYaK6YKVh3xpY=";
};
sourceRoot = "${src.name}/packages/biliass";
cargoRoot = "rust";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
sourceRoot
cargoRoot
;
hash = "sha256-GwmQOrv2wOT/yLtMlU6FBNbtp1wfEHn8wM0Yfmxs3eE=";
};
nativeBuildInputs = with rustPlatform; [
cargoSetupHook
maturinBuildHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
doCheck = false; # test artifacts missing
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "biliass" ];
meta = {
homepage = "https://github.com/yutto-dev/biliass";
description = "Convert Bilibili XML/protobuf danmaku to ASS subtitle";
mainProgram = "biliass";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ linsui ];
};
}
|