Files
nixpkgs/pkgs/by-name/to/tootik/package.nix
2026-08-17 17:18:38 +00:00

54 lines
1.2 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
openssl,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "tootik";
version = "0.24.1";
src = fetchFromGitHub {
owner = "dimkr";
repo = "tootik";
tag = "v${finalAttrs.version}";
hash = "sha256-WNvoY1SHjhH6nUz3L6GZ+yS+XHmcurjl7LahKtR44d8=";
};
proxyVendor = true;
vendorHash = "sha256-oNyN/az26DNYIfFvOE8zjIYqOCvo5ifndhgq1hwbHvM=";
subPackages = [ "cmd/tootik" ];
nativeBuildInputs = [ openssl ];
preBuild = ''
go generate ./migrations
'';
ldflags = [ "-X github.com/dimkr/tootik/buildinfo.Version=${finalAttrs.version}" ];
tags = [ "fts5" ];
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64);
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
__darwinAllowLocalNetworking = true;
meta = {
description = "Federated nanoblogging service with a Gemini frontend";
homepage = "https://github.com/dimkr/tootik";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ sikmir ];
mainProgram = "tootik";
};
})