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