Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pythonOlder, 7 pythonAtLeast, 8 9 setuptools, 10 11 boltons, 12 orjson, 13 pyrsistent, 14 zope-interface, 15 16 daemontools, 17 dask, 18 distributed, 19 hypothesis, 20 pandas, 21 pytestCheckHook, 22 testtools, 23 twisted, 24}: 25 26buildPythonPackage rec { 27 pname = "eliot"; 28 version = "1.15.0"; 29 pyproject = true; 30 31 disabled = pythonOlder "3.8" || pythonAtLeast "3.13"; 32 33 src = fetchFromGitHub { 34 owner = "itamarst"; 35 repo = "eliot"; 36 rev = "refs/tags/${version}"; 37 hash = "sha256-Ur7q7PZ5HH4ttD3b0HyBTe1B7eQ2nEWcTBR/Hjeg9yw="; 38 }; 39 40 build-system = [ setuptools ]; 41 42 dependencies = [ 43 boltons 44 orjson 45 pyrsistent 46 zope-interface 47 ]; 48 49 nativeCheckInputs = [ 50 dask 51 distributed 52 hypothesis 53 pandas 54 pytestCheckHook 55 testtools 56 twisted 57 ] ++ lib.optionals stdenv.isLinux [ daemontools ]; 58 59 __darwinAllowLocalNetworking = true; 60 61 pythonImportsCheck = [ "eliot" ]; 62 63 # Tests run eliot-prettyprint in out/bin. 64 preCheck = '' 65 export PATH=$out/bin:$PATH 66 ''; 67 68 meta = { 69 homepage = "https://eliot.readthedocs.io"; 70 description = "Logging library that tells you why it happened"; 71 changelog = "https://github.com/itamarst/eliot/blob/${version}/docs/source/news.rst"; 72 mainProgram = "eliot-prettyprint"; 73 license = lib.licenses.asl20; 74 maintainers = with lib.maintainers; [ dpausp ]; 75 }; 76}