Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 49 lines 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 qt5, 5 stdenv, 6}: 7 8stdenv.mkDerivation (finalAttrs: { 9 pname = "notepad-next"; 10 version = "0.12"; 11 12 src = fetchFromGitHub { 13 owner = "dail8859"; 14 repo = "NotepadNext"; 15 tag = "v${finalAttrs.version}"; 16 hash = "sha256-YD4tIPh5iJpbcDMZk334k2AV9jTVWCSGP34Mj2x0cJ0="; 17 # External dependencies - https://github.com/dail8859/NotepadNext/issues/135 18 fetchSubmodules = true; 19 }; 20 21 nativeBuildInputs = [ 22 qt5.qmake 23 qt5.qttools 24 qt5.wrapQtAppsHook 25 ]; 26 buildInputs = [ qt5.qtx11extras ]; 27 28 qmakeFlags = [ 29 "PREFIX=${placeholder "out"}" 30 "src/NotepadNext.pro" 31 ]; 32 33 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 34 mv $out/bin $out/Applications 35 rm -fr $out/share 36 mkdir -p $out/bin 37 ln -s $out/Applications/NotepadNext.app/Contents/MacOS/NotepadNext $out/bin/NotepadNext 38 ''; 39 40 meta = { 41 homepage = "https://github.com/dail8859/NotepadNext"; 42 description = "Cross-platform, reimplementation of Notepad++"; 43 license = lib.licenses.gpl3Plus; 44 platforms = lib.platforms.unix; 45 maintainers = with lib.maintainers; [ sebtm ]; 46 broken = stdenv.hostPlatform.isAarch64; 47 mainProgram = "NotepadNext"; 48 }; 49})