Skip to content

Commit

Permalink
listmonk: 3.0.0 → 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aucub authored and alt-romes committed Dec 7, 2024
1 parent 190c31a commit c8decd3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 50 deletions.
25 changes: 16 additions & 9 deletions pkgs/by-name/li/listmonk/frontend.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{ mkYarnPackage
, fetchYarnDeps
, meta
, version
, src
{
stdenv,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
meta,
version,
src,
}:

mkYarnPackage {
stdenv.mkDerivation (finalAttrs: {
pname = "listmonk-frontend";
inherit version;

Expand All @@ -14,7 +17,7 @@ mkYarnPackage {

offlineCache = fetchYarnDeps {
yarnLock = "${src}/frontend/yarn.lock";
hash = "sha256-TdrglyRtb2Q8SFtoiCoDj/zBV2+7DwzIm/Fzlt0ZvSo=";
hash = "sha256-2STFJtlneyR6QBsy/RVIINV/0NMggnfZwyz1pki8iPk=";
};

configurePhase = ''
Expand All @@ -26,8 +29,12 @@ mkYarnPackage {
'';

installPhase = ''
runHook preInstall
mkdir $out
cp -R dist/* $out
cp -r dist/* $out
runHook postInstall
'';

doDist = false;
Expand Down
45 changes: 29 additions & 16 deletions pkgs/by-name/li/listmonk/package.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
{ lib, buildGoModule, fetchFromGitHub, callPackage, stuffbin, nixosTests }:

{
lib,
buildGoModule,
fetchFromGitHub,
callPackage,
stuffbin,
nixosTests,
}:
buildGoModule rec {
pname = "listmonk";
version = "3.0.0";
version = "4.1.0";

src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${version}";
sha256 = "sha256-eNX+2ens+mz2V8ZBHtFFHDVbi64AAiiREElMjh67Dd8=";
tag = "v${version}";
hash = "sha256-f6jket2lHw8r5lFkIZ7KurHbWFezNV4YO+9rmZ79WSc=";
};

vendorHash = "sha256-XAm2VfX1nHWTuAV2COEn8qrqPNv0xbaWgTYCpjrEfMw=";
vendorHash = "sha256-sQ9CoYWdZYVdwh/Pszp/JEglvAU2/zJFSZ9jx8Ed/9M=";

nativeBuildInputs = [
stuffbin
];

ldflags = [ "-s" "-w" "-X main.version=${version}" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];

postInstall = ''
mv $out/bin/cmd $out/bin/listmonk
Expand All @@ -30,28 +40,31 @@ buildGoModule rec {
"config.toml.sample"
"schema.sql"
"queries.sql"
"permissions.json"
"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}
'';
''
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; };
tests = {
inherit (nixosTests) listmonk;
};
};

meta = with lib; {
description = "High performance, self-hosted, newsletter and mailing list manager with a modern dashboard.";
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 maintainers; [ raitobezarius ];
license = licenses.agpl3Only;
maintainers = with lib.maintainers; [ raitobezarius ];
license = lib.licenses.agpl3Only;
};
}
25 changes: 0 additions & 25 deletions pkgs/by-name/li/listmonk/stuffbin.nix

This file was deleted.

0 comments on commit c8decd3

Please sign in to comment.