summary refs log tree commit diff
path: root/pkgs/development/python-modules/gb-io/default.nix
blob: 46c98cfc78c827a92ad6b324e3b9ba6786ed855e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ stdenv
, lib
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, cargo
, rustc
, setuptools-rust
, unittestCheckHook
}:

buildPythonPackage rec {
  pname = "gb-io";
  version = "0.2.1";

  src = fetchFromGitHub {
    owner = "althonos";
    repo = "gb-io.py";
    rev = "v${version}";
    hash = "sha256-1B7BUJ8H+pTtmDtazfPfYtlXzL/x4rAHtRIFAAsSoWs=";
  };

  cargoDeps = rustPlatform.fetchCargoTarball {
    inherit src sourceRoot;
    name = "${pname}-${version}";
    hash = "sha256-lPnOFbEJgcaPPl9bTngugubhW//AUFp9RAjyiFHxC70=";
  };

  sourceRoot = src.name;

  nativeBuildInputs = [
    setuptools-rust
    rustPlatform.cargoSetupHook
    cargo
    rustc
  ];

  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "gb_io" ];

  meta = with lib; {
    broken = stdenv.isDarwin;
    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 ];
  };
}