Files
tranquil-pds/frontend.nix
T
isabel f24a9f8bc0 build(nix): frontend pin pnpm
some future protections against this acursed toolchain breaking and
people who do .follows on their nixpkgs inputs
2026-05-22 23:24:45 +03:00

52 lines
849 B
Nix

{
lib,
stdenvNoCC,
nodejs,
pnpm_11,
pnpmConfigHook,
fetchPnpmDeps,
nix-update-script,
}:
let
toml = (lib.importTOML ./Cargo.toml).workspace.package;
pnpm = pnpm_11;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "tranquil-frontend";
inherit (toml) version;
src = ./frontend;
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-qbmIAvE/3u/NB5x9bERCGQqwiDLkzjff3QchgR+ZDFs=";
};
nativeBuildInputs = [
pnpm
nodejs
pnpmConfigHook
];
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r ./dist $out
runHook postInstall
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version"
"SKIP"
];
};
})