Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 135 lines 3.2 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 procps, 6 stdenv, 7 versionCheckHook, 8 addBinToPathHook, 9}: 10 11python3Packages.buildPythonApplication rec { 12 pname = "multiqc"; 13 version = "1.29"; 14 format = "setuptools"; 15 16 # Two data sources. One for the code, another for the test data 17 srcs = [ 18 (fetchFromGitHub { 19 name = "multiqc"; 20 owner = "MultiQC"; 21 repo = "MultiQC"; 22 tag = "v${version}"; 23 hash = "sha256-KKLdDNf889lEbCyNpJFZoE8rNO50CRzNP4hKpKHRAcE="; 24 }) 25 (fetchFromGitHub { 26 owner = "MultiQC"; 27 repo = "test-data"; 28 rev = "d775b73c106d48726653f2fd02e473b7acbd93d8"; 29 hash = "sha256-uxBpMx22gWJmnbF9tVuVIdYdiqUh7n51swzu5hnfZQ0="; 30 name = "test-data"; 31 }) 32 ]; 33 34 # Multiqc cannot remove temporary directories in some case. 35 # Default is 10 retries, lower it to 2 36 postPatch = '' 37 substituteInPlace multiqc/utils/util_functions.py \ 38 --replace-fail \ 39 "max_retries: int = 10," \ 40 "max_retries: int = 2," 41 ''; 42 43 sourceRoot = "multiqc"; 44 45 dependencies = with python3Packages; [ 46 click 47 humanize 48 importlib-metadata 49 jinja2 50 kaleido 51 markdown 52 natsort 53 numpy 54 packaging 55 requests 56 polars 57 pillow 58 plotly 59 pyyaml 60 rich 61 rich-click 62 coloredlogs 63 spectra 64 pydantic 65 typeguard 66 tqdm 67 python-dotenv 68 jsonschema 69 ]; 70 71 optional-dependencies = { 72 dev = with python3Packages; [ 73 pre-commit-hooks 74 pdoc3 75 pytest 76 pytest-cov-stub 77 pytest-xdist 78 syrupy 79 pygithub 80 mypy 81 types-pyyaml 82 types-tqdm 83 types-requests 84 types-markdown 85 types-beautifulsoup4 86 types-pillow 87 ]; 88 }; 89 90 # Some tests run subprocess.run() with "multiqc" 91 preCheck = '' 92 chmod -R u+w ../test-data 93 ln -s ../test-data . 94 ''; 95 96 # Some tests run subprocess.run() with "ps" 97 nativeCheckInputs = 98 with python3Packages; 99 [ 100 procps 101 pytest-cov 102 pytest-xdist 103 pytestCheckHook 104 syrupy 105 pygithub 106 versionCheckHook 107 ] 108 ++ [ 109 addBinToPathHook 110 ]; 111 112 versionCheckProgramArg = "--version"; 113 114 disabledTests = 115 # On darwin, kaleido fails to starts 116 lib.optionals (stdenv.hostPlatform.isDarwin) [ 117 "test_flat_plot" 118 ]; 119 120 meta = { 121 description = "Aggregates bioinformatics results from multiple samples into a unified report"; 122 longDescription = '' 123 MultiQC is a tool to create a single report with interactive plots for multiple bioinformatics analyses across many samples. 124 125 Reports are generated by scanning given directories for recognised log files. These are parsed and a single HTML report is generated summarising the statistics for all logs found. MultiQC reports can describe multiple analysis steps and large numbers of samples within a single plot, and multiple analysis tools making it ideal for routine fast quality control. 126 ''; 127 homepage = "https://multiqc.info"; 128 changelog = "https://github.com/MultiQC/MultiQC/releases/tag/v${version}/"; 129 license = [ lib.licenses.gpl3Plus ]; 130 maintainers = [ lib.maintainers.apraga ]; 131 mainProgram = "multiqc"; 132 platforms = lib.platforms.unix; 133 }; 134 135}