From 55d0da1263edeb0af3553c178ca9d9b044e73694 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 28 Sep 2023 04:56:44 -0400 Subject: fix(flake): use custom buildPhase instead of pypBuildHook --- nix/derivation.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'nix/derivation.nix') diff --git a/nix/derivation.nix b/nix/derivation.nix index 4e32095..483aeef 100644 --- a/nix/derivation.nix +++ b/nix/derivation.nix @@ -6,16 +6,26 @@ pydantic, uvicorn, self, - version, + build, + wheel, }: buildPythonPackage { pname = "guzzle-api"; - inherit version; + version = builtins.substring 0 8 self.lastModifiedDate or "dirty"; src = lib.cleanSource self; format = "flit"; doCheck = false; + dontUsePypaBuild = true; + + # TODO: find out what's going on with pypaBuildHook + buildPhase = '' + runHook preBuild + pyproject-build --no-isolation --outdir dist/ --wheel $pypaBuildFlags + runHook postBuild + ''; + propagatedBuildInputs = [fastapi pydantic uvicorn]; - propagatedNativeBuildInputs = [flit-core]; + nativeBuildInputs = [flit-core build wheel]; } -- cgit v1.2.3