at 24.05-pre 1.0 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, buildPythonPackage 5, rustPlatform 6, cargo 7, rustc 8, setuptools-rust 9, unittestCheckHook 10}: 11 12buildPythonPackage rec { 13 pname = "gb-io"; 14 version = "0.2.1"; 15 16 src = fetchFromGitHub { 17 owner = "althonos"; 18 repo = "gb-io.py"; 19 rev = "v${version}"; 20 hash = "sha256-1B7BUJ8H+pTtmDtazfPfYtlXzL/x4rAHtRIFAAsSoWs="; 21 }; 22 23 cargoDeps = rustPlatform.fetchCargoTarball { 24 inherit src sourceRoot; 25 name = "${pname}-${version}"; 26 hash = "sha256-lPnOFbEJgcaPPl9bTngugubhW//AUFp9RAjyiFHxC70="; 27 }; 28 29 sourceRoot = src.name; 30 31 nativeBuildInputs = [ 32 setuptools-rust 33 rustPlatform.cargoSetupHook 34 cargo 35 rustc 36 ]; 37 38 nativeCheckInputs = [ unittestCheckHook ]; 39 40 pythonImportsCheck = [ "gb_io" ]; 41 42 meta = with lib; { 43 broken = stdenv.isDarwin; 44 homepage = "https://github.com/althonos/gb-io.py"; 45 description = "A Python interface to gb-io, a fast GenBank parser written in Rust"; 46 license = licenses.mit; 47 maintainers = with lib.maintainers; [ dlesl ]; 48 }; 49}