nixpkgs/pkgs/tools/admin/synapse-admin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.2 KiB
Nix
Raw Normal View History

2021-11-05 18:18:40 +01:00
{ lib
, stdenv
, fetchFromGitHub
2021-11-05 18:18:40 +01:00
, fetchzip
, mkYarnPackage
, baseUrl ? null
2021-11-05 18:18:40 +01:00
}:
mkYarnPackage rec {
2021-11-05 18:18:40 +01:00
pname = "synapse-admin";
2022-02-20 19:21:33 +01:00
version = "0.8.5";
src = fetchFromGitHub {
owner = "Awesome-Technologies";
repo = pname;
rev = version;
sha256 = "sha256-0miHtEJ5e8MaqGc4ezPvwhGjoCZyOE7md0DUCC/ZOfk=";
2021-11-05 18:18:40 +01:00
};
yarnNix = ./yarn.nix;
yarnLock = ./yarn.lock;
packageJSON = ./package.json;
NODE_ENV = "production";
${if baseUrl != null then "REACT_APP_SERVER" else null} = baseUrl;
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
pushd deps/synapse-admin
mv node_modules node_modules.bak
cp -r $(readlink -f node_modules.bak) node_modules
chmod +w node_modules
yarn --offline run build
popd
runHook postBuild
2021-11-05 18:18:40 +01:00
'';
distPhase = ''
runHook preDist
mkdir -p $out
cp -r deps/synapse-admin/build/* $out
runHook postDist
'';
dontFixup = true;
dontInstall = true;
2021-11-05 18:18:40 +01:00
meta = with lib; {
description = "Admin UI for Synapse Homeservers";
homepage = "https://github.com/Awesome-Technologies/synapse-admin";
license = licenses.asl20;
2021-11-05 18:18:40 +01:00
platforms = platforms.all;
maintainers = with maintainers; [ mkg20001 ma27 ];
2021-11-05 18:18:40 +01:00
};
}