Sefa Eyeoglu a8c9a2aa3e
treewide: adjust pnpm.fetchDeps parameter order
It is more common to specify hash as the last attribute of fetcher
function args. Let's move fetcherVersion right above hash for all
occurrences.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2025-07-15 15:09:16 +02:00

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