diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/authelia/web.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/authelia/web.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/authelia/web.nix b/nixpkgs/pkgs/servers/authelia/web.nix new file mode 100644 index 000000000000..74ba11325f87 --- /dev/null +++ b/nixpkgs/pkgs/servers/authelia/web.nix @@ -0,0 +1,28 @@ +{ buildNpmPackage, fetchFromGitHub }: + +let + inherit (import ./sources.nix { inherit fetchFromGitHub; }) pname version src npmDepsHash; +in +buildNpmPackage { + pname = "${pname}-web"; + inherit src version npmDepsHash; + + sourceRoot = "${src.name}/web"; + + postPatch = '' + substituteInPlace ./vite.config.ts \ + --replace 'outDir: "../internal/server/public_html"' 'outDir: "dist"' + 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 + ''; +} |