From 196f5c8560a084149a06ad5bbce9ba0b7c63d9e6 Mon Sep 17 00:00:00 2001 From: aleksana Date: Tue, 22 Oct 2024 18:47:57 +0800 Subject: [PATCH 1/2] scite: move to pkgs/by-name --- .../editors/scite/default.nix => by-name/sc/scite/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/editors/scite/default.nix => by-name/sc/scite/package.nix} (100%) diff --git a/pkgs/applications/editors/scite/default.nix b/pkgs/by-name/sc/scite/package.nix similarity index 100% rename from pkgs/applications/editors/scite/default.nix rename to pkgs/by-name/sc/scite/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 982de17fe824..a70b319c462d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32239,8 +32239,6 @@ with pkgs; sc-im = callPackage ../applications/misc/sc-im { }; - scite = callPackage ../applications/editors/scite { }; - scli = callPackage ../applications/misc/scli { }; scribus_1_5 = libsForQt5.callPackage ../applications/office/scribus/default.nix { }; From ee3099b5aaa913b8701f59c0c64ff1e490b72f5e Mon Sep 17 00:00:00 2001 From: aleksana Date: Tue, 22 Oct 2024 19:22:26 +0800 Subject: [PATCH 2/2] scite: 5.2.2 -> 5.5.3 --- pkgs/by-name/sc/scite/package.nix | 61 ++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/sc/scite/package.nix b/pkgs/by-name/sc/scite/package.nix index 9c230a2984eb..e8b2c0ba9b50 100644 --- a/pkgs/by-name/sc/scite/package.nix +++ b/pkgs/by-name/sc/scite/package.nix @@ -1,17 +1,31 @@ -{ lib, stdenv, fetchurl, pkg-config, gtk2 }: +{ + lib, + stdenv, + fetchurl, + pkg-config, + wrapGAppsHook3, +}: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "scite"; - version = "5.2.2"; + version = "5.5.3"; src = fetchurl { - url = "https://www.scintilla.org/scite522.tgz"; - sha256 = "1q46clclx8r0b8zbq2zi89sygszgqf9ra5l83r2fs0ghvjgh2cxd"; + url = "https://www.scintilla.org/scite${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}.tgz"; + hash = "sha256-MtXy8a4MzdJP8Rf6otc+Zu+KfYSJnmmXfBS8RVBBbOY="; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gtk2 ]; - sourceRoot = "scintilla/gtk"; + nativeBuildInputs = [ + pkg-config + wrapGAppsHook3 + ]; + + sourceRoot = "scite/gtk"; + + makeFlags = [ + "GTK3=1" + "prefix=${placeholder "out"}" + ]; CXXFLAGS = [ # GCC 13: error: 'intptr_t' does not name a type @@ -19,24 +33,27 @@ stdenv.mkDerivation { "-include system_error" ]; - buildPhase = '' - make - cd ../../lexilla/src - make - cd ../../scite/gtk - make prefix=$out/ + preBuild = '' + pushd ../../scintilla/gtk + make ''${makeFlags[@]} + popd + + pushd ../../lexilla/src + make ''${makeFlags[@]} + popd ''; - installPhase = '' - make install prefix=$out/ - ''; + enableParallelBuilding = true; - meta = with lib; { + meta = { homepage = "https://www.scintilla.org/SciTE.html"; description = "SCIntilla based Text Editor"; - license = licenses.mit; - platforms = platforms.linux; - maintainers = [ maintainers.rszibele ]; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ + rszibele + aleksana + ]; mainProgram = "SciTE"; }; -} +})