summaryrefslogtreecommitdiff
path: root/nix/derivation.nix
blob: 483aeef724f25c3a25a09bef455047b8dc227746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
  lib,
  buildPythonPackage,
  flit-core,
  fastapi,
  pydantic,
  uvicorn,
  self,
  build,
  wheel,
}:
buildPythonPackage {
  pname = "guzzle-api";
  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];
  nativeBuildInputs = [flit-core build wheel];
}