Files
nixpkgs/pkgs/by-name/li/listmonk/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

69 lines
1.5 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
callPackage,
stuffbin,
nixosTests,
}:
buildGoModule rec {
pname = "listmonk";
version = "3.0.0";
src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${version}";
hash = "sha256-eNX+2ens+mz2V8ZBHtFFHDVbi64AAiiREElMjh67Dd8=";
};
vendorHash = "sha256-XAm2VfX1nHWTuAV2COEn8qrqPNv0xbaWgTYCpjrEfMw=";
nativeBuildInputs = [
stuffbin
];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
postInstall = ''
mv $out/bin/cmd $out/bin/listmonk
'';
# Run stuffbin to stuff the frontend and the static in the binary.
postFixup =
let
vfsMappings = [
"config.toml.sample"
"schema.sql"
"queries.sql"
"static/public:/public"
"static/email-templates"
"${passthru.frontend}:/admin"
"i18n:/i18n"
];
in
''
stuffbin -a stuff -in $out/bin/listmonk -out $out/bin/listmonk \
${lib.concatStringsSep " " vfsMappings}
'';
passthru = {
frontend = callPackage ./frontend.nix { inherit meta version src; };
tests = { inherit (nixosTests) listmonk; };
};
meta = {
description = "High performance, self-hosted, newsletter and mailing list manager with a modern dashboard";
mainProgram = "listmonk";
homepage = "https://github.com/knadh/listmonk";
changelog = "https://github.com/knadh/listmonk/releases/tag/v${version}";
maintainers = with lib.maintainers; [ raitobezarius ];
license = lib.licenses.agpl3Only;
};
}