Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 87 lines
Nix
at llvm-cleanup
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788{ 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.16.3"; pyproject = true;
src = fetchFromGitHub { owner = "pydantic"; repo = "pydantic-core"; rev = "refs/tags/v${version}"; hash = "sha256-RXytujvx/23Z24TWpvnHdjJ4/dXqjs5uiavUmukaD9A="; };
patches = [ ./01-remove-benchmark-flags.patch ];
cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; hash = "sha256-wj9u6s/3E3EWfQydkLrwHbJBvm8DwcGCoQQpSw1+q7U="; };
nativeBuildInputs = [ cargo rustPlatform.cargoSetupHook rustc ];
build-system = [ rustPlatform.maturinBuildHook typing-extensions ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
dependencies = [ 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 ]; }; };inpydantic-core