at 25.11-pre 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 rustPlatform, 7 pytestCheckHook, 8 libiconv, 9}: 10 11buildPythonPackage rec { 12 pname = "biliass"; 13 version = "2.2.2"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "yutto-dev"; 18 repo = "yutto"; 19 tag = "biliass@${version}"; 20 hash = "sha256-IQokpJbUhR8FMCJcxPSDD1X1o+Lb2j1G7d/jFEsR/Eg="; 21 }; 22 23 sourceRoot = "${src.name}/packages/biliass"; 24 cargoRoot = "rust"; 25 26 cargoDeps = rustPlatform.fetchCargoVendor { 27 inherit 28 pname 29 version 30 src 31 ; 32 sourceRoot = "${sourceRoot}/${cargoRoot}"; 33 hash = "sha256-tkHl6z0En+od//fCGJXK/p8Dz5KDOXltHrXhxHmHL6U="; 34 }; 35 36 nativeBuildInputs = with rustPlatform; [ 37 cargoSetupHook 38 maturinBuildHook 39 ]; 40 41 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 42 libiconv 43 ]; 44 45 doCheck = false; # test artifacts missing 46 47 nativeCheckInputs = [ pytestCheckHook ]; 48 49 pythonImportsCheck = [ "biliass" ]; 50 51 meta = with lib; { 52 homepage = "https://github.com/yutto-dev/biliass"; 53 description = "Convert Bilibili XML/protobuf danmaku to ASS subtitle"; 54 mainProgram = "biliass"; 55 license = licenses.gpl3Only; 56 maintainers = with maintainers; [ linsui ]; 57 }; 58}