synapse-admin-etkecc: init at 0.10.3-etke39

This commit is contained in:
Defelo 2025-04-08 10:56:32 +02:00
parent bfc70ec995
commit 2e4e1472df
No known key found for this signature in database
GPG Key ID: 2A05272471204DD3

View File

@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
nix-update-script,
writers,
baseUrl ? null,
}:
assert lib.asserts.assertMsg (
baseUrl == null
) "The baseUrl parameter is deprecated, please use .withConfig instead";
stdenv.mkDerivation (finalAttrs: {
pname = "synapse-admin-etkecc";
version = "0.10.3-etke39";
src = fetchFromGitHub {
owner = "etkecc";
repo = "synapse-admin";
tag = "v${finalAttrs.version}";
hash = "sha256-1jE4QrHAnH27FrfpgM8rKd4I2AAJArtL0jgcWVc8TrU=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-60rS/OfPEQmmZ5j7mUjMPyK9prgNOX7MkYpu9djdjxQ=";
};
nativeBuildInputs = [
nodejs
yarnConfigHook
yarnBuildHook
];
env = {
NODE_ENV = "production";
SYNAPSE_ADMIN_VERSION = finalAttrs.version;
};
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
passthru = {
# https://github.com/etkecc/synapse-admin/blob/main/docs/config.md
withConfig =
config:
stdenv.mkDerivation {
inherit (finalAttrs) version meta;
pname = "synapse-admin-etkecc-with-config";
dontUnpack = true;
configFile = writers.writeJSON "synapse-admin-config" config;
installPhase = ''
runHook preInstall
cp -r ${finalAttrs.finalPackage} $out
chmod -R +w $out
cp $configFile $out/config.json
runHook postInstall
'';
};
updateScript = nix-update-script { };
};
meta = {
description = "Maintained fork of the admin console for (Matrix) Synapse homeservers, including additional features";
homepage = "https://github.com/etkecc/synapse-admin";
changelog = "https://github.com/etkecc/synapse-admin/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ defelo ];
};
})