Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465{ lib, buildPythonPackage, fetchFromGitHub,
# build-system setuptools,
# dependencies mergedeep, pyyaml, toml, typing-inspect,
# tests pytestCheckHook, syrupy,}:
buildPythonPackage (finalAttrs: { pname = "draccus"; version = "0.11.6"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "marin-community"; repo = "draccus"; tag = "v${finalAttrs.version}"; hash = "sha256-L9lvMjd76jm9ZIq5Pl2EOVQP2r4ReWQUOUGOPXDVfEI="; };
# Pass non-callable type= (typing.Union, X | Y) through argparse. postPatch = '' substituteInPlace draccus/wrappers/field_wrapper.py \ --replace-fail \ '_arg_options["type"] = tpe' \ '_arg_options["type"] = tpe if callable(tpe) else str' '';
build-system = [ setuptools ];
dependencies = [ mergedeep pyyaml toml typing-inspect ];
pythonImportsCheck = [ "draccus" ];
nativeCheckInputs = [ pytestCheckHook syrupy ];
meta = { description = "Framework for simple dataclass-based configurations based on Pyrallis"; homepage = "https://github.com/marin-community/draccus"; changelog = "https://github.com/marin-community/draccus/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; };})