2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
rustPlatform,
|
|
|
|
cargo,
|
|
|
|
rustc,
|
|
|
|
setuptools-rust,
|
|
|
|
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";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
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
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = src.name;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|