biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / react-static / default.nix
blobd4552f68761a5c69cc19249d05fa89102b6ff2a9
1 { lib
2 , mkYarnPackage
3 , fetchFromGitHub
4 , fetchYarnDeps
5 }:
7 mkYarnPackage rec {
8   pname = "react-static";
9   version = "7.6.2";
11   src = fetchFromGitHub {
12     owner = "react-static";
13     repo = "react-static";
14     rev = "v${version}";
15     hash = "sha256-dlYmD0vgEqWxYf7E0VYstZMAuNDGvQP7xDgHo/wmlUs=";
16   };
18   packageJSON = ./package.json;
20   offlineCache = fetchYarnDeps {
21     yarnLock = "${src}/yarn.lock";
22     hash = "sha256-SNnJPUzv+l2HXfA6NKYpJvn/DCX3a42JQ3N0+XYKbd8=";
23   };
25   buildPhase = ''
26     runHook preBuild
28     yarn --cwd deps/react-static/packages/react-static --offline build
30     runHook postBuild
31   '';
33   doDist = false;
35   installPhase = ''
36     runHook preInstall
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"
42     ln -s "$out/lib/node_modules/react-static/bin" "$out"
44     runHook postInstall
45   '';
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   };