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