diff options
Diffstat (limited to 'modules/authentik/authentik-server.nix')
| -rw-r--r-- | modules/authentik/authentik-server.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/authentik/authentik-server.nix b/modules/authentik/authentik-server.nix new file mode 100644 index 0000000..8fefc95 --- /dev/null +++ b/modules/authentik/authentik-server.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, buildGoModule, fetchFromGitHub, python3Packages, makeWrapper, callPackage, ... }: + +let authentik = callPackage ./authentik.nix { }; +in +buildGoModule rec { + pname = "authentik-server"; + version = "2023.8.3"; + + src = fetchFromGitHub { + owner = "goauthentik"; + repo = "authentik"; + rev = "version/${version}"; + hash = "sha256-dpGvxhA5NWO8LKrGXzalV9EVn/nUIj6sMy2HdY5tjlM="; + }; + + vendorHash = "sha256-F3JzzL6Gg9H4qdmp4MbQFupccATYIUIFL05is6xzoZY="; + + subPackages = [ "cmd/server" ]; + + postPatch = '' + substituteInPlace internal/gounicorn/gounicorn.go \ + --replace "./manage.py" "${authentik}/bin/manage.py" + + substituteInPlace internal/gounicorn/gounicorn.go \ + --replace "./lifecycle" "${authentik}/bin" + ''; + + postInstall = '' + wrapProgram "$out/bin/server" --set PATH ${python3Packages.gunicorn}/bin + ''; + + nativeBuildInputs = [ makeWrapper ]; +} |
