Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 rustPlatform, 6 cargo, 7 rustc, 8 unittestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "gb-io"; 13 version = "0.3.5"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "althonos"; 18 repo = "gb-io.py"; 19 rev = "v${version}"; 20 hash = "sha256-xpyfb5pTV8w7S7g2Tagl5N3jLO+IisP2KXuYN/RDDpY="; 21 }; 22 23 cargoDeps = rustPlatform.fetchCargoVendor { 24 inherit 25 pname 26 version 27 src 28 sourceRoot 29 ; 30 hash = "sha256-97aEuXdq9oEqYJs6sgQU5a0vAMJmWJzu2WGjOqzxZ4c="; 31 }; 32 33 sourceRoot = src.name; 34 35 nativeBuildInputs = [ 36 cargo 37 rustc 38 rustPlatform.cargoSetupHook 39 ]; 40 41 build-system = [ rustPlatform.maturinBuildHook ]; 42 43 nativeCheckInputs = [ unittestCheckHook ]; 44 45 pythonImportsCheck = [ "gb_io" ]; 46 47 meta = with lib; { 48 homepage = "https://github.com/althonos/gb-io.py"; 49 description = "Python interface to gb-io, a fast GenBank parser written in Rust"; 50 license = licenses.mit; 51 maintainers = with lib.maintainers; [ dlesl ]; 52 }; 53}