Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 88 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889{ stdenv, lib, buildPythonPackage, fetchFromGitHub, cargo, rustPlatform, rustc, libiconv, typing-extensions, pytestCheckHook, hypothesis, pytest-timeout, pytest-mock, dirty-equals}:
let pydantic-core = buildPythonPackage rec { pname = "pydantic-core"; version = "2.14.5"; format = "pyproject";
src = fetchFromGitHub { owner = "pydantic"; repo = "pydantic-core"; rev = "refs/tags/v${version}"; hash = "sha256-UguZpA3KEutOgIavjx8Ie//0qJq+4FTZNQTwb/ZIgb8="; };
patches = [ ./01-remove-benchmark-flags.patch ];
cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; hash = "sha256-mMgw922QjHmk0yimXfolLNiYZntTsGydQywe7PTNnwc="; };
nativeBuildInputs = [ cargo rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook rustc typing-extensions ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
propagatedBuildInputs = [ typing-extensions ];
pythonImportsCheck = [ "pydantic_core" ];
# escape infinite recursion with pydantic via dirty-equals doCheck = false; passthru.tests.pytest = pydantic-core.overrideAttrs { doCheck = true; };
nativeCheckInputs = [ pytestCheckHook hypothesis pytest-timeout dirty-equals pytest-mock ];
disabledTests = [ # RecursionError: maximum recursion depth exceeded while calling a Python object "test_recursive" ];
disabledTestPaths = [ # no point in benchmarking in nixpkgs build farm "tests/benchmarks" ];
meta = with lib; { changelog = "https://github.com/pydantic/pydantic-core/releases/tag/v${version}"; description = "Core validation logic for pydantic written in rust"; homepage = "https://github.com/pydantic/pydantic-core"; license = licenses.mit; maintainers = with maintainers; [ blaggacao ]; }; };in pydantic-core