Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
56 lines
860 B
Nix
56 lines
860 B
Nix
{
|
|
stdenv,
|
|
nodejs,
|
|
pnpm,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
let
|
|
inherit (import ./sources.nix { inherit fetchFromGitHub; })
|
|
pname
|
|
version
|
|
src
|
|
pnpmDepsHash
|
|
;
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "${pname}-web";
|
|
inherit src version;
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/web";
|
|
|
|
nativeBuildInputs = [
|
|
nodejs
|
|
pnpm.configHook
|
|
];
|
|
|
|
pnpmDeps = pnpm.fetchDeps {
|
|
inherit (finalAttrs)
|
|
pname
|
|
version
|
|
src
|
|
sourceRoot
|
|
;
|
|
fetcherVersion = 1;
|
|
hash = pnpmDepsHash;
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace ./vite.config.ts \
|
|
--replace 'outDir: "../internal/server/public_html"' 'outDir: "dist"'
|
|
'';
|
|
|
|
postBuild = ''
|
|
pnpm run build
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share
|
|
mv dist $out/share/authelia-web
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|