2022-05-12 22:55:10 +00:00
|
|
|
{ pkgs, src, version, ... }:
|
|
|
|
|
|
|
|
let
|
2022-05-13 22:31:19 +00:00
|
|
|
nodeComposition = import ./node-composition.nix { inherit pkgs src; };
|
2022-05-12 22:55:10 +00:00
|
|
|
in
|
|
|
|
pkgs.runCommand "authentik-docs-${version}" {
|
|
|
|
inherit src;
|
|
|
|
nativeBuildInputs = [ nodeComposition.nodeDependencies ];
|
|
|
|
nodeDependencies = nodeComposition.nodeDependencies;
|
|
|
|
} ''
|
|
|
|
export PATH="$nodeDependencies/bin:$PATH"
|
|
|
|
|
|
|
|
cp -r $src/website $NIX_BUILD_TOP/website
|
2022-08-16 21:39:43 +00:00
|
|
|
cp -r $src/blueprints $NIX_BUILD_TOP/blueprints
|
|
|
|
chmod -R +w $NIX_BUILD_TOP/website $NIX_BUILD_TOP/blueprints
|
2022-05-12 22:55:10 +00:00
|
|
|
|
|
|
|
cd $NIX_BUILD_TOP/website
|
|
|
|
ln -s $nodeDependencies/lib/node_modules ./node_modules
|
|
|
|
|
|
|
|
docusaurus build --config docusaurus.docs-only.js --out-dir $NIX_BUILD_TOP/out
|
|
|
|
|
|
|
|
mv $NIX_BUILD_TOP/out $out
|
|
|
|
''
|