Files
nixpkgs/pkgs/development/python-modules/biliass/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

62 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
rustPlatform,
pytestCheckHook,
libiconv,
}:
# r-ryantm wants to downgrade
# nixpkgs-update: no auto update
buildPythonPackage rec {
pname = "biliass";
version = "2.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "yutto-dev";
repo = "yutto";
tag = "biliass@${version}";
hash = "sha256-ZB18BQJRSwA/ERHjqmp+D39UqTvdYpbhwLjaizM5R2I=";
};
sourceRoot = "${src.name}/packages/biliass";
cargoRoot = "rust";
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
sourceRoot
cargoRoot
;
hash = "sha256-gOYgYi8RlWBe0astv6D6/J7Ge20TM/19zJHwoCevpIo=";
};
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 ];
};
}