mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-07-20 23:12:48 +00:00
f24a9f8bc0
some future protections against this acursed toolchain breaking and people who do .follows on their nixpkgs inputs
52 lines
849 B
Nix
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"
|
|
];
|
|
};
|
|
})
|