Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 stdenv,
6 rustPlatform,
7 bitstring,
8 cachetools,
9 cffi,
10 deprecation,
11 iconv,
12 matplotlib,
13 numpy,
14 scipy,
15 screed,
16 hypothesis,
17 pytest-xdist,
18 pyyaml,
19 pytestCheckHook,
20}:
21buildPythonPackage rec {
22 pname = "sourmash";
23 version = "4.9.4";
24 pyproject = true;
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-KIidEQQeOYgxh1x9F6Nn4+WTewldAGdS5Fx/IwL0Ym0=";
29 };
30
31 cargoDeps = rustPlatform.fetchCargoVendor {
32 inherit pname version src;
33 hash = "sha256-/tVuR31T38/xx1+jglSGECAT1GmQEddQp9o6zAqlPyY=";
34 };
35
36 nativeBuildInputs = with rustPlatform; [
37 cargoSetupHook
38 maturinBuildHook
39 bindgenHook
40 ];
41
42 buildInputs = [ iconv ];
43
44 propagatedBuildInputs = [
45 bitstring
46 cachetools
47 cffi
48 deprecation
49 matplotlib
50 numpy
51 scipy
52 screed
53 ];
54
55 pythonImportsCheck = [ "sourmash" ];
56 nativeCheckInputs = [
57 hypothesis
58 pytest-xdist
59 pytestCheckHook
60 pyyaml
61 ];
62
63 # TODO(luizirber): Working on fixing these upstream
64 disabledTests = [
65 "test_compare_no_such_file"
66 "test_do_sourmash_index_multiscaled_rescale_fail"
67 "test_metagenome_kreport_out_fail"
68 ];
69
70 meta = {
71 description = "Quickly search, compare, and analyze genomic and metagenomic data sets";
72 mainProgram = "sourmash";
73 homepage = "https://sourmash.bio";
74 changelog = "https://github.com/sourmash-bio/sourmash/releases/tag/v${version}";
75 maintainers = with lib.maintainers; [ luizirber ];
76 license = lib.licenses.bsd3;
77 };
78}