soju: add build tags (#473131)

This commit is contained in:
Azat Bahawi
2025-12-25 12:27:04 +00:00
committed by GitHub
+20 -8
View File
@@ -1,13 +1,16 @@
{
lib,
buildGoModule,
fetchFromGitea,
installShellFiles,
scdoc,
lib,
nixosTests,
pam,
scdoc,
withModernCSqlite ? false,
withPam ? false,
withSqlite ? true,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "soju";
version = "0.10.1";
@@ -15,7 +18,7 @@ buildGoModule rec {
domain = "codeberg.org";
owner = "emersion";
repo = "soju";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-kOV7EFRr+Ca9bQ1bdDMNf1FiiniIHDebsf5SpbJshsI=";
};
@@ -26,6 +29,8 @@ buildGoModule rec {
scdoc
];
buildInputs = lib.optional withPam pam;
ldflags = [
"-s"
"-w"
@@ -33,11 +38,18 @@ buildGoModule rec {
"-X codeberg.org/emersion/soju/config.DefaultUnixAdminPath=/run/soju/admin"
];
tags =
lib.optional (!withSqlite) "nosqlite"
++ lib.optional withModernCSqlite "moderncsqlite"
++ lib.optional withPam "pam";
postBuild = ''
make doc/soju.1 doc/sojuctl.1
'';
checkFlags = [ "-skip TestPostgresMigrations" ];
checkFlags = [
"-skip TestPostgresMigrations"
];
postInstall = ''
installManPage doc/soju.1 doc/sojuctl.1
@@ -55,7 +67,7 @@ buildGoModule rec {
deployments.
'';
homepage = "https://soju.im";
changelog = "https://codeberg.org/emersion/soju/releases/tag/${src.rev}";
changelog = "https://codeberg.org/emersion/soju/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
azahi
@@ -63,4 +75,4 @@ buildGoModule rec {
];
mainProgram = "sojuctl";
};
}
})