summaryrefslogtreecommitdiff
path: root/nix/derivation.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-09-28 04:56:44 -0400
committerseth <[email protected]>2023-09-28 04:56:44 -0400
commit55d0da1263edeb0af3553c178ca9d9b044e73694 (patch)
treec0b02d19177bda1f59c26476d95718cdbdcd59a2 /nix/derivation.nix
parentb7669b106d397f4823ef8cf52496053d624f0d7c (diff)
fix(flake): use custom buildPhase instead of pypBuildHook
Diffstat (limited to 'nix/derivation.nix')
-rw-r--r--nix/derivation.nix16
1 files changed, 13 insertions, 3 deletions
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];
}