2023-07-11 09:12:50 -06:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGo119Module,
|
|
|
|
fetchFromGitHub,
|
|
|
|
go,
|
|
|
|
ffmpeg,
|
|
|
|
...
|
|
|
|
}: let
|
2023-07-07 10:24:17 -06:00
|
|
|
gotosocialVersion = "0.10.0-rc1";
|
|
|
|
gtswaHash = "sha256:0hdcawj9kfv71rgx00jlavzknbns2zaxcyag586apvv0z8400siw";
|
|
|
|
gtssHash = "sha256-nk/dIlSk71u7NT8rtcHmHiYJCyrIhtkMWr4W5ZYF0YM=";
|
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
|
|
|
|
with lib;
|
|
|
|
buildGo119Module 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;
|
|
|
|
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [qbit];
|
|
|
|
};
|
|
|
|
}
|