Merge pull request #180020 from Ma27/synapse-admin-src

synapse-admin: source build
This commit is contained in:
Maximilian Bosch 2022-07-05 13:03:14 +02:00 committed by GitHub
commit 24b6540f33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24832 additions and 8 deletions

View file

@ -1,26 +1,59 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchzip
, mkYarnPackage
, baseUrl ? null
}:
stdenv.mkDerivation rec {
mkYarnPackage rec {
pname = "synapse-admin";
version = "0.8.5";
src = fetchzip {
url = "https://github.com/Awesome-Technologies/synapse-admin/releases/download/${version}/synapse-admin-${version}.tar.gz";
hash = "sha256-5wMKRaLMVJer6W2q2WuofgzVwr8Myi90DQ8tBVAoUX4=";
src = fetchFromGitHub {
owner = "Awesome-Technologies";
repo = pname;
rev = version;
sha256 = "sha256-0miHtEJ5e8MaqGc4ezPvwhGjoCZyOE7md0DUCC/ZOfk=";
};
installPhase = ''
cp -r . $out
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
'';
distPhase = ''
runHook preDist
mkdir -p $out
cp -r deps/synapse-admin/build/* $out
runHook postDist
'';
dontFixup = true;
dontInstall = true;
meta = with lib; {
description = "Admin UI for Synapse Homeservers";
homepage = "https://github.com/Awesome-Technologies/synapse-admin";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ mkg20001 ];
maintainers = with maintainers; [ mkg20001 ma27 ];
};
}

View file

@ -0,0 +1,61 @@
{
"name": "synapse-admin",
"version": "0.8.5",
"description": "Admin GUI for the Matrix.org server Synapse",
"author": "Awesome Technologies Innovationslabor GmbH",
"license": "Apache-2.0",
"homepage": ".",
"repository": {
"type": "git",
"url": "https://github.com/Awesome-Technologies/synapse-admin"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.1.1",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^13.1.8",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.1.2",
"jest-fetch-mock": "^3.0.3",
"prettier": "^2.2.0",
"ra-test": "^3.15.0"
},
"dependencies": {
"papaparse": "^5.2.0",
"prop-types": "^15.7.2",
"ra-language-chinese": "^2.0.10",
"ra-language-german": "^3.13.4",
"react": "^17.0.0",
"react-admin": "^3.19.7",
"react-dom": "^17.0.2",
"react-scripts": "^4.0.0"
},
"scripts": {
"start": "REACT_APP_VERSION=$(git describe --tags) react-scripts start",
"build": "REACT_APP_VERSION=$(git describe --tags) react-scripts build",
"fix:other": "yarn prettier --write",
"fix:code": "yarn test:lint --fix",
"fix": "yarn fix:code && yarn fix:other",
"prettier": "prettier --ignore-path .gitignore \"**/*.{js,jsx,json,md,scss,yaml,yml}\"",
"test:code": "react-scripts test",
"test:lint": "eslint --ignore-path .gitignore --ext .js,.jsx .",
"test:style": "yarn prettier --list-different",
"test": "yarn test:style && yarn test:lint && yarn test:code",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff