2023-03-27 19:17:25 +00:00
|
|
|
{ buildNpmPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (import ./sources.nix { inherit fetchFromGitHub; }) pname version src npmDepsHash;
|
|
|
|
in
|
|
|
|
buildNpmPackage {
|
|
|
|
pname = "${pname}-web";
|
|
|
|
inherit src version npmDepsHash;
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/web";
|
2023-03-27 19:17:25 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace ./vite.config.ts \
|
|
|
|
--replace 'outDir: "../internal/server/public_html"' 'outDir: "dist"'
|
2023-03-27 19:17:25 +00:00
|
|
|
cp ${./package-lock.json} ./package-lock.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share
|
|
|
|
mv dist $out/share/authelia-web
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|