evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / sy / synapse-admin / package.nix
blob250a0721f56b416da93b97feead86f3a551acd32
1 { lib
2 , fetchFromGitHub
3 , fetchYarnDeps
4 , mkYarnPackage
5 , baseUrl ? null
6 , writeShellScriptBin
7 }:
9 mkYarnPackage rec {
10   pname = "synapse-admin";
11   version = "0.10.0";
12   src = fetchFromGitHub {
13     owner = "Awesome-Technologies";
14     repo = pname;
15     rev = version;
16     sha256 = "sha256-3MC5PCEwYfZzJy9AW9nHTpvU49Lk6wbYC4Rcv9J9MEg=";
17   };
19   packageJSON = ./package.json;
21   offlineCache = fetchYarnDeps {
22     yarnLock = "${src}/yarn.lock";
23     hash = "sha256-vpCwPL1B+hbIaVSHtlkGjPAteu9BFNNmCTE66CSyFkg=";
24   };
26   nativeBuildInputs = [
27     (writeShellScriptBin "git" "echo ${version}")
28   ];
30   NODE_ENV = "production";
31   ${if baseUrl != null then "REACT_APP_SERVER" else null} = baseUrl;
33   # error:0308010C:digital envelope routines::unsupported
34   NODE_OPTIONS = "--openssl-legacy-provider";
36   buildPhase = ''
37     runHook preBuild
39     export HOME=$(mktemp -d)
40     yarn --offline run build
42     runHook postBuild
43   '';
45   distPhase = ''
46     runHook preDist
48     cp -r deps/synapse-admin/dist $out
50     runHook postDist
51   '';
53   dontFixup = true;
54   dontInstall = true;
56   meta = with lib; {
57     description = "Admin UI for Synapse Homeservers";
58     homepage = "https://github.com/Awesome-Technologies/synapse-admin";
59     license = licenses.asl20;
60     platforms = platforms.all;
61     maintainers = with maintainers; [ mkg20001 ma27 ];
62   };