From 77e1ad8f3a99467a0b4f77bd321991d2e85c2765 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 12 Mar 2022 16:42:42 +0100 Subject: [PATCH] python310Packages.gb-io: init at 0.1.1 --- .../python-modules/gb-io/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/gb-io/default.nix diff --git a/pkgs/development/python-modules/gb-io/default.nix b/pkgs/development/python-modules/gb-io/default.nix new file mode 100644 index 000000000000..e61248cecf93 --- /dev/null +++ b/pkgs/development/python-modules/gb-io/default.nix @@ -0,0 +1,45 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, rustPlatform +, setuptools-rust +}: + +buildPythonPackage rec { + pname = "gb-io"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "althonos"; + repo = "gb-io.py"; + rev = "v${version}"; + sha256 = "05fpz11rqqjrb8lc8id6ssv7sni9i1h7x1ra5v5flw9ghpf29ncm"; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src sourceRoot; + name = "${pname}-${version}"; + sha256 = "1qh31jysg475f2qc70b3bczmzywmg9987kn2vsmk88h8sx4nnwc5"; + }; + + sourceRoot = "source"; + + nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + checkPhase = '' + python -m unittest discover + ''; + + pythonImportsCheck = [ "gb_io" ]; + + meta = with lib; { + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7f29b76457d6..f2a5e65b4577 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3200,6 +3200,8 @@ in { inherit (pkgs) bluez glib pkg-config; }; + gb-io = callPackage ../development/python-modules/gb-io { }; + gbinder-python = callPackage ../development/python-modules/gbinder-python { }; gcovr = callPackage ../development/python-modules/gcovr { };