2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
|
|
|
, rustc
|
2022-04-27 09:35:20 +00:00
|
|
|
, setuptools-rust
|
2022-09-09 14:08:57 +00:00
|
|
|
, unittestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gb-io";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.2.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "althonos";
|
|
|
|
repo = "gb-io.py";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-1B7BUJ8H+pTtmDtazfPfYtlXzL/x4rAHtRIFAAsSoWs=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src sourceRoot;
|
|
|
|
name = "${pname}-${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-lPnOFbEJgcaPPl9bTngugubhW//AUFp9RAjyiFHxC70=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "source";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-rust
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
rustc
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "gb_io" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/althonos/gb-io.py";
|
|
|
|
description = "A Python interface to gb-io, a fast GenBank parser written in Rust";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dlesl ];
|
|
|
|
};
|
|
|
|
}
|