Commit 65f12fd8 authored by Grimmauld's avatar Grimmauld
Browse files

mindforger: drop

parent 03757433
Loading
Loading
Loading
Loading
+0 −118
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  cmake,
  curl,
  fetchFromGitHub,
  hunspell,
  pkg-config,
  qmake,
  qtbase,
  qtwebengine,
  wrapGAppsHook3,
  wrapQtAppsHook,
}:
let
  version = "2.0.0";
  srcs = {
    mindforger = fetchFromGitHub {
      owner = "dvorka";
      repo = "mindforger";
      rev = version;
      sha256 = "sha256-+8miV2xuQcaWGdWCEXPIg6EXjAHtgD9pX7Z8ZNhpMjA=";
    };
    cmark-gfm = fetchFromGitHub {
      owner = "dvorka";
      repo = "cmark";
      rev = "4ca8688093228c599432a87d7bd945804c573d51";
      sha256 = "sha256-0WiG8aot8mc0h1BKPgC924UKQrgunZvKKBy9bD7nhoQ=";
    };
    mindforger-repository = fetchFromGitHub {
      owner = "dvorka";
      repo = "mindforger-repository";
      rev = "ec81a27e5de6408bbcd3f6d7733a7c6f3b52e433";
      sha256 = "sha256-JGTP1He7G2Obmsav64Lf7BLHp8OTvPtg38VHsrEC36o=";
    };
  };
in
stdenv.mkDerivation {
  pname = "mindforger";
  inherit version;

  src = srcs.mindforger;

  nativeBuildInputs = [
    cmake
    pkg-config
    qmake
    wrapGAppsHook3
    wrapQtAppsHook
  ];
  buildInputs = [
    curl
    hunspell
    qtbase
    qtwebengine
  ];

  # Disable the cmake hook (so we don't try to build MindForger with it), and
  # build MindForger's internal fork of cmark-gfm ahead of MindForger itself.
  #
  # Moreover unpack the docs that are needed for the MacOS build.
  postUnpack = ''
    cp -TR ${srcs.cmark-gfm} $sourceRoot/deps/cmark-gfm
  ''
  + lib.optionalString stdenv.hostPlatform.isDarwin ''
    cp -TR ${srcs.mindforger-repository} $sourceRoot/doc
  '';
  dontUseCmakeConfigure = true;
  preBuild = ''
    (
          mkdir deps/cmark-gfm/build &&
          cd deps/cmark-gfm/build &&
          cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF .. &&
          cmake --build . --parallel
      )'';

  doCheck = true;

  patches = [
    ./hunspell_pkgconfig.patch
  ];

  postPatch = ''
    substituteInPlace lib/src/install/installer.cpp --replace /usr "$out"
    substituteInPlace app/resources/gnome-shell/mindforger.desktop --replace /usr "$out"
    for f in app/app.pro lib/lib.pro; do
      substituteInPlace "$f" --replace "QMAKE_CXX = g++" ""
    done
  '';

  qmakeFlags = [
    "-r"
    "mindforger.pro"
    "CONFIG+=mfnoccache"
    "CONFIG+=mfwebengine"
  ];

  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
    mkdir "$out"/Applications
    mv app/mindforger.app "$out"/Applications/
  '';

  meta = {
    description = "Thinking Notebook & Markdown IDE";
    longDescription = ''
      MindForger is actually more than an editor or IDE - it's human
      mind inspired personal knowledge management tool
    '';
    homepage = "https://www.mindforger.com";
    license = lib.licenses.gpl2Plus;
    platforms = [
      "aarch64-linux"
      "x86_64-linux"
    ];
    maintainers = with lib.maintainers; [ cyplo ];
    mainProgram = "mindforger";
  };
}
+0 −23
Original line number Diff line number Diff line
diff --git a/app/app.pro b/app/app.pro
index 89ff5c0b..9625ecd1 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -159,12 +159,13 @@ macx {
 
 } else:unix {
     # pkgconfig-based configuration does not work @ Ubuntu
-    #  CONFIG += link_pkgconfig
-    #  PKGCONFIG += hunspell
+    # but does on NixOS
+    CONFIG += link_pkgconfig
+    PKGCONFIG += hunspell
 
-    # hardcoded paths are (unfortunately) more robust:
-    INCLUDEPATH += /usr/include/hunspell
-    LIBS += -lhunspell
+    # Where hardcoded paths are (unfortunately) more robust^W^W^W^Wannoying:
+    #  INCLUDEPATH += /usr/include/hunspell
+    #  LIBS += -lhunspell
 
     HEADERS += \
       ./src/qt/spelling/dictionary_provider_hunspell.h \
+1 −0
Original line number Diff line number Diff line
@@ -1369,6 +1369,7 @@ mapAliases {
  migra = throw "migra has been removed because it has transitively been marked as broken since May 2024, and is unmaintained upstream."; # Added 2025-10-11
  mihomo-party = throw "'mihomo-party' has been removed due to upstream license violation"; # Added 2025-08-20
  mime-types = throw "'mime-types' has been renamed to/replaced by 'mailcap'"; # Converted to throw 2025-10-27
  mindforger = throw "'mindforger' has been removed as it depended on EOL qt5 webengine"; # Added 2026-04-15
  minecraft = throw "'minecraft' has been removed because the package was broken. Consider using 'prismlauncher' instead"; # Added 2025-09-06
  minetest = throw "'minetest' has been renamed to/replaced by 'luanti'"; # Converted to throw 2025-10-27
  minetest-touch = throw "'minetest-touch' has been renamed to/replaced by 'luanti-client'"; # Converted to throw 2025-10-27
+0 −2
Original line number Diff line number Diff line
@@ -9509,8 +9509,6 @@ with pkgs;

  minari = python3Packages.toPythonApplication python3Packages.minari;

  mindforger = libsForQt5.callPackage ../applications/editors/mindforger { };

  molsketch = libsForQt5.callPackage ../applications/editors/molsketch { };

  graphicsmagick_q16 = graphicsmagick.override { quantumdepth = 16; };