Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 58 lines 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.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "yutto-dev"; 18 repo = "yutto"; 19 rev = "refs/tags/biliass@${version}"; 20 hash = "sha256-IrzFjjMNuD5UgdccHxIxZoeZpM1PGtVQRTWHOocnmAU="; 21 }; 22 23 sourceRoot = "source/packages/biliass"; 24 cargoRoot = "rust"; 25 26 cargoDeps = rustPlatform.fetchCargoTarball { 27 inherit 28 pname 29 version 30 src 31 ; 32 sourceRoot = "${sourceRoot}/${cargoRoot}"; 33 hash = "sha256-fXYjIJNrNQSXEACSa/FwxGlBYq5SxfIVIt4LtP0taFc="; 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}