2022-05-29 11:10:09 +02:00
|
|
|
{
|
|
|
|
lib,
|
2022-03-12 16:42:42 +01:00
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
rustPlatform,
|
2023-05-12 14:17:16 +00:00
|
|
|
cargo,
|
|
|
|
rustc,
|
2022-08-06 12:32:04 -04:00
|
|
|
unittestCheckHook,
|
2022-03-12 16:42:42 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gb-io";
|
2025-04-01 04:33:01 +02:00
|
|
|
version = "0.3.5";
|
|
|
|
pyproject = true;
|
2022-03-12 16:42:42 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "althonos";
|
|
|
|
repo = "gb-io.py";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = "v${version}";
|
2025-04-01 04:33:01 +02:00
|
|
|
hash = "sha256-xpyfb5pTV8w7S7g2Tagl5N3jLO+IisP2KXuYN/RDDpY=";
|
2022-03-12 16:42:42 +01:00
|
|
|
};
|
|
|
|
|
2025-01-23 16:07:59 +01:00
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
2025-05-30 04:18:04 +02:00
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
sourceRoot
|
|
|
|
;
|
2025-04-01 04:33:01 +02:00
|
|
|
hash = "sha256-97aEuXdq9oEqYJs6sgQU5a0vAMJmWJzu2WGjOqzxZ4c=";
|
2022-03-12 16:42:42 +01:00
|
|
|
};
|
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = src.name;
|
2022-03-12 16:42:42 +01:00
|
|
|
|
2023-05-12 14:17:16 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cargo
|
|
|
|
rustc
|
2025-04-01 04:33:01 +02:00
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-12 14:17:16 +00:00
|
|
|
];
|
2022-03-12 16:42:42 +01:00
|
|
|
|
2025-04-01 04:33:01 +02:00
|
|
|
build-system = [ rustPlatform.maturinBuildHook ];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-03-12 16:42:42 +01:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "gb_io" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/althonos/gb-io.py";
|
|
|
|
description = "Python interface to gb-io, a fast GenBank parser written in Rust";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dlesl ];
|
|
|
|
};
|
|
|
|
}
|