2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, nixosTests
|
|
|
|
, postgresql
|
|
|
|
, postgresqlTestHook
|
|
|
|
}:
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "matrix-dendrite";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.13.6";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matrix-org";
|
|
|
|
repo = "dendrite";
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-R/67y7ZiqH2Yg7JFsNYOuGocvR161srlWjRgjyZsqaE=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
vendorHash = "sha256-/+JSL54y7u7mGeDwAJV17Ibjb/LffitUOgonUd9EzDA=";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
subPackages = [
|
2023-04-12 12:48:02 +00:00
|
|
|
# The server
|
|
|
|
"cmd/dendrite"
|
2022-10-21 18:38:19 +00:00
|
|
|
# admin tools
|
|
|
|
"cmd/create-account"
|
|
|
|
"cmd/generate-config"
|
|
|
|
"cmd/generate-keys"
|
|
|
|
"cmd/resolve-state"
|
|
|
|
## curl, but for federation requests, only useful for developers
|
|
|
|
# "cmd/furl"
|
|
|
|
## an internal tool for upgrading ci tests, only relevant for developers
|
|
|
|
# "cmd/dendrite-upgrade-tests"
|
|
|
|
## tech demos
|
|
|
|
# "cmd/dendrite-demo-pinecone"
|
|
|
|
# "cmd/dendrite-demo-yggdrasil"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
postgresqlTestHook
|
|
|
|
postgresql
|
|
|
|
];
|
|
|
|
|
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
preCheck = ''
|
|
|
|
export PGUSER=$(whoami)
|
|
|
|
# temporarily disable this failing test
|
|
|
|
# it passes in upstream CI and requires further investigation
|
|
|
|
rm roomserver/internal/input/input_test.go
|
|
|
|
'';
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# PostgreSQL's request for a shared memory segment exceeded your kernel's SHMALL parameter
|
2024-02-29 20:09:43 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) dendrite;
|
|
|
|
};
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version-regex" "v(.+)" ];
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://matrix-org.github.io/dendrite";
|
|
|
|
description = "A second-generation Matrix homeserver written in Go";
|
2022-10-21 18:38:19 +00:00
|
|
|
changelog = "https://github.com/matrix-org/dendrite/releases/tag/v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.matrix.members;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|