From 6031bdb0bafdb0399f2099b82ea60aa3d5e0315e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 15 Jan 2025 13:41:15 +0000 Subject: [PATCH 1/3] notepad-next: 0.9 -> 0.10 --- pkgs/applications/editors/notepad-next/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/applications/editors/notepad-next/default.nix index e7a41ddc482b..7c35a74dfb49 100644 --- a/pkgs/applications/editors/notepad-next/default.nix +++ b/pkgs/applications/editors/notepad-next/default.nix @@ -10,13 +10,13 @@ mkDerivation rec { pname = "notepad-next"; - version = "0.9"; + version = "0.10"; src = fetchFromGitHub { owner = "dail8859"; repo = "NotepadNext"; rev = "v${version}"; - hash = "sha256-3BCLPY104zxALd3wFH8e9PitjmFbPcOfKsLqXowXqnY="; + hash = "sha256-DpqFu7Nt7l1rmQoJ7aQnFEGPxo8NDrowHxmyLdKIX4A="; # External dependencies - https://github.com/dail8859/NotepadNext/issues/135 fetchSubmodules = true; }; From a383bb892cae86400a0156cbe1ee49b5eb800d4d Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 16 Jan 2025 01:11:54 +0400 Subject: [PATCH 2/3] notepad-next: modernize --- .../editors/notepad-next/default.nix | 34 ++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 15 insertions(+), 21 deletions(-) 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 { }; From e3b93c1fb2f0cb53c074ee56715bff40de94dfeb Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 16 Jan 2025 01:14:29 +0400 Subject: [PATCH 3/3] notepad-next: migrate to by-name --- .../default.nix => by-name/no/notepad-next/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/editors/notepad-next/default.nix => by-name/no/notepad-next/package.nix} (100%) diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/by-name/no/notepad-next/package.nix similarity index 100% rename from pkgs/applications/editors/notepad-next/default.nix rename to pkgs/by-name/no/notepad-next/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fb716cb1302..0da164a18681 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14670,8 +14670,6 @@ with pkgs; ncdu_1 = callPackage ../tools/misc/ncdu/1.nix { }; - notepad-next = callPackage ../applications/editors/notepad-next { }; - notepadqq = libsForQt5.callPackage ../applications/editors/notepadqq { }; notmuch = callPackage ../applications/networking/mailreaders/notmuch {