at 23.11-beta 1.3 kB view raw
1{ lib 2, mkYarnPackage 3, fetchFromGitHub 4, fetchYarnDeps 5}: 6 7mkYarnPackage rec { 8 pname = "react-static"; 9 version = "7.6.2"; 10 11 src = fetchFromGitHub { 12 owner = "react-static"; 13 repo = "react-static"; 14 rev = "v${version}"; 15 hash = "sha256-dlYmD0vgEqWxYf7E0VYstZMAuNDGvQP7xDgHo/wmlUs="; 16 }; 17 18 packageJSON = ./package.json; 19 20 offlineCache = fetchYarnDeps { 21 yarnLock = "${src}/yarn.lock"; 22 hash = "sha256-SNnJPUzv+l2HXfA6NKYpJvn/DCX3a42JQ3N0+XYKbd8="; 23 }; 24 25 buildPhase = '' 26 runHook preBuild 27 28 yarn --cwd deps/react-static/packages/react-static --offline build 29 30 runHook postBuild 31 ''; 32 33 doDist = false; 34 35 installPhase = '' 36 runHook preInstall 37 38 mkdir -p "$out/lib/node_modules" 39 mv deps/react-static/packages/react-static "$out/lib/node_modules" 40 mv node_modules "$out/lib/node_modules/react-static" 41 42 ln -s "$out/lib/node_modules/react-static/bin" "$out" 43 44 runHook postInstall 45 ''; 46 47 meta = { 48 changelog = "https://github.com/react-static/react-static/blob/${src.rev}/CHANGELOG.md"; 49 description = "A progressive static site generator for React"; 50 homepage = "https://github.com/react-static/react-static"; 51 license = lib.licenses.mit; 52 mainProgram = "react-static"; 53 maintainers = with lib.maintainers; [ ]; 54 }; 55}