Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, pytestCheckHook 6, coveralls 7, numpy 8, decopatch 9, more-itertools 10, nestedtext 11, pyyaml 12, tidyexc 13, toml 14}: 15 16buildPythonPackage rec { 17 pname = "parametrize-from-file"; 18 version = "0.17.0"; 19 format = "flit"; 20 21 src = fetchPypi { 22 inherit version; 23 pname = "parametrize_from_file"; 24 hash = "sha256-suxQht9YS+8G0RXCTuEahaI60daBda7gpncLmwySIbE="; 25 }; 26 27 patches = [ 28 (fetchpatch { 29 name = "replace contextlib2-with-contextlib.patch"; 30 url = "https://github.com/kalekundert/parametrize_from_file/commit/edee706770a713130da7c4b38b0a07de1bd79c1b.patch"; 31 hash = "sha256-VkPKGkYYTB5XCavtEEnFJ+EdNUUhITz/euwlYAPC/tQ="; 32 }) 33 ]; 34 35 # patch out coveralls since it doesn't provide us value 36 preBuild = '' 37 sed -i '/coveralls/d' ./pyproject.toml 38 39 substituteInPlace pyproject.toml \ 40 --replace "more_itertools~=8.10" "more_itertools" 41 ''; 42 43 nativeCheckInputs = [ 44 numpy 45 pytestCheckHook 46 ]; 47 48 propagatedBuildInputs = [ 49 decopatch 50 more-itertools 51 nestedtext 52 pyyaml 53 tidyexc 54 toml 55 ]; 56 57 pythonImportsCheck = [ 58 "parametrize_from_file" 59 ]; 60 61 disabledTests = [ 62 # https://github.com/kalekundert/parametrize_from_file/issues/19 63 "test_load_suite_params_err" 64 ]; 65 66 meta = with lib; { 67 description = "Read unit test parameters from config files"; 68 homepage = "https://github.com/kalekundert/parametrize_from_file"; 69 changelog = "https://github.com/kalekundert/parametrize_from_file/blob/v${version}/CHANGELOG.md"; 70 license = licenses.mit; 71 maintainers = with maintainers; [ jpetrucciani ]; 72 }; 73}