Files
nixpkgs/pkgs/development/tools/react-static/default.nix
T
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

56 lines
1.3 KiB
Nix

{ lib
, mkYarnPackage
, fetchFromGitHub
, fetchYarnDeps
}:
mkYarnPackage rec {
pname = "react-static";
version = "7.6.2";
src = fetchFromGitHub {
owner = "react-static";
repo = "react-static";
rev = "v${version}";
hash = "sha256-dlYmD0vgEqWxYf7E0VYstZMAuNDGvQP7xDgHo/wmlUs=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-SNnJPUzv+l2HXfA6NKYpJvn/DCX3a42JQ3N0+XYKbd8=";
};
buildPhase = ''
runHook preBuild
yarn --cwd deps/react-static/packages/react-static --offline build
runHook postBuild
'';
doDist = false;
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/node_modules"
mv deps/react-static/packages/react-static "$out/lib/node_modules"
mv node_modules "$out/lib/node_modules/react-static"
ln -s "$out/lib/node_modules/react-static/bin" "$out"
runHook postInstall
'';
meta = {
changelog = "https://github.com/react-static/react-static/blob/${src.rev}/CHANGELOG.md";
description = "Progressive static site generator for React";
homepage = "https://github.com/react-static/react-static";
license = lib.licenses.mit;
mainProgram = "react-static";
maintainers = with lib.maintainers; [ ];
};
}