summary refs log tree commit diff
diff options
context:
space:
mode:
authorrewine <1758075541@qq.com>2022-06-21 18:15:22 +0800
committerrewine <1758075541@qq.com>2022-06-21 18:15:22 +0800
commit3d506e954807df4e5891396dcc0af6043f0b616f (patch)
tree72b519c06ef297aa61d7239aa6bc848d6602877c
parent0bd9606a869659b72b6d04d65268370796dd7e7d (diff)
downloadnixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar.gz
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar.bz2
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar.lz
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar.xz
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.tar.zst
nixpkgs-3d506e954807df4e5891396dcc0af6043f0b616f.zip
notepad-next: 0.5.1 -> 0.5.2
-rw-r--r--pkgs/applications/editors/notepad-next/default.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/applications/editors/notepad-next/default.nix
index 0207ae9b240..aaa751ea503 100644
--- a/pkgs/applications/editors/notepad-next/default.nix
+++ b/pkgs/applications/editors/notepad-next/default.nix
@@ -1,31 +1,32 @@
-{ mkDerivation, lib, fetchFromGitHub, qmake, libsForQt5, stdenv }:
+{ mkDerivation, lib, fetchFromGitHub, qmake, qttools, qtx11extras, stdenv }:
 
 mkDerivation rec {
   pname = "notepad-next";
-  version = "0.5.1";
+  version = "0.5.2";
 
   src = fetchFromGitHub {
     owner = "dail8859";
     repo = "NotepadNext";
     rev = "v${version}";
-    sha256 = "sha256-J7Ngt6YtAAZsza2lN0d1lX3T8gNJHp60sCwwaLMGBHQ=";
+    sha256 = "sha256-LyUV85wW6FGlkV0qSIfkLMHpXXj1qvRnGZuYy8ASwZ8=";
     # External dependencies - https://github.com/dail8859/NotepadNext/issues/135
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ qmake libsForQt5.qt5.qttools ];
-  qmakeFlags = [ "src/NotepadNext.pro" ];
+  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [ qtx11extras ];
+
+  qmakeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "src/NotepadNext.pro"
+  ];
 
-  # References
-  #  https://github.com/dail8859/NotepadNext/blob/master/doc/Building.md
-  #  https://github.com/dail8859/NotepadNext/pull/124
   postPatch = ''
-    substituteInPlace ./src/NotepadNext/NotepadNext.pro --replace /usr $out
+    substituteInPlace src/i18n.pri \
+      --replace 'EXTRA_TRANSLATIONS = \' "" \
+      --replace '$$[QT_INSTALL_TRANSLATIONS]/qt_zh_CN.qm' ""
   '';
 
-  # Upstream suggestion: https://github.com/dail8859/NotepadNext/issues/135
-  CXXFLAGS = "-std=gnu++1z";
-
   meta = with lib; {
     homepage = "https://github.com/dail8859/NotepadNext";
     description = "Notepad++-like editor for the Linux desktop";