1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
6 ;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot>
7 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 ison <ison@airmail.cc>
9 ;;; Copyright © 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
10 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
12 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
13 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages lxde)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages admin)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages disk)
38 #:use-module (gnu packages docbook)
39 #:use-module (gnu packages file-systems)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages image-viewers)
46 #:use-module (gnu packages libusb)
47 #:use-module (gnu packages linux)
48 #:use-module (gnu packages lsof)
49 #:use-module (gnu packages openbox)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages polkit)
52 #:use-module (gnu packages text-editors)
53 #:use-module (gnu packages video)
54 #:use-module (gnu packages wget)
55 #:use-module (gnu packages wm)
56 #:use-module (gnu packages xdisorg)
57 #:use-module (gnu packages xml)
58 #:use-module (gnu packages xorg)
59 #:use-module (guix build-system glib-or-gtk)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system trivial)
62 #:use-module (guix download)
63 #:use-module (guix gexp)
64 #:use-module (guix git-download)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix utils))
75 (uri (string-append "mirror://sourceforge/pcmanfm/"
76 "PCManFM%20%2B%20Libfm%20%28tarball%20release"
77 "%29/LibFM/" name "-" version ".tar.xz"))
80 "1rfira3lx8v6scz1aq69925j4vslpp36bmgrrzcfby2c60q2c155"))))
81 (build-system gnu-build-system)
82 (arguments (list #:configure-flags #~(list "--with-gtk=3")))
83 (inputs (list glib gtk+))
84 (native-inputs (list intltool
85 `(,glib "bin") ; for gtester
90 (synopsis "File management support (core library)")
91 (description "LibFM provides file management functions built on top of
92 Glib/GIO giving a higher-level API.")
93 (home-page "https://www.lxde.org/")
94 (license license:gpl2+)))
96 (define-public libfm-extra
97 (package (inherit libfm)
99 (arguments '(#:configure-flags '("--with-extra-only")))
101 (native-inputs (list intltool libtool pkg-config))
102 (synopsis "File management support (extra library)")
103 (description "This package contains a stand-alone library which extends the
104 libFM file management library.")))
106 (define-public lxappearance
108 (name "lxappearance")
113 (uri (string-append "mirror://sourceforge/lxde/"
114 "LXAppearance/lxappearance-" version ".tar.xz"))
116 (base32 "0f4bjaamfxxdr9civvy55pa6vv9dx1hjs522gjbbgx7yp1cdh8kj"))))
117 (build-system gnu-build-system)
118 (arguments (list #:configure-flags #~(list "--enable-gtk3")))
120 (native-inputs (list intltool pkg-config))
121 (synopsis "LXDE GTK+ theme switcher")
122 (description "LXAppearance is a desktop-independent GTK+ theme switcher
123 able to change themes, icons, and fonts used by GTK+ applications.")
124 (home-page "https://www.lxde.org/")
125 (license license:gpl2+)))
127 (define-public lxrandr
133 (uri (string-append "mirror://sourceforge/lxde/LXRandR"
134 "%20%28monitor%20config%20tool%29/LXRandR%20"
135 (version-major+minor version) ".x/"
136 "lxrandr-" version ".tar.xz"))
139 "04n3vgh3ix12p8jfs4w0dyfq3anbjy33h7g53wbbqqc0f74xyplb"))))
140 (build-system gnu-build-system)
142 `(#:configure-flags (list "--enable-gtk3")
144 (modify-phases %standard-phases
145 (add-after 'unpack 'xrandr-absolutely
146 ;; lxrandr is useless without xrandr and gives an unhelpful error
147 ;; message if it's not in $PATH, so make it a hard dependency.
148 (lambda* (#:key input #:allow-other-keys)
149 (substitute* "src/lxrandr.c"
150 (("(\"|')xrandr\"" _ match)
151 (string-append match (which "xrandr") "\""))))))))
152 (inputs (list gtk+ xrandr))
153 (native-inputs (list intltool pkg-config))
154 (synopsis "LXDE monitor configuration tool")
155 (description "LXRandR is a very basic monitor configuration tool. It
156 relies on the X11 resize-and-rotate (RandR) extension but doesn't aim to be a
157 full frontend of it. LXRandR only gives you some easy and quick options which
158 are intuitive. It's suitable for laptop users who frequently uses projectors
159 or external monitor.")
160 (home-page "https://www.lxde.org/")
161 (license license:gpl2+)))
163 (define-public lxtask
169 (uri (string-append "mirror://sourceforge/lxde/LXTask"
170 "%20%28task%20manager%29/LXTask%20"
171 (version-major+minor version) ".x/"
172 "lxtask-" version ".tar.xz"))
175 "0b2fxg8jjjpk219gh7qa18g45365598nd2bq7rrq0bdvqjdxy5i2"))))
176 (build-system gnu-build-system)
177 (arguments (list #:configure-flags #~(list "--enable-gtk3")))
179 (native-inputs (list intltool pkg-config))
180 (synopsis "LXDE task manager")
181 (description "LXTask is a lightweight task manager derived from Xfce task
182 manager with all dependencies on Xfce removed. LXTask is based on the GTK+
183 toolkit. It allows users to monitor and control of running processes.")
184 (home-page "https://www.lxde.org/")
185 (license license:gpl2+)))
187 (define-public lxterminal
193 (uri (string-append "mirror://sourceforge/lxde/LXTerminal"
194 "%20%28terminal%20emulator%29/LXTerminal%20"
195 version "/" name "-" version ".tar.xz"))
198 "1124pghrhnx6q4391ri8nvi6bsmvbj1dx81an08mird8jf2b2rii"))))
199 (build-system gnu-build-system)
200 (arguments (list #:configure-flags #~(list "--enable-gtk3")))
201 (inputs (list gtk+ vte))
202 (native-inputs (list intltool pkg-config))
203 (synopsis "LXDE terminal emulator")
204 (description "LXTerminal is a VTE-based terminal emulator. It supports
205 multiple tabs and has only minimal dependencies thus being completely
206 desktop-independent. In order to reduce memory usage and increase the
207 performance, all instances of the terminal are sharing a single process.")
208 (home-page "https://www.lxde.org/")
209 (license license:gpl2+)))
211 (define-public menu-cache
217 (uri (string-append "mirror://sourceforge/lxde/" name "/"
218 (version-major+minor version) "/"
219 name "-" version ".tar.xz"))
222 "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd"))))
223 (build-system gnu-build-system)
224 (inputs `(("glib" ,glib)
225 ("libfm" ,libfm-extra)))
226 (native-inputs (list pkg-config))
228 `(#:configure-flags '("CFLAGS=-fcommon")))
229 (synopsis "LXDE implementation of the freedesktop menu's cache")
230 (description "Menu-cache is a library creating and utilizing caches to
231 speed up the access to freedesktop.org defined application menus.")
232 (home-page "https://www.lxde.org/")
233 (license license:lgpl2.1+)))
235 (define-public pcmanfm
241 (uri (string-append "mirror://sourceforge/pcmanfm/"
242 "PCManFM%20%2B%20Libfm%20%28tarball%20release"
243 "%29/PCManFM/pcmanfm-" version ".tar.xz"))
246 "1xqc2k2jh165mm81xg0ghxx0ml1s3rhh4ndvbzkcri4kfhj7pjql"))))
247 (build-system gnu-build-system)
248 (arguments (list #:configure-flags #~(list "--with-gtk=3")))
249 (inputs (list gtk+ gvfs ;for trash and mount support
251 (native-inputs (list intltool libtool pkg-config))
253 (list lxmenu-data)) ;for "Open With..." application list
254 (synopsis "LXDE file manager")
255 (description "PCMan is a lightweight GTK+ based file manager, compliant
256 with freedesktop.org standard.")
257 (home-page "https://www.lxde.org/")
258 (license license:gpl2+)))
260 (define-public spacefm
261 ;; SpaceFM is based on PCManFM.
270 (url "https://github.com/IgnorantGuru/spacefm")
272 (file-name (git-file-name name version))
274 (base32 "193mdcv73cfc2bnm4bzmnf1wmkzgj1ya64y0lgyxn3ww36ghcsx9"))
275 (modules '((guix build utils)))
278 (substitute* "src/main.c"
279 (("#include <sys/types\\.h>" all)
280 ;; Add missing include for 'major' and 'minor' with glibc
282 (string-append all "\n"
283 "#include <sys/sysmacros.h>\n")))
285 (build-system glib-or-gtk-build-system)
287 `(("desktop-file-utils" ,desktop-file-utils)
288 ("glib:bin" ,glib "bin")
289 ("gtk+:bin" ,gtk+ "bin")
290 ("intltool" ,intltool)
291 ("pkg-config" ,pkg-config)))
322 (modify-phases %standard-phases
323 (add-after 'unpack 'patch-bin-dirs
324 (lambda* (#:key inputs #:allow-other-keys)
325 (let* ((bash (assoc-ref inputs "bash"))
326 (coreutils (assoc-ref inputs "coreutils"))
327 (util-linux (assoc-ref inputs "util-linux"))
328 (procps (assoc-ref inputs "procps"))
329 (e2fsprogs (assoc-ref inputs "e2fsprogs"))
330 (btrfs-progs (assoc-ref inputs "btrfs-progs"))
331 (ntfs-3g (assoc-ref inputs "ntfs-3g"))
332 (lsof (assoc-ref inputs "lsof"))
333 (fsarchiver (assoc-ref inputs "fsarchiver"))
334 (ktsuss (assoc-ref inputs "ktsuss")))
335 (with-directory-excursion "src"
336 (substitute* '("ptk/ptk-file-task.c" "ptk/ptk-handler.h"
337 "ptk/ptk-location-view.c" "spacefm-auth"
338 "spacefm-auth.bash" "vfs/vfs-file-task.c"
339 "settings.c" "../data/ui/prefdlg.ui"
340 "../data/ui/prefdlg2.ui")
341 (("/bin/sh" file) (string-append bash file))
342 (("/bin/bash" file) (string-append bash file))
343 (("/bin/kill" file) (string-append coreutils file))
344 (("/bin/ls" file) (string-append coreutils file))
345 (("/usr(/bin/sha256sum)" _ file) (string-append coreutils file))
346 (("/usr(/bin/sha512sum)" _ file) (string-append coreutils file))
347 (("/sbin/fsck" file) (string-append util-linux file))
348 (("/sbin/mkfs" file) (string-append util-linux file))
349 (("/sbin/mkswap" file) (string-append util-linux file))
350 (("/bin/ps" file) (string-append procps file))
351 (("/sbin/tune2fs" file) (string-append e2fsprogs file))
352 (("/sbin/btrfs") (string-append btrfs-progs "/bin/btrfs"))
353 (("/sbin/ntfslabel" file) (string-append ntfs-3g file))
354 (("/usr(/bin/lsof)" _ file) (string-append lsof file))
355 (("(/usr)?/(sbin|bin)/fsarchiver") (string-append fsarchiver
357 (("/usr(/bin/ktsuss)" _ file) (string-append ktsuss file))))
359 (add-after 'patch-bin-dirs 'patch-share-dirs
360 (lambda* (#:key outputs #:allow-other-keys)
361 (let* ((out (assoc-ref outputs "out"))
362 (share (string-append out "/share")))
363 (with-directory-excursion "src"
364 (substitute* '("main-window.c" "settings.c"
365 "ptk/ptk-app-chooser.c")
366 (("/usr(/local)?/share") share)))
368 (add-after 'patch-share-dirs 'patch-mime-dirs
369 (lambda* (#:key inputs #:allow-other-keys)
370 (let* ((mime (search-input-directory inputs "/share/mime")))
371 (with-directory-excursion "src"
372 (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
373 (("/usr(/local)?/share/mime") mime)))
375 (add-after 'patch-mime-dirs 'patch-setuid-progs
377 (let* ((su "/run/setuid-programs/su")
378 (mount "/run/setuid-programs/mount")
379 (umount "/run/setuid-programs/umount")
380 (udevil "/run/setuid-programs/udevil"))
381 (with-directory-excursion "src"
382 (substitute* '("settings.c" "settings.h" "vfs/vfs-file-task.c"
383 "vfs/vfs-volume-hal.c" "../data/ui/prefdlg.ui"
384 "../data/ui/prefdlg2.ui")
385 (("(/usr)?/bin/su") su)
386 (("/(bin|sbin)/mount") mount)
387 (("/(bin|sbin)/umount") umount)
388 (("/usr/bin/udevil") udevil)))
390 (add-after 'patch-setuid-progs 'patch-spacefm-conf
391 (lambda* (#:key inputs #:allow-other-keys)
392 (substitute* "etc/spacefm.conf"
393 (("#terminal_su=/bin/su")
394 "terminal_su=/run/setuid-programs/su")
395 (("#graphical_su=/usr/bin/gksu")
396 (string-append "graphical_su="
397 (search-input-file inputs "/bin/ktsuss")))))))
398 #:configure-flags (list
400 (string-append "--with-preferable-sudo="
401 (assoc-ref %build-inputs "ktsuss")
403 (string-append "--with-bash-path="
404 (assoc-ref %build-inputs "bash")
406 (string-append "--sysconfdir="
407 (assoc-ref %outputs "out")
409 (home-page "https://ignorantguru.github.io/spacefm/")
410 (synopsis "Multi-panel tabbed file manager")
411 (description "SpaceFM is a graphical, multi-panel, tabbed file manager
412 based on PCManFM with built-in virtual file system, udev-based device manager,
413 customizable menu system, and Bash integration.")
415 ;; The combination is GPLv3+ but src/exo is under LGPLv3+.
416 (license license:gpl3+)))
418 (define-public lxmenu-data
425 (uri (string-append "mirror://sourceforge//lxde/"
426 "lxmenu-data%20%28desktop%20menu%29/"
427 name "-" version ".tar.xz"))
430 "1f5sh2dvb3pdnjlcsyzq9543ck2jsqizkx3204cr22zm5s6j3qwz"))))
431 (build-system gnu-build-system)
433 (list pkg-config intltool))
434 (synopsis "Freedesktop.org desktop menus for LXDE")
436 "Lxmenu-data provides files required to build freedesktop.org
437 menu spec-compliant desktop menus for LXDE.")
438 (home-page "https://www.lxde.org/")
439 (license license:lgpl2.1+)))
441 (define-public lxde-icon-theme
443 (name "lxde-icon-theme")
448 (uri (string-append "mirror://sourceforge/lxde/LXDE%20Icon%20Theme/"
449 "lxde-icon-theme-" version "/"
450 name "-" version ".tar.xz"))
453 "0v4i6x86fr2hbx4fb2si7y2qzmj7h6hcjwaifnin18r8kwwvgl73"))))
454 (build-system gnu-build-system)
457 (synopsis "LXDE default icon theme based on nuoveXT2")
459 "Lxde-icon-theme provides an default icon theme for LXDE.")
460 (home-page "https://www.lxde.org/")
461 (license license:lgpl3)))
463 (define-public lxde-common
470 (uri (string-append "mirror://sourceforge/lxde/"
471 "lxde-common%20%28default%20config%29/"
472 "lxde-common%20" (version-major+minor version) "/"
473 name "-" version ".tar.xz"))
476 "0mj84fa3f4ak1jjslrwc2q3ci9zxrxpciggviza9bjb0168brn8w"))))
477 (build-system gnu-build-system)
479 '(#:phases (modify-phases %standard-phases
480 (add-before 'configure 'set-lxsession
481 (lambda* (#:key inputs #:allow-other-keys)
482 ;; Set the right file name for 'lxsession'.
483 (let ((lxsession (assoc-ref inputs "lxsession")))
484 (substitute* "startlxde.in"
485 (("^exec .*/bin/lxsession")
486 (string-append "exec " lxsession
490 (list pkg-config intltool lxmenu-data lxde-icon-theme))
493 ;; ("lxlock" ,lxlock) ;for 'lxde-screenlock.desktop'
495 (synopsis "Common files of the LXDE Desktop")
497 "Lxde-common provides common files of the LXDE Desktop.")
498 (home-page "https://www.lxde.org/")
499 (license license:gpl2+)))
501 (define-public lxinput
508 (uri (string-append "mirror://sourceforge/lxde/"
509 "LXInput%20%28Kbd%20and%20amp_%20mouse%20config%29/"
510 "LXInput%200.3.x/" name "-" version ".tar.xz"))
513 "123f3yn4rp1w5b3n5aj3ad9snkxab29qkrs7bcvf5bx4cn57g3sf"))))
514 (build-system gnu-build-system)
515 (arguments (list #:configure-flags #~(list "--enable-gtk3")))
519 (list pkg-config intltool))
520 (synopsis "Tool for mouse and keyboard configuration in LXDE")
522 "Lxinput provides a small program to configure keyboard and mouse
524 (home-page "https://www.lxde.org/")
525 (license license:gpl2+)))
527 (define-public lxsession
534 (uri (string-append "mirror://sourceforge/lxde/"
535 "LXSession%20%28session%20manager%29/"
537 "lxsession-" version ".tar.xz"))
539 (base32 "0imv9nysip1j9lrb2z96kl05isjgp312323wnnd5b59h0ff0sgp4"))
540 (modules '((guix build utils)))
542 ;; Remove C files generated by Vala so we can build from source.
545 (string-append (string-drop-right file 2)
549 (and (string-suffix? ".c" file)
550 (file-exists? (c->vala file))))))
551 (for-each delete-file
552 (find-files "." generated-c-file?))))))
553 (build-system gnu-build-system)
555 `(#:configure-flags (list "--enable-gtk3")
557 (modify-phases %standard-phases
558 (add-after 'unpack 'rm-stamp
560 (for-each delete-file (find-files "." "\\.stamp$"))
561 ;; Force regeneration of configure script.
562 (delete-file "configure"))))))
571 ;; For bootstrapping.
574 (synopsis "Lightweight X11 session manager")
576 "Lxsession provides an lightweight X11 session manager.")
577 (home-page "https://www.lxde.org/")
578 (license license:gpl2+)))
580 (define-public lxpanel
587 (uri (string-append "mirror://sourceforge/lxde/"
588 "LXPanel%20%28desktop%20panel%29/"
589 "LXPanel%200.10.x/lxpanel-"
592 (base32 "1s0y8jjkw6qz0r8l90618b8xly0c8g906kah7b162sz3sxbqyc8y"))))
593 (build-system gnu-build-system)
596 #:configure-flags #~(list "--enable-gtk3")
598 #~(modify-phases %standard-phases
599 (add-after 'install 'wrap
600 (lambda* (#:key inputs outputs #:allow-other-keys)
601 (wrap-program (search-input-file outputs "bin/lxpanel")
602 `("XDG_DATA_DIRS" ":" prefix
603 (,(string-append #$(this-package-input "lxmenu-data")
607 bash-minimal ;for wrap-program
628 (synopsis "X11 Desktop panel for LXDE")
630 "Lxpanel provides an X11 desktop panel for LXDE.")
631 (home-page "https://www.lxde.org/")
632 (license license:gpl2+)))
637 (version (package-version lxde-common))
639 (build-system trivial-build-system)
640 (arguments '(#:builder (begin (mkdir %output) #t)))
643 ;; lxshortcut, lxsession-edit
644 ;; lxappearance-obconf
662 (synopsis "Lightweight X11 Desktop Environment")
664 "LXDE, which stands for Lightweight X11 Desktop Environment, is a
665 desktop environment which is lightweight and fast. It is designed to be
666 user friendly and slim, while keeping the resource usage low. LXDE uses
667 less RAM and less CPU while being a feature rich desktop environment. Unlike
668 other tightly integrated desktops LXDE strives to be modular, so each
669 component can be used independently with few dependencies.")
670 (home-page "https://www.lxde.org/")
671 (license license:gpl2+))) ; And others.
673 ;;; lxde.scm ends here