nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 rustPlatform,
6 cargo,
7 rustc,
8 unittestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "gb-io";
13 version = "0.4.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "althonos";
18 repo = "gb-io.py";
19 rev = "v${version}";
20 hash = "sha256-6owaHSOVahgOG1gvN4Tox8c49qGzQ4lG1n8GKwEnCRk=";
21 };
22
23 cargoDeps = rustPlatform.fetchCargoVendor {
24 inherit
25 pname
26 version
27 src
28 sourceRoot
29 ;
30 hash = "sha256-ZUvcbVwhV2P8AvsuVoaPWUW5G9VaEvx3mt4kub0xHRk=";
31 };
32
33 sourceRoot = src.name;
34
35 nativeBuildInputs = [
36 cargo
37 rustc
38 rustPlatform.cargoSetupHook
39 ];
40
41 build-system = [ rustPlatform.maturinBuildHook ];
42
43 nativeCheckInputs = [ unittestCheckHook ];
44
45 pythonImportsCheck = [ "gb_io" ];
46
47 meta = {
48 homepage = "https://github.com/althonos/gb-io.py";
49 description = "Python interface to gb-io, a fast GenBank parser written in Rust";
50 license = lib.licenses.mit;
51 maintainers = with lib.maintainers; [ dlesl ];
52 };
53}