Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 stdenv, 6 7 # build-system 8 flit-core, 9 10 # dependencies 11 orderly-set, 12 13 # optional-dependencies 14 click, 15 orjson, 16 pyyaml, 17 18 # tests 19 jsonpickle, 20 numpy, 21 pytestCheckHook, 22 python-dateutil, 23 tomli-w, 24 polars, 25 pandas, 26}: 27 28buildPythonPackage rec { 29 pname = "deepdiff"; 30 version = "8.5.0"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "seperman"; 35 repo = "deepdiff"; 36 tag = version; 37 hash = "sha256-JIxlWy2uVpI98BmpH2+EyOxfYBoO2G2S0D9krduVo08="; 38 }; 39 40 build-system = [ 41 flit-core 42 ]; 43 44 dependencies = [ 45 orderly-set 46 ]; 47 48 optional-dependencies = { 49 cli = [ 50 click 51 pyyaml 52 ]; 53 optimize = [ 54 orjson 55 ]; 56 }; 57 58 nativeCheckInputs = [ 59 jsonpickle 60 numpy 61 pytestCheckHook 62 python-dateutil 63 tomli-w 64 polars 65 pandas 66 ] 67 ++ lib.flatten (lib.attrValues optional-dependencies); 68 69 disabledTests = [ 70 # not compatible with pydantic 2.x 71 "test_pydantic1" 72 "test_pydantic2" 73 # Require pytest-benchmark 74 "test_cache_deeply_nested_a1" 75 "test_lfu" 76 ] 77 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 78 # Times out on darwin in Hydra 79 "test_repeated_timer" 80 ]; 81 82 pythonImportsCheck = [ "deepdiff" ]; 83 84 meta = { 85 description = "Deep Difference and Search of any Python object/data"; 86 mainProgram = "deep"; 87 homepage = "https://github.com/seperman/deepdiff"; 88 changelog = "https://github.com/seperman/deepdiff/blob/${src.tag}/CHANGELOG.md"; 89 license = lib.licenses.mit; 90 maintainers = with lib.maintainers; [ 91 mic92 92 doronbehar 93 ]; 94 }; 95}