cutemarked-ng: init at unstable-2021-07-29

rewine ece2858b 68e8f8a8

+179
+95
pkgs/applications/office/cutemarked-ng/0001-remove-dependency-on-vendored-library.patch
··· 1 + From b9bf46966dd7931f9f33c30ed608a21d0e71e923 Mon Sep 17 00:00:00 2001 2 + From: rewine <lhongxu@outlook.com> 3 + Date: Tue, 19 Jul 2022 13:19:10 +0800 4 + Subject: [PATCH 1/2] remove dependency on vendored library 5 + 6 + --- 7 + CuteMarkEd.pro | 4 +--- 8 + app-static/app-static.pro | 11 ++--------- 9 + app/app.pro | 2 -- 10 + app/cutemarkdownhighlighter.h | 2 +- 11 + 4 files changed, 4 insertions(+), 15 deletions(-) 12 + 13 + diff --git a/CuteMarkEd.pro b/CuteMarkEd.pro 14 + index 4ee92e3..0d247a4 100644 15 + --- a/CuteMarkEd.pro 16 + +++ b/CuteMarkEd.pro 17 + @@ -9,12 +9,10 @@ TEMPLATE = subdirs 18 + CONFIG += c++14 19 + 20 + SUBDIRS = \ 21 + - 3rdparty \ 22 + libs \ 23 + app-static \ 24 + app \ 25 + - fontawesomeicon \ 26 + - test 27 + + fontawesomeicon 28 + 29 + # build order: 3rdparty -> libs -> app-static -> app & test 30 + #libs.depends = 3rdparty 31 + diff --git a/app-static/app-static.pro b/app-static/app-static.pro 32 + index cd3c292..560b4fc 100644 33 + --- a/app-static/app-static.pro 34 + +++ b/app-static/app-static.pro 35 + @@ -13,7 +13,6 @@ CONFIG += c++11 36 + 37 + INCLUDEPATH += $$PWD 38 + # MD4C library 39 + -INCLUDEPATH += $$PWD/../3rdparty/md4c/src 40 + 41 + SOURCES += \ 42 + snippets/jsonsnippettranslator.cpp \ 43 + @@ -34,10 +33,7 @@ SOURCES += \ 44 + revealviewsynchronizer.cpp \ 45 + htmlpreviewcontroller.cpp \ 46 + htmlviewsynchronizer.cpp \ 47 + - yamlheaderchecker.cpp \ 48 + - $$PWD/../3rdparty/md4c/src/md4c.c \ 49 + - $$PWD/../3rdparty/md4c/src/entity.c \ 50 + - $$PWD/../3rdparty/md4c/src/md4c-html.c 51 + + yamlheaderchecker.cpp 52 + 53 + HEADERS += \ 54 + snippets/snippet.h \ 55 + @@ -64,10 +60,7 @@ HEADERS += \ 56 + revealviewsynchronizer.h \ 57 + htmlpreviewcontroller.h \ 58 + htmlviewsynchronizer.h \ 59 + - yamlheaderchecker.h \ 60 + - $$PWD/../3rdparty/md4c/src/md4c.h \ 61 + - $$PWD/../3rdparty/md4c/src/entity.h \ 62 + - $$PWD/../3rdparty/md4c/src/md4c-html.h 63 + + yamlheaderchecker.h 64 + 65 + 66 + #unix:!symbian { 67 + diff --git a/app/app.pro b/app/app.pro 68 + index 4827673..ab961cf 100644 69 + --- a/app/app.pro 70 + +++ b/app/app.pro 71 + @@ -40,8 +40,6 @@ macx { 72 + } 73 + 74 + #qmarkdowntextedit 75 + -include(../3rdparty/qmarkdowntextedit/qmarkdowntextedit.pri) 76 + -include(../3rdparty/hunspell/hunspell.pri) 77 + INCLUDEPATH += $$PWD 78 + 79 + SOURCES += \ 80 + diff --git a/app/cutemarkdownhighlighter.h b/app/cutemarkdownhighlighter.h 81 + index c99ab56..78f2be6 100644 82 + --- a/app/cutemarkdownhighlighter.h 83 + +++ b/app/cutemarkdownhighlighter.h 84 + @@ -19,7 +19,7 @@ 85 + 86 + #include <QSyntaxHighlighter> 87 + 88 + -#include "../3rdparty/qmarkdowntextedit/markdownhighlighter.h" 89 + +#include <QMarkdownTextedit/markdownhighlighter.h> 90 + 91 + namespace hunspell { 92 + class SpellChecker; 93 + -- 94 + 2.36.1 95 +
+25
pkgs/applications/office/cutemarked-ng/0002-use-pkgcofig-to-find-libraries.patch
··· 1 + From bdc66eace846edc8a7b435f7ca9f324427243ce4 Mon Sep 17 00:00:00 2001 2 + From: rewine <lhongxu@outlook.com> 3 + Date: Thu, 21 Jul 2022 17:30:22 +0800 4 + Subject: [PATCH 2/2] use pkgcofig to find libraries 5 + 6 + --- 7 + app/app.pro | 2 ++ 8 + 1 file changed, 2 insertions(+) 9 + 10 + diff --git a/app/app.pro b/app/app.pro 11 + index ab961cf..475487d 100644 12 + --- a/app/app.pro 13 + +++ b/app/app.pro 14 + @@ -13,6 +13,8 @@ win32: QT += winextras 15 + TARGET = cutemarked 16 + TEMPLATE = app 17 + CONFIG += c++11 18 + +CONFIG += link_pkgconfig 19 + +PKGCONFIG += QMarkdownTextedit hunspell md4c-html 20 + 21 + unix:!macx { 22 + CONFIG += link_pkgconfig 23 + -- 24 + 2.36.1 25 +
+57
pkgs/applications/office/cutemarked-ng/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , qmake 5 + , pkg-config 6 + , qttools 7 + , qtbase 8 + , qtwebengine 9 + , wrapQtAppsHook 10 + , qmarkdowntextedit 11 + , md4c 12 + , hunspell 13 + }: 14 + 15 + stdenv.mkDerivation rec { 16 + pname = "CuteMarkEd-NG"; 17 + version = "unstable-2021-07-29"; 18 + 19 + src = fetchFromGitHub { 20 + owner = "Waqar144"; 21 + repo = pname; 22 + rev = "9431ac603cef23d6f29e51e18f1eeee156f5bfb3"; 23 + sha256 = "sha256-w/D4C2ZYgI/7ZCDamTQlhrJ9vtvAMThgM/fopkdKWYc"; 24 + }; 25 + 26 + patches = [ 27 + ./0001-remove-dependency-on-vendored-library.patch 28 + ./0002-use-pkgcofig-to-find-libraries.patch 29 + ]; 30 + 31 + postPatch = '' 32 + substituteInPlace app/app.pro \ 33 + --replace '$$[QT_INSTALL_BINS]/lrelease' "lrelease" 34 + ''; 35 + 36 + nativeBuildInputs = [ 37 + qmake 38 + qttools 39 + pkg-config 40 + wrapQtAppsHook 41 + ]; 42 + 43 + buildInputs = [ 44 + md4c 45 + qtwebengine 46 + qmarkdowntextedit 47 + hunspell.dev 48 + ]; 49 + 50 + meta = with lib; { 51 + description = "A Qt-based, free and open source markdown editor"; 52 + homepage = "https://github.com/Waqar144/CuteMarkEd-NG"; 53 + license = licenses.gpl2Plus; 54 + maintainers = with maintainers; [ rewine ]; 55 + platforms = platforms.linux; 56 + }; 57 + }
+2
pkgs/top-level/all-packages.nix
··· 3483 3483 3484 3484 cucumber = callPackage ../development/tools/cucumber {}; 3485 3485 3486 + cutemarked-ng = libsForQt5.callPackage ../applications/office/cutemarked-ng { }; 3487 + 3486 3488 dabet = callPackage ../tools/misc/dabet { }; 3487 3489 3488 3490 dabtools = callPackage ../applications/radio/dabtools { };