nixpkgs/pkgs/servers/dendrite/default.nix

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

71 lines
1.9 KiB
Nix
Raw Normal View History

2023-08-11 10:26:37 +02:00
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, nix-update-script
2022-05-14 09:04:03 +02:00
, nixosTests, postgresql, postgresqlTestHook }:
2021-01-16 19:06:05 +01:00
buildGoModule rec {
pname = "matrix-dendrite";
2023-07-08 05:24:39 +02:00
version = "0.13.1";
2021-01-16 19:06:05 +01:00
src = fetchFromGitHub {
owner = "matrix-org";
repo = "dendrite";
rev = "v${version}";
2023-07-08 05:24:39 +02:00
hash = "sha256-2DqEfTXD3W6MxfBb6aHaKH+zpxLc2tHaGuWGQuncySo=";
2021-01-16 19:06:05 +01:00
};
patches = [
# Fix SQLite db lockup
(fetchpatch {
url = "https://github.com/matrix-org/dendrite/commit/c08c7405dbe9d88c1364f6f1f2466db5045506cc.patch";
hash = "sha256-gTF9jK5Ihfe1v49gPCK68BLeiUZa2Syo+7D9r62iEXQ=";
})
];
2023-07-08 05:24:39 +02:00
vendorHash = "sha256-dc0zpKh7J+fi2b5GD/0BQ120UXbBvJLUF74RmYMSOMw=";
2022-08-19 23:51:26 +02:00
subPackages = [
# The server
"cmd/dendrite"
# 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"
];
nativeCheckInputs = [
2022-05-01 09:45:12 +02: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-01-16 19:06:05 +01:00
2021-05-14 13:11:22 +02:00
passthru.tests = {
inherit (nixosTests) dendrite;
};
2023-08-11 10:26:37 +02:00
passthru.updateScript = nix-update-script {
extraArgs = [ "--version-regex" "v(.+)" ];
};
2021-05-14 13:11:22 +02:00
2021-01-16 19:06:05 +01:00
meta = with lib; {
2022-05-14 09:04:03 +02:00
homepage = "https://matrix-org.github.io/dendrite";
description = "A second-generation Matrix homeserver written in Go";
2022-10-14 18:06:27 +02:00
changelog = "https://github.com/matrix-org/dendrite/releases/tag/v${version}";
2021-01-16 19:06:05 +01:00
license = licenses.asl20;
maintainers = teams.matrix.members;
platforms = platforms.unix;
};
}