nixpkgs/pkgs/servers/authelia/web.nix
06kellyjac 3e37922c72 authelia: fix update script
Prepare for future release
Don't use a patch that is prone to needing updating
Visibly fail
2023-11-09 12:23:53 +00:00

29 lines
622 B
Nix

{ 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
'';
}