17 mindforger = fetchFromGitHub {
21 sha256 = "sha256-+8miV2xuQcaWGdWCEXPIg6EXjAHtgD9pX7Z8ZNhpMjA=";
23 cmark-gfm = fetchFromGitHub {
26 rev = "4ca8688093228c599432a87d7bd945804c573d51";
27 sha256 = "sha256-0WiG8aot8mc0h1BKPgC924UKQrgunZvKKBy9bD7nhoQ=";
29 mindforger-repository = fetchFromGitHub {
31 repo = "mindforger-repository";
32 rev = "ec81a27e5de6408bbcd3f6d7733a7c6f3b52e433";
33 sha256 = "sha256-JGTP1He7G2Obmsav64Lf7BLHp8OTvPtg38VHsrEC36o=";
36 in stdenv.mkDerivation {
40 src = srcs.mindforger;
42 nativeBuildInputs = [ cmake pkg-config qmake wrapGAppsHook3 wrapQtAppsHook ];
43 buildInputs = [ curl hunspell qtbase qtwebengine ];
45 # Disable the cmake hook (so we don't try to build MindForger with it), and
46 # build MindForger's internal fork of cmark-gfm ahead of MindForger itself.
48 # Moreover unpack the docs that are needed for the MacOS build.
50 cp -TR ${srcs.cmark-gfm} $sourceRoot/deps/cmark-gfm
51 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
52 cp -TR ${srcs.mindforger-repository} $sourceRoot/doc
54 dontUseCmakeConfigure = true;
56 mkdir deps/cmark-gfm/build &&
57 cd deps/cmark-gfm/build &&
58 cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF .. &&
59 cmake --build . --parallel
65 ./hunspell_pkgconfig.patch
69 substituteInPlace lib/src/install/installer.cpp --replace /usr "$out"
70 substituteInPlace app/resources/gnome-shell/mindforger.desktop --replace /usr "$out"
71 for f in app/app.pro lib/lib.pro; do
72 substituteInPlace "$f" --replace "QMAKE_CXX = g++" ""
83 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
84 mkdir "$out"/Applications
85 mv app/mindforger.app "$out"/Applications/
89 description = "Thinking Notebook & Markdown IDE";
91 MindForger is actually more than an editor or IDE - it's human
92 mind inspired personal knowledge management tool
94 homepage = "https://www.mindforger.com";
95 license = licenses.gpl2Plus;
96 platforms = [ "aarch64-linux" "x86_64-linux" ];
97 maintainers = with maintainers; [ cyplo ];
98 mainProgram = "mindforger";