Files
tranquil-pds/frontend.nix
isabel 1901b0a630 fix(nix): build against pnpm 11
side note: you may also notice that I have removed the `github:` url for
nixpkgs this is because it save a massive 15mb, is faster and more
reliable than github
See also:
-
<https://nix.dev/manual/nix/stable/protocols/tarball-fetcher#lockable-http-tarball-protocol>
-
<http://web.archive.org/web/20250806225139/https://nix.dev/manual/nix/2.28/protocols/tarball-fetcher#lockable-http-tarball-protocol>
2026-05-14 21:37:28 +03:00

50 lines
810 B
Nix

{
lib,
stdenvNoCC,
nodejs,
pnpm,
pnpmConfigHook,
fetchPnpmDeps,
nix-update-script,
}:
let
toml = (lib.importTOML ./Cargo.toml).workspace.package;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "tranquil-frontend";
inherit (toml) version;
src = ./frontend;
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
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"
];
};
})