listmonk: init at 2.2.0

This commit is contained in:
Raito Bezarius 2022-08-06 00:41:24 +02:00
parent e37d2a63c4
commit b6fcfe826c
7 changed files with 21582 additions and 0 deletions

View file

@ -0,0 +1,55 @@
{ lib, buildGoModule, fetchFromGitHub, callPackage, stuffbin }:
buildGoModule rec {
pname = "listmonk";
version = "2.2.0";
src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${version}";
sha256 = "sha256-dtIM0dkr8y+GbyCqrBlR5VRq6qMiZdmQyFvIoVY1eUg=";
};
vendorSha256 = "sha256-qeBuDM3REUxgu3ty02d7qsULH04USE0JUvBrtVnW8vg=";
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; };
};
meta = with lib; {
description = "High performance, self-hosted, newsletter and mailing list manager with a modern dashboard.";
homepage = "https://github.com/knadh/listmonk";
changelog = "https://github.com/knadh/listmonk/releases/tag/v${version}";
maintainers = with maintainers; [ raitobezarius ];
license = licenses.agpl3;
};
}

View file

@ -0,0 +1,32 @@
{ yarn2nix-moretea
, fetchFromGitHub
, meta
}:
yarn2nix-moretea.mkYarnPackage rec {
pname = "listmonk-frontend";
version = "2.2.0";
src = fetchFromGitHub {
owner = "knadh";
repo = "listmonk";
rev = "v${version}";
sha256 = "sha256-dtIM0dkr8y+GbyCqrBlR5VRq6qMiZdmQyFvIoVY1eUg=";
};
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
yarnNix = ./yarn.nix;
installPhase = ''
cd deps/listmonk-frontend/frontend
npm run build
mv dist $out
'';
doDist = false;
inherit meta;
}

View file

@ -0,0 +1,46 @@
{
"name": "listmonk-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build-report": "vue-cli-service build --report",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@tinymce/tinymce-vue": "^3",
"axios": "^0.27.2",
"buefy": "^0.9.10",
"c3": "^0.7.20",
"codeflask": "^1.4.1",
"core-js": "^3.12.1",
"dayjs": "^1.10.4",
"indent.js": "^0.3.5",
"qs": "^6.10.1",
"textversionjs": "^1.1.3",
"tinymce": "^5.10.0",
"turndown": "^7.0.0",
"vue": "^2.6.12",
"vue-i18n": "^8.22.2",
"vue-router": "^3.2.0",
"vuex": "^3.6.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.13",
"@vue/cli-plugin-eslint": "~4.5.13",
"@vue/cli-plugin-router": "~4.5.13",
"@vue/cli-plugin-vuex": "~4.5.13",
"@vue/cli-service": "~4.5.13",
"@vue/eslint-config-airbnb": "^5.3.0",
"babel-eslint": "^10.1.0",
"cypress": "9.5.2",
"cypress-file-upload": "^5.0.2",
"eslint": "^7.27.0",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-vue": "^7.9.0",
"sass": "^1.34.0",
"sass-loader": "^10.2.0",
"vue-template-compiler": "^2.6.12"
}
}

View file

@ -0,0 +1,25 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "stuffbin";
version = "1.1.0";
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
src = fetchFromGitHub {
owner = "knadh";
repo = "stuffbin";
rev = "v${version}";
sha256 = "sha256-M72xNh7bKUMLzA+M8bJB++kJ5KCrkboQm1v8BasP3Yo=";
};
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
meta = with lib; {
description = "Compress and embed static files and assets into Go binaries and access them with a virtual file system in production";
homepage = "https://github.com/knadh/stuffbin";
changelog = "https://github.com/knadh/stuffbin/releases/tag/v${version}";
maintainers = with maintainers; [ raitobezarius ];
license = licenses.mit;
};
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -22515,6 +22515,8 @@ with pkgs;
lighttpd = callPackage ../servers/http/lighttpd { };
listmonk = callPackage ../servers/mail/listmonk { };
livepeer = callPackage ../servers/livepeer { };
lwan = callPackage ../servers/http/lwan { };