Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch2, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 mergedeep, 12 pyyaml, 13 toml, 14 typing-inspect, 15 16 # tests 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "draccus"; 22 version = "0.11.5"; 23 pyproject = true; 24 25 # No (recent) tags on GitHub 26 src = fetchPypi { 27 inherit pname version; 28 hash = "sha256-uC4sICcDCuGg8QVRUSX5FOBQwHZqtRjfOgVgoH0Q3ck="; 29 }; 30 31 patches = [ 32 (fetchpatch2 { 33 # TODO: remove when updating to the next release 34 # Removes the pyyaml-include~=1.4 dependency 35 # https://github.com/dlwh/draccus/issues/46#issuecomment-3180810991 36 name = "remove-pyyaml-include-dep.patch"; 37 url = "https://github.com/dlwh/draccus/commit/3a6db0bc786e46cc13c481bc2235101d7a411441.patch"; 38 hash = "sha256-0OLUjXJSZ9eIL8dgE8o1Mg0HIMX+4XABSf0tYNFWn8I="; 39 }) 40 ]; 41 42 build-system = [ 43 setuptools 44 ]; 45 46 dependencies = [ 47 mergedeep 48 pyyaml 49 toml 50 typing-inspect 51 ]; 52 53 pythonImportsCheck = [ "draccus" ]; 54 55 nativeCheckInputs = [ 56 pytestCheckHook 57 ]; 58 59 meta = { 60 description = "Framework for simple dataclass-based configurations based on Pyrallis"; 61 homepage = "https://github.com/dlwh/draccus"; 62 license = lib.licenses.mit; 63 maintainers = with lib.maintainers; [ GaetanLepage ]; 64 }; 65}