Before this change it was very inconvenient to override specific dependencies, e.g. patching something in pythonEnv and having its dependents use that patched version. This is just a step towards better overridability for the individual authentik components, because patched versions of components still need to be manually passed to their dependents. An overlay-like approach would be even better.
21 lines
535 B
Nix
21 lines
535 B
Nix
{ authentik-src
|
|
, authentik-version
|
|
, buildNapalmPackage
|
|
, nodejs_20
|
|
}:
|
|
|
|
buildNapalmPackage "${authentik-src}/website" {
|
|
version = authentik-version; # 0.0.0 specified upstream in package.json
|
|
NODE_ENV = "production";
|
|
nodejs = nodejs_20;
|
|
npmCommands = [
|
|
"cp -v ${authentik-src}/SECURITY.md ../SECURITY.md"
|
|
"cp -vr ${authentik-src}/blueprints ../blueprints"
|
|
"npm install --include=dev"
|
|
"npm run build-docs-only"
|
|
];
|
|
installPhase = ''
|
|
rm -r ../website/node_modules/.cache
|
|
mv -v ../website $out
|
|
'';
|
|
}
|