nixpkgs/pkgs/applications/editors/notepad-next/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Nix
Raw Normal View History

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-02-24 22:17:12 +00:00
version = "0.7";
2022-05-08 11:49:32 +00:00
src = fetchFromGitHub {
owner = "dail8859";
repo = "NotepadNext";
rev = "v${version}";
2024-02-24 22:17:12 +00:00
sha256 = "sha256-I2bS8oT/TGf6fuXpTwOKo2MaUo0jLFIU/DfW9h1toOk=";
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.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 = "A 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 ];
broken = stdenv.isAarch64;
2023-11-27 01:17:53 +00:00
mainProgram = "NotepadNext";
2022-05-08 11:49:32 +00:00
};
}