Add RAC outpost
Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
This commit is contained in:
parent
3082a94074
commit
e31ed431d7
2 changed files with 73 additions and 0 deletions
|
|
@ -5,8 +5,13 @@
|
|||
buildGo124Module,
|
||||
lib,
|
||||
makeWrapper,
|
||||
guacamole-server,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
let
|
||||
guacamoleAvailable = lib.meta.availableOn stdenv.hostPlatform guacamole-server;
|
||||
in
|
||||
buildGo124Module {
|
||||
pname = "authentik-gopkgs";
|
||||
version = authentik-version;
|
||||
|
|
@ -14,6 +19,10 @@ buildGo124Module {
|
|||
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
|
||||
'' + 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;
|
||||
|
|
@ -41,12 +50,16 @@ buildGo124Module {
|
|||
"ldap"
|
||||
"proxy"
|
||||
"radius"
|
||||
] ++ lib.optionals guacamoleAvailable [
|
||||
"rac"
|
||||
];
|
||||
subPackages = [
|
||||
"cmd/ldap"
|
||||
"cmd/server"
|
||||
"cmd/proxy"
|
||||
"cmd/radius"
|
||||
] ++ lib.optionals guacamoleAvailable [
|
||||
"cmd/rac"
|
||||
];
|
||||
vendorHash = "sha256-wTTEDBRYCW1UFaeX49ufLT0c17sacJzcCaW/8cPNYR4=";
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
|
@ -59,5 +72,8 @@ buildGo124Module {
|
|||
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/
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue