55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ stdenv, lib, buildGo119Module, fetchFromGitHub, makeWrapper, go, git, ffmpeg
|
|
, ... }:
|
|
let
|
|
gotosocialVersion = "0.7.0-rc3";
|
|
gotosocialWebAssets = builtins.fetchurl {
|
|
url =
|
|
"https://github.com/superseriousbusiness/gotosocial/releases/download/v${gotosocialVersion}/gotosocial_${gotosocialVersion}_web-assets.tar.gz";
|
|
sha256 = "sha256:04dgwaz2qn177n60xq7yi4gyy03rz5j6iljn4sjnxnpmd0dxc56n";
|
|
};
|
|
in with lib;
|
|
buildGo119Module rec {
|
|
pname = "gotosocial";
|
|
version = gotosocialVersion;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "superseriousbusiness";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-Ohd28wUJaluOTDyC3q+2I6W0j2yWuNjX+1LbnKDLOLE=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|