nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 47 lines 1.0 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, buildPythonPackage 5, rustPlatform 6, setuptools-rust 7}: 8 9buildPythonPackage rec { 10 pname = "gb-io"; 11 version = "0.1.1"; 12 13 src = fetchFromGitHub { 14 owner = "althonos"; 15 repo = "gb-io.py"; 16 rev = "v${version}"; 17 sha256 = "05fpz11rqqjrb8lc8id6ssv7sni9i1h7x1ra5v5flw9ghpf29ncm"; 18 }; 19 20 cargoDeps = rustPlatform.fetchCargoTarball { 21 inherit src sourceRoot; 22 name = "${pname}-${version}"; 23 sha256 = "1qh31jysg475f2qc70b3bczmzywmg9987kn2vsmk88h8sx4nnwc5"; 24 }; 25 26 sourceRoot = "source"; 27 28 nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ 29 cargoSetupHook 30 rust.cargo 31 rust.rustc 32 ]); 33 34 checkPhase = '' 35 python -m unittest discover 36 ''; 37 38 pythonImportsCheck = [ "gb_io" ]; 39 40 meta = with lib; { 41 broken = stdenv.isDarwin; 42 homepage = "https://github.com/althonos/gb-io.py"; 43 description = "A Python interface to gb-io, a fast GenBank parser written in Rust"; 44 license = licenses.mit; 45 maintainers = with lib.maintainers; [ dlesl ]; 46 }; 47}