depot/third_party/nixpkgs/pkgs/applications/editors/notepad-next/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

44 lines
1.2 KiB
Nix

{ mkDerivation, lib, fetchFromGitHub, qmake, qttools, qtx11extras, stdenv }:
mkDerivation rec {
pname = "notepad-next";
version = "0.8";
src = fetchFromGitHub {
owner = "dail8859";
repo = "NotepadNext";
rev = "v${version}";
hash = "sha256-fwHTsTKcVaeIv0NQQBjzfXscGDfXr3X/yH07YnYh3fU=";
# External dependencies - https://github.com/dail8859/NotepadNext/issues/135
fetchSubmodules = true;
};
nativeBuildInputs = [ qmake qttools ];
buildInputs = [ qtx11extras ];
qmakeFlags = [
"PREFIX=${placeholder "out"}"
"src/NotepadNext.pro"
];
postPatch = ''
substituteInPlace src/i18n.pri \
--replace 'EXTRA_TRANSLATIONS = \' "" \
--replace '$$[QT_INSTALL_TRANSLATIONS]/qt_zh_CN.qm' ""
'';
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mv $out/bin $out/Applications
rm -fr $out/share
'';
meta = with lib; {
homepage = "https://github.com/dail8859/NotepadNext";
description = "Cross-platform, reimplementation of Notepad++";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = [ maintainers.sebtm ];
broken = stdenv.hostPlatform.isAarch64;
mainProgram = "NotepadNext";
};
}