2023-09-12 08:44:05 -06:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, go
|
|
|
|
, ffmpeg
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2024-10-15 08:21:17 -06:00
|
|
|
gotosocialVersion = "0.17.0";
|
|
|
|
gtswaHash = "sha256:1i6ks3dlmaq9g8a1fka26fgrcy9ps0kxmyvqhzjdkabwzwhqyah1";
|
|
|
|
gtssHash = "sha256-uyqP3zhjcXKejGFAwZoTn2kY8IpX0QAAXNzb1VG6ve8=";
|
2022-09-12 21:48:43 -06:00
|
|
|
gotosocialWebAssets = builtins.fetchurl {
|
2023-07-11 09:12:50 -06:00
|
|
|
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v${gotosocialVersion}/gotosocial_${gotosocialVersion}_web-assets.tar.gz";
|
2023-02-17 05:44:31 -07:00
|
|
|
sha256 = gtswaHash;
|
2022-09-12 21:48:43 -06:00
|
|
|
};
|
2023-07-11 09:12:50 -06:00
|
|
|
in
|
2023-09-12 08:44:05 -06:00
|
|
|
with lib;
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gotosocial";
|
|
|
|
version = gotosocialVersion;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "superseriousbusiness";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = gtssHash;
|
|
|
|
};
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-extldflags '-static'"
|
|
|
|
"-X 'main.Commit=${version}'"
|
|
|
|
"-X 'main.Version=${version}'"
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ffmpeg ];
|
|
|
|
|
|
|
|
proxyVendor = false;
|
2023-11-15 10:23:30 -07:00
|
|
|
vendorHash = null;
|
2023-09-12 08:44:05 -06:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
echo ${go}/bin/go
|
|
|
|
${go}/bin/go version
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/assets
|
|
|
|
tar -C $out/assets/ -zxvf ${gotosocialWebAssets}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Fast, fun, ActivityPub server, powered by Go.";
|
|
|
|
homepage = "https://github.com/superseriousbusiness/gotosocial";
|
2024-05-31 07:51:16 -06:00
|
|
|
license = licenses.agpl3Only;
|
2023-09-12 08:44:05 -06:00
|
|
|
maintainers = with maintainers; [ qbit ];
|
|
|
|
};
|
|
|
|
}
|