nixpkgs/pkgs/servers/snac2/default.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-02 14:59:41 +00:00
{ stdenv
, lib
, fetchFromGitea
, curl
, openssl
, nix-update-script
, testers
, snac2
2022-12-02 14:59:41 +00:00
}:
stdenv.mkDerivation rec {
pname = "snac2";
2024-11-17 07:04:34 +00:00
version = "2.63";
2022-12-02 14:59:41 +00:00
src = fetchFromGitea {
domain = "codeberg.org";
owner = "grunfink";
repo = pname;
rev = version;
2024-11-17 07:04:34 +00:00
hash = "sha256-yVTQhkRsyZ3L4LPSv6Ffj6cYKqP9bSty60JQ9BhQFxA=";
2022-12-02 14:59:41 +00:00
};
buildInputs = [ curl openssl ];
makeFlags = [ "PREFIX=$(out)" ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [
2023-05-14 08:04:33 +00:00
"-Dst_mtim=st_mtimespec"
"-Dst_ctim=st_ctimespec"
]);
passthru = {
tests.version = testers.testVersion {
package = snac2;
command = "${meta.mainProgram} || true";
};
updateScript = nix-update-script { };
};
2022-12-02 14:59:41 +00:00
meta = with lib; {
homepage = "https://codeberg.org/grunfink/snac2";
description = "Simple, minimalistic ActivityPub instance (2.x, C)";
changelog = "https://codeberg.org/grunfink/snac2/src/tag/${version}/RELEASE_NOTES.md";
2022-12-02 14:59:41 +00:00
license = licenses.mit;
maintainers = with maintainers; [ misuzu ];
2023-05-14 08:04:33 +00:00
platforms = platforms.unix;
mainProgram = "snac";
2022-12-02 14:59:41 +00:00
};
}