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