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.
24 lines
578 B
Nix
24 lines
578 B
Nix
{ authentik-src
|
|
, authentik-version
|
|
, authentikComponents
|
|
, buildNapalmPackage
|
|
, nodejs_21
|
|
}:
|
|
|
|
buildNapalmPackage "${authentik-src}/web" rec {
|
|
version = authentik-version; # 0.0.0 specified upstream in package.json
|
|
NODE_ENV = "production";
|
|
nodejs = nodejs_21;
|
|
preBuild = ''
|
|
ln -sv ${authentikComponents.docs} ../website
|
|
'';
|
|
npmCommands = [
|
|
"npm install --include=dev --nodedir=${nodejs}/include/node --loglevel verbose --ignore-scripts"
|
|
"npm run build"
|
|
];
|
|
installPhase = ''
|
|
mkdir $out
|
|
mv dist $out/dist
|
|
cp -r authentik icons $out
|
|
'';
|
|
}
|