2024-10-15 11:03:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildGoModule,
|
|
|
|
nixosTests,
|
2023-05-19 17:14:24 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
owner = "superseriousbusiness";
|
|
|
|
repo = "gotosocial";
|
|
|
|
|
2024-10-31 15:06:23 +00:00
|
|
|
version = "0.17.3";
|
2023-05-19 17:14:24 +00:00
|
|
|
|
|
|
|
web-assets = fetchurl {
|
|
|
|
url = "https://github.com/${owner}/${repo}/releases/download/v${version}/${repo}_${version}_web-assets.tar.gz";
|
2024-10-31 15:06:23 +00:00
|
|
|
hash = "sha256-85CmcWjcX8a+hZxkyRTfXErmkIx64R2scaaS2Fpf668";
|
2023-05-19 17:14:24 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
buildGoModule rec {
|
|
|
|
inherit version;
|
|
|
|
pname = repo;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit owner repo;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-31 15:06:23 +00:00
|
|
|
hash = "sha256-ql0tDaMc/1NgsLUpPHZB6GoXJj9DwUpadTX3AYufR/o=";
|
2023-05-19 17:14:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X main.Version=${version}"
|
|
|
|
];
|
|
|
|
|
2024-09-28 20:02:39 +00:00
|
|
|
tags = [
|
|
|
|
"kvformat"
|
|
|
|
];
|
|
|
|
|
2023-05-19 17:14:24 +00:00
|
|
|
postInstall = ''
|
|
|
|
tar xf ${web-assets}
|
|
|
|
mkdir -p $out/share/gotosocial
|
|
|
|
mv web $out/share/gotosocial/
|
|
|
|
'';
|
|
|
|
|
|
|
|
# tests are working only on x86_64-linux
|
2024-04-20 12:12:56 +00:00
|
|
|
# doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64;
|
|
|
|
# checks are currently very unstable in our setup, so we should test manually for now
|
|
|
|
doCheck = false;
|
2023-05-19 17:14:24 +00:00
|
|
|
|
2024-03-15 04:55:07 +00:00
|
|
|
checkFlags =
|
|
|
|
let
|
|
|
|
# flaky / broken tests
|
|
|
|
skippedTests = [
|
|
|
|
# See: https://github.com/superseriousbusiness/gotosocial/issues/2651
|
|
|
|
"TestPage/minID,_maxID_and_limit_set"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
2024-02-17 15:16:18 +00:00
|
|
|
|
2023-05-19 18:18:17 +00:00
|
|
|
passthru.tests.gotosocial = nixosTests.gotosocial;
|
|
|
|
|
2023-05-19 17:14:24 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gotosocial.org";
|
|
|
|
changelog = "https://github.com/superseriousbusiness/gotosocial/releases/tag/v${version}";
|
|
|
|
description = "Fast, fun, ActivityPub server, powered by Go";
|
|
|
|
longDescription = ''
|
|
|
|
ActivityPub social network server, written in Golang.
|
|
|
|
You can keep in touch with your friends, post, read, and
|
|
|
|
share images and articles. All without being tracked or
|
|
|
|
advertised to! A light-weight alternative to Mastodon
|
|
|
|
and Pleroma, with support for clients!
|
|
|
|
'';
|
2024-04-22 16:19:01 +00:00
|
|
|
maintainers = with maintainers; [ blakesmith ];
|
2023-05-19 17:14:24 +00:00
|
|
|
license = licenses.agpl3Only;
|
|
|
|
};
|
|
|
|
}
|