60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pytestCheckHook,
|
|
libiconv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "biliass";
|
|
version = "2.2.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "yutto-dev";
|
|
repo = "yutto";
|
|
tag = "biliass@${version}";
|
|
hash = "sha256-IQokpJbUhR8FMCJcxPSDD1X1o+Lb2j1G7d/jFEsR/Eg=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/packages/biliass";
|
|
cargoRoot = "rust";
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit
|
|
pname
|
|
version
|
|
src
|
|
sourceRoot
|
|
cargoRoot
|
|
;
|
|
hash = "sha256-tkHl6z0En+od//fCGJXK/p8Dz5KDOXltHrXhxHmHL6U=";
|
|
};
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
libiconv
|
|
];
|
|
|
|
doCheck = false; # test artifacts missing
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "biliass" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/yutto-dev/biliass";
|
|
description = "Convert Bilibili XML/protobuf danmaku to ASS subtitle";
|
|
mainProgram = "biliass";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ linsui ];
|
|
};
|
|
}
|