2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-10-04 16:56:33 +00:00
|
|
|
rustPlatform,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "biliass";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "2.0.0-beta.1";
|
|
|
|
pyproject = true;
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yutto-dev";
|
2024-10-04 16:56:33 +00:00
|
|
|
repo = "yutto";
|
|
|
|
rev = "refs/tags/biliass@${version}";
|
|
|
|
hash = "sha256-Clma0Ggkphk6F+K+h3TdMUX4WyWQorh9g2uAT4+Fc9I=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
sourceRoot = "source/packages/biliass";
|
|
|
|
cargoRoot = "rust";
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
;
|
|
|
|
sourceRoot = "${sourceRoot}/${cargoRoot}";
|
|
|
|
hash = "sha256-h/UOolWQ2k5krOZy/kPywpeiLyXWLzvNu+pcn97or1A=";
|
|
|
|
};
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
doCheck = false; # test artifacts missing
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "biliass" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/yutto-dev/biliass";
|
|
|
|
description = "Convert Bilibili XML/protobuf danmaku to ASS subtitle";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "biliass";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ linsui ];
|
|
|
|
};
|
|
|
|
}
|