about summary refs log tree commit diff
path: root/pkgs/applications/editors/notepadqq/default.nix
blob: 3aa08559bdf784f73c8dd41eb2f4af3d354e5617 (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
58
59
{ mkDerivation
, lib
, fetchFromGitHub
, pkg-config
, which
, libuchardet
, qtbase
, qtsvg
, qttools
, qtwebengine
, qtwebsockets
}:

mkDerivation rec {
  pname = "notepadqq";
  # shipping a beta build as there's no proper release which supports qtwebengine
  version = "2.0.0-beta";

  src = fetchFromGitHub {
    owner = "notepadqq";
    repo = "notepadqq";
    rev = "v${version}";
    sha256 = "sha256-XA9Ay9kJApY+bDeOf0iPv+BWYFuTmIuqsLEPgRTCZCE=";
  };

  nativeBuildInputs = [
    pkg-config
    which
    qttools
  ];

  buildInputs = [
    libuchardet
    qtbase
    qtsvg
    qtwebengine
    qtwebsockets
  ];

  preConfigure = ''
    export LRELEASE="lrelease"
  '';

  dontWrapQtApps = true;

  preFixup = ''
    wrapQtApp $out/bin/notepadqq
  '';

  enableParallelBuilding = true;

  meta = with lib; {
    homepage = "https://notepadqq.com/";
    description = "Notepad++-like editor for the Linux desktop";
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = [ maintainers.rszibele ];
  };
}