Unverified Commit e6566792 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #286523 from MarcelCoding/listmonk

listmonk: 2.5.1 -> 3.0.0
parents dfd694b0 1d399850
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -187,7 +187,11 @@ in {
          # Indeed, it will try to create all the folders and realize one of them already exist.
          # Therefore, we have to create it ourselves.
          ''${pkgs.coreutils}/bin/mkdir -p "''${STATE_DIRECTORY}/listmonk/uploads"''
          "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --upgrade --yes"
          # setup database if not already done
          "${cfg.package}/bin/listmonk --config ${cfgFile} --idempotent --install --yes"
          # apply db migrations (setup and migrations can not be done in one step
          # with "--install --upgrade" listmonk ignores the upgrade)
          "${cfg.package}/bin/listmonk --config ${cfgFile} --upgrade --yes"
          "${updateDatabaseConfigScript}/bin/update-database-config.sh"
        ];
        ExecStart = "${cfg.package}/bin/listmonk --config ${cfgFile}";
+37 −0
Original line number Diff line number Diff line
{ mkYarnPackage
, fetchYarnDeps
, meta
, version
, src
}:

mkYarnPackage {
  pname = "listmonk-frontend";
  inherit version;

  src = "${src}/frontend";
  packageJSON = ./package.json;

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

  configurePhase = ''
    ln -s $node_modules node_modules
  '';

  buildPhase = ''
    yarn --offline build
  '';

  installPhase = ''
    mkdir $out
    cp -R dist/* $out
  '';

  doDist = false;


  inherit meta;
}
+45 −0
Original line number Diff line number Diff line
{
  "name": "listmonk-frontend",
  "name": "listmonk",
  "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"
    "dev": "vite",
    "build": "vite build",
    "serve": "vite preview",
    "lint": "eslint --ext .js,.vue --ignore-path .gitignore src",
    "prebuild": "eslint --ext .js,.vue --ignore-path .gitignore src"
  },
  "dependencies": {
    "@tinymce/tinymce-vue": "^3",
    "axios": "^0.27.2",
    "buefy": "^0.9.10",
    "c3": "^0.7.20",
    "axios": "^1.6.2",
    "buefy": "^0.9.25",
    "bulma": "^0.9.4",
    "chart.js": "^4.4.1",
    "codeflask": "^1.4.1",
    "core-js": "^3.12.1",
    "dayjs": "^1.10.4",
    "dayjs": "^1.11.10",
    "indent.js": "^0.3.5",
    "qs": "^6.10.1",
    "textversionjs": "^1.1.3",
    "tinymce": "^5.10.7",
    "turndown": "^7.0.0",
    "vue": "^2.6.12",
    "vue-i18n": "^8.22.2",
    "tinymce": "^5.10.9",
    "turndown": "^7.1.2",
    "vue": "^2.7.14",
    "vue-chartjs": "^5.3.0",
    "vue-i18n": "^8.28.2",
    "vue-router": "^3.2.0",
    "vuex": "^3.6.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~5.0.8",
    "@vue/cli-plugin-eslint": "~5.0.8",
    "@vue/cli-plugin-router": "~5.0.8",
    "@vue/cli-plugin-vuex": "~5.0.8",
    "@vue/cli-service": "~5.0.8",
    "@vue/eslint-config-airbnb": "^5.3.0",
    "babel-eslint": "^10.1.0",
    "cypress": "10.10.0",
    "@vitejs/plugin-vue2": "^2.3.1",
    "@vue/eslint-config-airbnb": "^7.0.1",
    "cypress": "13.6.1",
    "cypress-file-upload": "^5.0.2",
    "eslint": "^7.27.0",
    "eslint": "^8.56.0",
    "eslint-define-config": "^2.0.0",
    "eslint-plugin-import": "^2.23.3",
    "eslint-plugin-vue": "^7.9.0",
    "eslint-plugin-vue": "^9.19.2",
    "sass": "^1.34.0",
    "sass-loader": "^10.2.0",
    "vite": "^5.0.12",
    "vue-eslint-parser": "^9.3.2",
    "vue-template-compiler": "^2.6.12"
  }
}
+5 −13
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub, callPackage, stuffbin, nixosTests, fetchpatch }:
{ lib, buildGoModule, fetchFromGitHub, callPackage, stuffbin, nixosTests }:

buildGoModule rec {
  pname = "listmonk";
  version = "2.5.1";
  version = "3.0.0";

  src = fetchFromGitHub {
    owner = "knadh";
    repo = "listmonk";
    rev = "v${version}";
    sha256 = "sha256-gCnIblc83CmG1auvYYxqW/xBl6Oy1KHGkqSY/3yIm3I=";
    sha256 = "sha256-eNX+2ens+mz2V8ZBHtFFHDVbi64AAiiREElMjh67Dd8=";
  };

  patches = [
    # Ensure that listmonk supports Go 1.20
    (fetchpatch {
      url = "https://github.com/knadh/listmonk/commit/25513b81044803b104ada63c0be57a913960484e.patch";
      hash = "sha256-SYACM8r+NgeSWn9VJV4+wkm+6s/MhNGwn5zyc2tw7FU=";
    })
  ];

  vendorHash = "sha256-0sgC1+ueZTUCP+7JwI/OKLktfMHQq959GEk1mC0TQgE=";
  vendorHash = "sha256-XAm2VfX1nHWTuAV2COEn8qrqPNv0xbaWgTYCpjrEfMw=";

  nativeBuildInputs = [
    stuffbin
@@ -50,7 +42,7 @@ buildGoModule rec {
      '';

  passthru = {
    frontend = callPackage ./frontend.nix { inherit meta; };
    frontend = callPackage ./frontend.nix { inherit meta version src; };
    tests = { inherit (nixosTests) listmonk; };
  };

Loading