about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/cutemarked-ng/default.nix
blob: 9488546aad6e961b43fd75e80920c8243896bab9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib
, stdenv
, fetchFromGitHub
, qmake
, pkg-config
, qttools
, qtbase
, qtwebengine
, wrapQtAppsHook
, qmarkdowntextedit
, md4c
, hunspell
}:

stdenv.mkDerivation rec {
  pname = "CuteMarkEd-NG";
  version = "unstable-2021-07-29";

  src = fetchFromGitHub {
    owner = "Waqar144";
    repo = pname;
    rev = "9431ac603cef23d6f29e51e18f1eeee156f5bfb3";
    sha256 = "sha256-w/D4C2ZYgI/7ZCDamTQlhrJ9vtvAMThgM/fopkdKWYc";
  };

  patches = [
    ./0001-remove-dependency-on-vendored-library.patch
    ./0002-use-pkgcofig-to-find-libraries.patch
  ];

  postPatch = ''
    substituteInPlace app/app.pro \
      --replace '$$[QT_INSTALL_BINS]/lrelease' "lrelease"
  '';

  nativeBuildInputs = [
    qmake
    qttools
    pkg-config
    wrapQtAppsHook
  ];

  buildInputs = [
    md4c
    qtwebengine
    qmarkdowntextedit
    hunspell.dev
  ];

  meta = with lib; {
    description = "A Qt-based, free and open source markdown editor";
    homepage = "https://github.com/Waqar144/CuteMarkEd-NG";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ rewine ];
    platforms = platforms.linux;
  };
}