Flake lock file updates:
• Updated input 'authentik-go':
'github:goauthentik/client-go/4c1444ee54d945fbcc5ae107b4f191ca0352023d' (2026-02-23)
→ 'github:goauthentik/client-go/58f64509446aab6bc2d9b1fe36be19b5f2a3b4a8' (2026-05-13)
• Updated input 'flake-parts':
'github:hercules-ci/flake-parts/57928607ea566b5db3ad13af0e57e921e6b12381' (2026-02-02)
→ 'github:hercules-ci/flake-parts/f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb' (2026-05-13)
• Updated input 'flake-parts/nixpkgs-lib':
'github:nix-community/nixpkgs.lib/72716169fe93074c333e8d0173151350670b824c' (2026-02-01)
→ 'github:nix-community/nixpkgs.lib/f5901329dade4a6ea039af1433fb087bd9c1fe14' (2026-04-26)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/2fc6539b481e1d2569f25f8799236694180c0993' (2026-02-23)
→ 'github:NixOS/nixpkgs/da5ad661ba4e5ef59ba743f0d112cbc30e474f32' (2026-05-10)
• Updated input 'pyproject-build-systems':
'github:pyproject-nix/build-system-pkgs/04e9c186e01f0830dad3739088070e4c551191a4' (2026-02-18)
→ 'github:pyproject-nix/build-system-pkgs/ffaa2161dd5d63e0e94591f86b54fc239660fb2e' (2026-04-20)
• Updated input 'pyproject-nix':
'github:pyproject-nix/pyproject.nix/eb204c6b3335698dec6c7fc1da0ebc3c6df05937' (2026-02-19)
→ 'github:pyproject-nix/pyproject.nix/69f57f27e52a87c54e28138a75ec741cd46663c9' (2026-04-20)
• Updated input 'uv2nix':
'github:pyproject-nix/uv2nix/5ad90d48b80ecc920ca2247d53f46beba302e186' (2026-05-04)
→ 'github:pyproject-nix/uv2nix/b48abe99ef639cd100c224898529370e5d935294' (2026-05-13)
87 lines
2.4 KiB
Nix
87 lines
2.4 KiB
Nix
{
|
|
authentik-src,
|
|
authentik-version,
|
|
authentikComponents,
|
|
buildGo125Module,
|
|
lib,
|
|
makeWrapper,
|
|
guacamole-server,
|
|
stdenv,
|
|
patches,
|
|
generatedGoClient,
|
|
}:
|
|
|
|
let
|
|
guacamoleAvailable = lib.meta.availableOn stdenv.hostPlatform guacamole-server;
|
|
|
|
in
|
|
buildGo125Module {
|
|
pname = "authentik-gopkgs";
|
|
version = authentik-version;
|
|
inherit patches;
|
|
prePatch = ''
|
|
sed -i"" -e 's,./web/dist/,${authentikComponents.frontend}/dist/,' web/static.go
|
|
sed -i"" -e 's,./web/dist/,${authentikComponents.frontend}/dist/,' internal/web/static.go
|
|
sed -i"" -e 's,./lifecycle/gunicorn.conf.py,${authentikComponents.staticWorkdirDeps}/lifecycle/gunicorn.conf.py,' internal/gounicorn/gounicorn.go
|
|
cp --no-preserve=mode -vr ${generatedGoClient} gen-go-api
|
|
echo "replace goauthentik.io/api/v3 => ./gen-go-api" >>go.mod
|
|
go mod edit -require=goauthentik.io/api/v3@v3.0.0
|
|
'' + lib.optionalString guacamoleAvailable ''
|
|
substituteInPlace internal/outpost/rac/guacd.go \
|
|
--replace-fail '/opt/guacamole/sbin/guacd' \
|
|
"${lib.getExe guacamole-server}"
|
|
'';
|
|
src = lib.cleanSourceWith {
|
|
src = authentik-src;
|
|
filter = (
|
|
path: _:
|
|
(builtins.any (x: x) (
|
|
(map (infix: lib.hasInfix infix path) [
|
|
"/authentik"
|
|
"/cmd"
|
|
"/internal"
|
|
])
|
|
++ (map (suffix: lib.hasSuffix suffix path) [
|
|
"/web"
|
|
"/web/static.go"
|
|
"/web/robots.txt"
|
|
"/web/security.txt"
|
|
"go.mod"
|
|
"go.sum"
|
|
"schema.yml"
|
|
])
|
|
))
|
|
);
|
|
};
|
|
outputs = [
|
|
"out"
|
|
"ldap"
|
|
"proxy"
|
|
"radius"
|
|
] ++ lib.optionals guacamoleAvailable [
|
|
"rac"
|
|
];
|
|
subPackages = [
|
|
"cmd/ldap"
|
|
"cmd/server"
|
|
"cmd/proxy"
|
|
"cmd/radius"
|
|
] ++ lib.optionals guacamoleAvailable [
|
|
"cmd/rac"
|
|
];
|
|
vendorHash = "sha256-z/DAULXxj1xpaZxWiUa0GKJjVAYMLodqCQs9euQ/cpk=";
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
doCheck = false;
|
|
postInstall = ''
|
|
wrapProgram $out/bin/server --prefix PATH : ${authentikComponents.pythonEnv}/bin
|
|
wrapProgram $out/bin/server --prefix PYTHONPATH : ${authentikComponents.staticWorkdirDeps}
|
|
|
|
mkdir -p $ldap/bin $proxy/bin $radius/bin
|
|
mv $out/bin/ldap $ldap/bin/
|
|
mv $out/bin/proxy $proxy/bin/
|
|
mv $out/bin/radius $radius/bin/
|
|
'' + lib.optionalString guacamoleAvailable ''
|
|
mkdir -p $rac/bin
|
|
mv $out/bin/rac $rac/bin/
|
|
'';
|
|
}
|