Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 93 lines 2.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch2, 6 pkg-config, 7 gettext, 8 m4, 9 intltool, 10 libxmlxx, 11 keybinder, 12 keybinder3, 13 gtk2, 14 gtk3, 15 libX11, 16 libfm, 17 libwnck, 18 libwnck2, 19 libXmu, 20 libXpm, 21 cairo, 22 gdk-pixbuf, 23 gdk-pixbuf-xlib, 24 menu-cache, 25 lxmenu-data, 26 wirelesstools, 27 curl, 28 supportAlsa ? false, 29 alsa-lib, 30 withGtk3 ? true, 31}: 32 33stdenv.mkDerivation (finalAttrs: { 34 pname = "lxpanel"; 35 version = "0.10.1"; 36 37 src = fetchurl { 38 url = "mirror://sourceforge/lxde/${finalAttrs.pname}-${finalAttrs.version}.tar.xz"; 39 sha256 = "sha256-HjGPV9fja2HCOlBNA9JDDHja0ULBgERRBh8bPqVEHug="; 40 }; 41 42 patches = [ 43 # fix build with gcc14 44 # https://github.com/lxde/lxpanel/commit/0853b0fc981285ebd2ac52f8dfc2a09b1090748c 45 (fetchpatch2 { 46 url = "https://github.com/lxde/lxpanel/commit/0853b0fc981285ebd2ac52f8dfc2a09b1090748c.patch?full_index=1"; 47 hash = "sha256-lj4CWdiUQhEc9J8UNKcP7/tmsGnPjA5pwXAok5YFW4M="; 48 }) 49 ]; 50 51 nativeBuildInputs = [ 52 pkg-config 53 gettext 54 m4 55 intltool 56 libxmlxx 57 ]; 58 buildInputs = [ 59 (if withGtk3 then keybinder3 else keybinder) 60 (if withGtk3 then gtk3 else gtk2) 61 libX11 62 (libfm.override { inherit withGtk3; }) 63 (if withGtk3 then libwnck else libwnck2) 64 libXmu 65 libXpm 66 cairo 67 gdk-pixbuf 68 gdk-pixbuf-xlib.dev 69 menu-cache 70 lxmenu-data 71 m4 72 wirelesstools 73 curl 74 ] 75 ++ lib.optional supportAlsa alsa-lib; 76 77 postPatch = '' 78 substituteInPlace src/Makefile.in \ 79 --replace "@PACKAGE_CFLAGS@" "@PACKAGE_CFLAGS@ -I${gdk-pixbuf-xlib.dev}/include/gdk-pixbuf-2.0" 80 substituteInPlace plugins/Makefile.in \ 81 --replace "@PACKAGE_CFLAGS@" "@PACKAGE_CFLAGS@ -I${gdk-pixbuf-xlib.dev}/include/gdk-pixbuf-2.0" 82 ''; 83 84 configureFlags = lib.optional withGtk3 "--enable-gtk3"; 85 86 meta = { 87 description = "Lightweight X11 desktop panel for LXDE"; 88 homepage = "https://lxde.org/"; 89 license = lib.licenses.gpl2Plus; 90 maintainers = [ lib.maintainers.ryneeverett ]; 91 platforms = lib.platforms.linux; 92 }; 93})