mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-05-26 18:00:20 +00:00
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>
50 lines
810 B
Nix
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"
|
|
];
|
|
};
|
|
})
|