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