2022-06-21 10:15:22 +00:00
|
|
|
{ mkDerivation, lib, fetchFromGitHub, qmake, qttools, qtx11extras, stdenv }:
|
2022-05-08 11:49:32 +00:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "notepad-next";
|
2024-06-26 01:33:48 +00:00
|
|
|
version = "0.8";
|
2022-05-08 11:49:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dail8859";
|
|
|
|
repo = "NotepadNext";
|
|
|
|
rev = "v${version}";
|
2024-07-14 10:59:26 +00:00
|
|
|
hash = "sha256-fwHTsTKcVaeIv0NQQBjzfXscGDfXr3X/yH07YnYh3fU=";
|
2022-05-08 11:49:32 +00:00
|
|
|
# External dependencies - https://github.com/dail8859/NotepadNext/issues/135
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-06-21 10:15:22 +00:00
|
|
|
nativeBuildInputs = [ qmake qttools ];
|
|
|
|
buildInputs = [ qtx11extras ];
|
|
|
|
|
|
|
|
qmakeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"src/NotepadNext.pro"
|
|
|
|
];
|
2022-05-08 11:49:32 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2022-06-21 10:15:22 +00:00
|
|
|
substituteInPlace src/i18n.pri \
|
|
|
|
--replace 'EXTRA_TRANSLATIONS = \' "" \
|
|
|
|
--replace '$$[QT_INSTALL_TRANSLATIONS]/qt_zh_CN.qm' ""
|
2022-05-08 11:49:32 +00:00
|
|
|
'';
|
|
|
|
|
2023-06-12 19:28:24 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
|
|
mv $out/bin $out/Applications
|
|
|
|
rm -fr $out/share
|
|
|
|
'';
|
|
|
|
|
2022-05-08 11:49:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/dail8859/NotepadNext";
|
2023-06-12 19:28:24 +00:00
|
|
|
description = "Cross-platform, reimplementation of Notepad++";
|
2022-05-08 11:49:32 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2023-06-12 19:28:24 +00:00
|
|
|
platforms = platforms.unix;
|
2022-05-08 11:49:32 +00:00
|
|
|
maintainers = [ maintainers.sebtm ];
|
2022-05-23 00:42:09 +00:00
|
|
|
broken = stdenv.hostPlatform.isAarch64;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "NotepadNext";
|
2022-05-08 11:49:32 +00:00
|
|
|
};
|
|
|
|
}
|