From 331f049c891ffbd1a5fa83f08e5ba5b50b9aa534 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Tue, 1 Apr 2025 08:50:04 +0300 Subject: [PATCH 1/2] lxpanel: fix build with gcc14 - add patch from upstream commit: https://github.com/lxde/lxpanel/commit/0853b0fc981285ebd2ac52f8dfc2a09b1090748c fixing `incompatible-pointer-types` error with gcc14 --- pkgs/desktops/lxde/core/lxpanel/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/desktops/lxde/core/lxpanel/default.nix b/pkgs/desktops/lxde/core/lxpanel/default.nix index 9c4750440566..8994ff1406f5 100644 --- a/pkgs/desktops/lxde/core/lxpanel/default.nix +++ b/pkgs/desktops/lxde/core/lxpanel/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch2, pkg-config, gettext, m4, @@ -38,6 +39,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-HjGPV9fja2HCOlBNA9JDDHja0ULBgERRBh8bPqVEHug="; }; + patches = [ + # fix build with gcc14 + # https://github.com/lxde/lxpanel/commit/0853b0fc981285ebd2ac52f8dfc2a09b1090748c + (fetchpatch2 { + url = "https://github.com/lxde/lxpanel/commit/0853b0fc981285ebd2ac52f8dfc2a09b1090748c.patch?full_index=1"; + hash = "sha256-lj4CWdiUQhEc9J8UNKcP7/tmsGnPjA5pwXAok5YFW4M="; + }) + ]; + nativeBuildInputs = [ pkg-config gettext From 267e16ac89c28d1f56230c74dcf577da1863f1c3 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Tue, 1 Apr 2025 10:12:49 +0300 Subject: [PATCH 2/2] lxpanel: modernize - replace `rec` with `finalAttrs` - remove `with lib;` from `meta` --- pkgs/desktops/lxde/core/lxpanel/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/desktops/lxde/core/lxpanel/default.nix b/pkgs/desktops/lxde/core/lxpanel/default.nix index 8994ff1406f5..3c68690302e9 100644 --- a/pkgs/desktops/lxde/core/lxpanel/default.nix +++ b/pkgs/desktops/lxde/core/lxpanel/default.nix @@ -30,12 +30,12 @@ withGtk3 ? true, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "lxpanel"; version = "0.10.1"; src = fetchurl { - url = "mirror://sourceforge/lxde/${pname}-${version}.tar.xz"; + url = "mirror://sourceforge/lxde/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; sha256 = "sha256-HjGPV9fja2HCOlBNA9JDDHja0ULBgERRBh8bPqVEHug="; }; @@ -82,11 +82,11 @@ stdenv.mkDerivation rec { configureFlags = lib.optional withGtk3 "--enable-gtk3"; - meta = with lib; { + meta = { description = "Lightweight X11 desktop panel for LXDE"; homepage = "https://lxde.org/"; - license = licenses.gpl2Plus; - maintainers = [ maintainers.ryneeverett ]; - platforms = platforms.linux; + license = lib.licenses.gpl2Plus; + maintainers = [ lib.maintainers.ryneeverett ]; + platforms = lib.platforms.linux; }; -} +})