18 pydantic-core = buildPythonPackage rec {
19 pname = "pydantic-core";
23 src = fetchFromGitHub {
25 repo = "pydantic-core";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-bEVACTlzELXPoCtEHMR1s87KJn/qnE0lO1O4RmdjmPM=";
31 ./01-remove-benchmark-flags.patch
34 cargoDeps = rustPlatform.fetchCargoTarball {
36 name = "${pname}-${version}";
37 hash = "sha256-h9SmMLg/W11h/SQz8Te5OoCKdyG6Fctc5ftqbVQFSwU=";
42 rustPlatform.cargoSetupHook
43 rustPlatform.maturinBuildHook
48 buildInputs = lib.optionals stdenv.isDarwin [
52 propagatedBuildInputs = [
56 pythonImportsCheck = [ "pydantic_core" ];
58 # escape infinite recursion with pydantic via dirty-equals
60 passthru.tests.pytest = pydantic-core.overrideAttrs { doCheck = true; };
71 # RecursionError: maximum recursion depth exceeded while calling a Python object
76 # no point in benchmarking in nixpkgs build farm
81 description = "Core validation logic for pydantic written in rust";
82 homepage = "https://github.com/pydantic/pydantic-core";
83 license = licenses.mit;
84 maintainers = with maintainers; [ blaggacao ];