Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
fetchpatch2,
# build-system
setuptools,
# dependencies
mergedeep,
pyyaml,
toml,
typing-inspect,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "draccus";
version = "0.11.5";
pyproject = true;
# No (recent) tags on GitHub
src = fetchPypi {
inherit pname version;
hash = "sha256-uC4sICcDCuGg8QVRUSX5FOBQwHZqtRjfOgVgoH0Q3ck=";
};
patches = [
(fetchpatch2 {
# TODO: remove when updating to the next release
# Removes the pyyaml-include~=1.4 dependency
# https://github.com/dlwh/draccus/issues/46#issuecomment-3180810991
name = "remove-pyyaml-include-dep.patch";
url = "https://github.com/dlwh/draccus/commit/3a6db0bc786e46cc13c481bc2235101d7a411441.patch";
hash = "sha256-0OLUjXJSZ9eIL8dgE8o1Mg0HIMX+4XABSf0tYNFWn8I=";
})
];
build-system = [
setuptools
];
dependencies = [
mergedeep
pyyaml
toml
typing-inspect
];
pythonImportsCheck = [ "draccus" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = {
description = "Framework for simple dataclass-based configurations based on Pyrallis";
homepage = "https://github.com/dlwh/draccus";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}