diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/applications/editors/notepad-next/default.nix index 7c35a74dfb49..09a761e24f14 100644 --- a/pkgs/applications/editors/notepad-next/default.nix +++ b/pkgs/applications/editors/notepad-next/default.nix @@ -1,55 +1,49 @@ { - mkDerivation, lib, fetchFromGitHub, - qmake, - qttools, - qtx11extras, + qt5, stdenv, }: -mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "notepad-next"; version = "0.10"; src = fetchFromGitHub { owner = "dail8859"; repo = "NotepadNext"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-DpqFu7Nt7l1rmQoJ7aQnFEGPxo8NDrowHxmyLdKIX4A="; # External dependencies - https://github.com/dail8859/NotepadNext/issues/135 fetchSubmodules = true; }; nativeBuildInputs = [ - qmake - qttools + qt5.qmake + qt5.qttools + qt5.wrapQtAppsHook ]; - buildInputs = [ qtx11extras ]; + buildInputs = [ qt5.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 + mkdir -p $out/bin + ln -s $out/Applications/NotepadNext.app/Contents/MacOS/NotepadNext $out/bin/NotepadNext ''; - meta = with lib; { + meta = { homepage = "https://github.com/dail8859/NotepadNext"; description = "Cross-platform, reimplementation of Notepad++"; - license = licenses.gpl3Plus; - platforms = platforms.unix; - maintainers = [ maintainers.sebtm ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ sebtm ]; broken = stdenv.hostPlatform.isAarch64; mainProgram = "NotepadNext"; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 01119dedd5df..7fb716cb1302 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14670,7 +14670,7 @@ with pkgs; ncdu_1 = callPackage ../tools/misc/ncdu/1.nix { }; - notepad-next = libsForQt5.callPackage ../applications/editors/notepad-next { }; + notepad-next = callPackage ../applications/editors/notepad-next { }; notepadqq = libsForQt5.callPackage ../applications/editors/notepadqq { };