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, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2018 ison <ison@airmail.cc>
9 ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
10 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages lxde)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages admin)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bash)
34 #:use-module (gnu packages curl)
35 #:use-module (gnu packages disk)
36 #:use-module (gnu packages docbook)
37 #:use-module (gnu packages file-systems)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages gettext)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image-viewers)
44 #:use-module (gnu packages libusb)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages lsof)
47 #:use-module (gnu packages openbox)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages polkit)
50 #:use-module (gnu packages text-editors)
51 #:use-module (gnu packages video)
52 #:use-module (gnu packages wget)
53 #:use-module (gnu packages wm)
54 #:use-module (gnu packages xdisorg)
55 #:use-module (gnu packages xml)
56 #:use-module (gnu packages xorg)
57 #:use-module (guix build-system glib-or-gtk)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system trivial)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module ((guix licenses) #:prefix license:)
63 #:use-module (guix packages)
64 #:use-module (guix utils))
72 (uri (string-append "mirror://sourceforge/pcmanfm/"
73 "PCManFM%20%2B%20Libfm%20%28tarball%20release"
74 "%29/LibFM/" name "-" version ".tar.xz"))
77 "1r6gl49xrykldwz8y4h2s7gjarxigg3bbkrj0gphxjj1vr5j9ccn"))))
78 (build-system gnu-build-system)
79 (inputs `(("glib" ,glib)
81 (native-inputs `(("intltool" ,intltool)
82 ("glib" ,glib "bin") ; for gtester
84 ("menu-cache" ,menu-cache)
85 ("pkg-config" ,pkg-config)
87 (synopsis "File management support (core library)")
88 (description "LibFM provides file management functions built on top of
89 Glib/GIO giving a higher-level API.")
90 (home-page "https://lxde.github.io")
91 (license license:gpl2+)))
93 (define-public libfm-extra
94 (package (inherit libfm)
96 (arguments '(#:configure-flags '("--with-extra-only")))
97 (inputs `(("glib" ,glib)))
98 (native-inputs `(("intltool" ,intltool)
100 ("pkg-config" ,pkg-config)))
101 (synopsis "File management support (extra library)")
102 (description "This package contains standalone library which extends the
103 libFM file management library.")))
105 (define-public lxappearance
107 (name "lxappearance")
112 (uri (string-append "mirror://sourceforge/lxde/"
113 "LXAppearance/lxappearance-" version ".tar.xz"))
115 (base32 "0f4bjaamfxxdr9civvy55pa6vv9dx1hjs522gjbbgx7yp1cdh8kj"))))
116 (build-system gnu-build-system)
117 (inputs `(("gtk+" ,gtk+-2)))
118 (native-inputs `(("intltool" ,intltool)
119 ("pkg-config" ,pkg-config)))
120 (synopsis "LXDE GTK+ theme switcher")
121 (description "LXAppearance is a desktop-independent GTK+ theme switcher
122 able to change themes, icons, and fonts used by GTK+ applications.")
123 (home-page "https://lxde.github.io")
124 (license license:gpl2+)))
126 (define-public lxrandr
132 (uri (string-append "mirror://sourceforge/lxde/LXRandR"
133 "%20%28monitor%20config%20tool%29/LXRandR%20"
134 (version-major+minor version) ".x/"
135 "lxrandr-" version ".tar.xz"))
138 "04n3vgh3ix12p8jfs4w0dyfq3anbjy33h7g53wbbqqc0f74xyplb"))))
139 (build-system gnu-build-system)
142 (modify-phases %standard-phases
143 (add-after 'unpack 'xrandr-absolutely
144 ;; lxrandr is useless without xrandr and gives an unhelpful error
145 ;; message if it's not in $PATH, so make it a hard dependency.
146 (lambda* (#:key input #:allow-other-keys)
147 (substitute* "src/lxrandr.c"
148 (("(\"|')xrandr\"" _ match)
149 (string-append match (which "xrandr") "\"")))
151 (inputs `(("gtk+" ,gtk+-2)
153 (native-inputs `(("intltool" ,intltool)
154 ("pkg-config" ,pkg-config)))
155 (synopsis "LXDE monitor configuration tool")
156 (description "LXRandR is a very basic monitor configuration tool. It
157 relies on the X11 resize-and-rotate (RandR) extension but doesn't aim to be a
158 full frontend of it. LXRandR only gives you some easy and quick options which
159 are intuitive. It's suitable for laptop users who frequently uses projectors
160 or external monitor.")
161 (home-page "https://lxde.github.io")
162 (license license:gpl2+)))
164 (define-public lxtask
170 (uri (string-append "mirror://sourceforge/lxde/LXTask"
171 "%20%28task%20manager%29/LXTask%20"
172 (version-major+minor version) ".x/"
173 "lxtask-" version ".tar.xz"))
176 "0cv4hx5dg01hbyi5p10pl78n0a40xajpq4wx9c7886pkmpq8isj1"))))
177 (build-system gnu-build-system)
178 (inputs `(("gtk+" ,gtk+-2)))
179 (native-inputs `(("intltool" ,intltool)
180 ("pkg-config" ,pkg-config)))
181 (synopsis "LXDE task manager")
182 (description "LXTask is a lightweight task manager derived from Xfce task
183 manager with all dependencies on Xfce removed. LXTask is based on the GTK+
184 toolkit. It allows users to monitor and control of running processes.")
185 (home-page "https://lxde.github.io")
186 (license license:gpl2+)))
188 (define-public lxterminal
194 (uri (string-append "mirror://sourceforge/lxde/LXTerminal"
195 "%20%28terminal%20emulator%29/LXTerminal%20"
196 version "/" name "-" version ".tar.xz"))
199 "1124pghrhnx6q4391ri8nvi6bsmvbj1dx81an08mird8jf2b2rii"))))
200 (build-system gnu-build-system)
201 (inputs `(("gtk+" ,gtk+-2)
202 ("vte" ,vte/gtk+-2)))
203 (native-inputs `(("intltool" ,intltool)
204 ("pkg-config" ,pkg-config)))
205 (synopsis "LXDE terminal emulator")
206 (description "LXTerminal is a VTE-based terminal emulator. It supports
207 multiple tabs and has only minimal dependencies thus being completely
208 desktop-independent. In order to reduce memory usage and increase the
209 performance, all instances of the terminal are sharing a single process.")
210 (home-page "https://lxde.github.io")
211 (license license:gpl2+)))
213 (define-public menu-cache
219 (uri (string-append "mirror://sourceforge/lxde/" name "/"
220 (version-major+minor version) "/"
221 name "-" version ".tar.xz"))
224 "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd"))))
225 (build-system gnu-build-system)
226 (inputs `(("glib" ,glib)
227 ("libfm" ,libfm-extra)))
228 (native-inputs `(("pkg-config" ,pkg-config)))
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://lxde.github.io")
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 "0mb8hg76x1z0szdyl0w7jpz0bdblc6a29is1vvnh79z37qxh8138"))))
247 (build-system gnu-build-system)
248 (inputs `(("gtk+" ,gtk+-2)
249 ("gvfs" ,gvfs) ; for trash and mount support
252 (native-inputs `(("intltool" ,intltool)
254 ("pkg-config" ,pkg-config)))
256 `(("lxmenu-data" ,lxmenu-data))) ; for "Open With..." application list
257 (synopsis "LXDE file manager")
258 (description "PCMan is a lightweight GTK+ based file manager, compliant
259 with freedesktop.org standard.")
260 (home-page "https://lxde.github.io")
261 (license license:gpl2+)))
263 (define-public spacefm
264 ;; SpaceFM is based on PCManFM.
273 (url "https://github.com/IgnorantGuru/spacefm")
275 (file-name (git-file-name name version))
277 (base32 "193mdcv73cfc2bnm4bzmnf1wmkzgj1ya64y0lgyxn3ww36ghcsx9"))
278 (modules '((guix build utils)))
281 (substitute* "src/main.c"
282 (("#include <sys/types\\.h>" all)
283 ;; Add missing include for 'major' and 'minor' with glibc
285 (string-append all "\n"
286 "#include <sys/sysmacros.h>\n")))
288 (build-system glib-or-gtk-build-system)
290 `(("desktop-file-utils" ,desktop-file-utils)
291 ("glib:bin" ,glib "bin")
292 ("gtk+:bin" ,gtk+ "bin")
293 ("intltool" ,intltool)
294 ("pkg-config" ,pkg-config)))
297 ("btrfs-progs" ,btrfs-progs)
299 ("coreutils" ,coreutils)
300 ("curlftpfs" ,curlftpfs)
301 ("e2fsprogs" ,e2fsprogs)
303 ("fakeroot" ,fakeroot)
304 ("ffmpegthumbnailer" ,ffmpegthumbnailer)
305 ("fsarchiver" ,fsarchiver)
308 ("gphotofs" ,gphotofs)
318 ("shared-mime-info" ,shared-mime-info)
319 ("startup-notification" ,startup-notification)
321 ("util-linux" ,util-linux)
325 (modify-phases %standard-phases
326 (add-after 'unpack 'patch-bin-dirs
327 (lambda* (#:key inputs #:allow-other-keys)
328 (let* ((bash (assoc-ref inputs "bash"))
329 (coreutils (assoc-ref inputs "coreutils"))
330 (util-linux (assoc-ref inputs "util-linux"))
331 (procps (assoc-ref inputs "procps"))
332 (e2fsprogs (assoc-ref inputs "e2fsprogs"))
333 (btrfs-progs (assoc-ref inputs "btrfs-progs"))
334 (ntfs-3g (assoc-ref inputs "ntfs-3g"))
335 (lsof (assoc-ref inputs "lsof"))
336 (fsarchiver (assoc-ref inputs "fsarchiver"))
337 (ktsuss (assoc-ref inputs "ktsuss")))
338 (with-directory-excursion "src"
339 (substitute* '("ptk/ptk-file-task.c" "ptk/ptk-handler.h"
340 "ptk/ptk-location-view.c" "spacefm-auth"
341 "spacefm-auth.bash" "vfs/vfs-file-task.c"
342 "settings.c" "../data/ui/prefdlg.ui"
343 "../data/ui/prefdlg2.ui")
344 (("/bin/sh" file) (string-append bash file))
345 (("/bin/bash" file) (string-append bash file))
346 (("/bin/kill" file) (string-append coreutils file))
347 (("/bin/ls" file) (string-append coreutils file))
348 (("/usr(/bin/sha256sum)" _ file) (string-append coreutils file))
349 (("/usr(/bin/sha512sum)" _ file) (string-append coreutils file))
350 (("/sbin/fsck" file) (string-append util-linux file))
351 (("/sbin/mkfs" file) (string-append util-linux file))
352 (("/sbin/mkswap" file) (string-append util-linux file))
353 (("/bin/ps" file) (string-append procps file))
354 (("/sbin/tune2fs" file) (string-append e2fsprogs file))
355 (("/sbin/btrfs") (string-append btrfs-progs "/bin/btrfs"))
356 (("/sbin/ntfslabel" file) (string-append ntfs-3g file))
357 (("/usr(/bin/lsof)" _ file) (string-append lsof file))
358 (("(/usr)?/(sbin|bin)/fsarchiver") (string-append fsarchiver
360 (("/usr(/bin/ktsuss)" _ file) (string-append ktsuss file))))
362 (add-after 'patch-bin-dirs 'patch-share-dirs
363 (lambda* (#:key outputs #:allow-other-keys)
364 (let* ((out (assoc-ref outputs "out"))
365 (share (string-append out "/share")))
366 (with-directory-excursion "src"
367 (substitute* '("main-window.c" "settings.c"
368 "ptk/ptk-app-chooser.c")
369 (("/usr(/local)?/share") share)))
371 (add-after 'patch-share-dirs 'patch-mime-dirs
372 (lambda* (#:key inputs #:allow-other-keys)
373 (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
375 (with-directory-excursion "src"
376 (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
377 (("/usr(/local)?/share/mime") mime)))
379 (add-after 'patch-mime-dirs 'patch-setuid-progs
381 (let* ((su "/run/setuid-programs/su")
382 (mount "/run/setuid-programs/mount")
383 (umount "/run/setuid-programs/umount")
384 (udevil "/run/setuid-programs/udevil"))
385 (with-directory-excursion "src"
386 (substitute* '("settings.c" "settings.h" "vfs/vfs-file-task.c"
387 "vfs/vfs-volume-hal.c" "../data/ui/prefdlg.ui"
388 "../data/ui/prefdlg2.ui")
389 (("(/usr)?/bin/su") su)
390 (("/(bin|sbin)/mount") mount)
391 (("/(bin|sbin)/umount") umount)
392 (("/usr/bin/udevil") udevil)))
394 (add-after 'patch-setuid-progs 'patch-spacefm-conf
395 (lambda* (#:key inputs #:allow-other-keys)
396 (substitute* "etc/spacefm.conf"
397 (("#terminal_su=/bin/su")
398 "terminal_su=/run/setuid-programs/su")
399 (("#graphical_su=/usr/bin/gksu")
400 (string-append "graphical_su="
401 (string-append (assoc-ref inputs "ktsuss")
404 #:configure-flags (list
405 (string-append "--with-preferable-sudo="
406 (assoc-ref %build-inputs "ktsuss")
408 (string-append "--with-bash-path="
409 (assoc-ref %build-inputs "bash")
411 (string-append "--sysconfdir="
412 (assoc-ref %outputs "out")
414 (home-page "https://ignorantguru.github.io/spacefm/")
415 (synopsis "Multi-panel tabbed file manager")
416 (description "SpaceFM is a graphical, multi-panel, tabbed file manager
417 based on PCManFM with built-in virtual file system, udev-based device manager,
418 customizable menu system, and Bash integration.")
420 ;; The combination is GPLv3+ but src/exo is under LGPLv3+.
421 (license license:gpl3+)))
423 (define-public lxmenu-data
430 (uri (string-append "https://downloads.sourceforge.net/lxde/"
431 name "-" version ".tar.xz"))
434 "1f5sh2dvb3pdnjlcsyzq9543ck2jsqizkx3204cr22zm5s6j3qwz"))))
435 (build-system gnu-build-system)
437 `(("pkg-config" ,pkg-config)
438 ("intltool" ,intltool)))
439 (synopsis "Freedesktop.org desktop menus for LXDE")
441 "Lxmenu-data provides files required to build freedesktop.org
442 menu spec-compliant desktop menus for LXDE.")
443 (home-page "https://lxde.github.io")
444 (license license:lgpl2.1+)))
446 (define-public lxde-icon-theme
448 (name "lxde-icon-theme")
453 (uri (string-append "https://downloads.sourceforge.net/lxde/"
454 name "-" version ".tar.xz"))
457 "0v4i6x86fr2hbx4fb2si7y2qzmj7h6hcjwaifnin18r8kwwvgl73"))))
458 (build-system gnu-build-system)
460 `(("pkg-config" ,pkg-config)))
461 (synopsis "LXDE default icon theme based on nuoveXT2")
463 "Lxde-icon-theme provides an default icon theme for LXDE.")
464 (home-page "https://lxde.github.io")
465 (license license:lgpl3)))
467 (define-public lxde-common
474 (uri (string-append "https://downloads.sourceforge.net/lxde/"
475 name "-" version ".tar.xz"))
478 "0mj84fa3f4ak1jjslrwc2q3ci9zxrxpciggviza9bjb0168brn8w"))))
479 (build-system gnu-build-system)
481 '(#:phases (modify-phases %standard-phases
482 (add-before 'configure 'set-lxsession
483 (lambda* (#:key inputs #:allow-other-keys)
484 ;; Set the right file name for 'lxsession'.
485 (let ((lxsession (assoc-ref inputs "lxsession")))
486 (substitute* "startlxde.in"
487 (("^exec .*/bin/lxsession")
488 (string-append "exec " lxsession
492 `(("pkg-config" ,pkg-config)
493 ("intltool" ,intltool)
494 ("lxmenu-data" ,lxmenu-data)
495 ("lxde-icon-theme" ,lxde-icon-theme)))
497 `(("lxsession" ,lxsession)
498 ;; ("lxlock" ,lxlock) ;for 'lxde-screenlock.desktop'
500 (synopsis "Common files of the LXDE Desktop")
502 "Lxde-common provides common files of the LXDE Desktop.")
503 (home-page "https://lxde.github.io")
504 (license license:gpl2+)))
506 (define-public lxinput
513 (uri (string-append "https://downloads.sourceforge.net/lxde/"
514 name "-" version ".tar.xz"))
517 "123f3yn4rp1w5b3n5aj3ad9snkxab29qkrs7bcvf5bx4cn57g3sf"))))
518 (build-system gnu-build-system)
520 `(("gtk+-2" ,gtk+-2)))
522 `(("pkg-config" ,pkg-config)
523 ("intltool" ,intltool)))
524 (synopsis "Tool for mouse and keyboard configuration in LXDE")
526 "Lxinput provides a small program to configure keyboard and mouse
528 (home-page "https://lxde.github.io")
529 (license license:gpl2+)))
531 (define-public lxsession
538 (uri (string-append "https://downloads.sourceforge.net/lxde/"
539 "lxsession-" version ".tar.xz"))
541 (base32 "0imv9nysip1j9lrb2z96kl05isjgp312323wnnd5b59h0ff0sgp4"))
542 (modules '((guix build utils)))
544 ;; Remove C files generated by Vala so we can build from source.
547 (string-append (string-drop-right file 2)
551 (and (string-suffix? ".c" file)
552 (file-exists? (c->vala file))))))
553 (for-each delete-file
554 (find-files "." generated-c-file?))
556 (build-system gnu-build-system)
559 (modify-phases %standard-phases
560 (add-after 'unpack 'rm-stamp
562 (for-each delete-file (find-files "." "\\.stamp$"))
563 ;; Force regeneration of configure script.
564 (delete-file "configure")
570 `(("pkg-config" ,pkg-config)
571 ("intltool" ,intltool)
572 ("docbook-xsl" ,docbook-xsl)
575 ;; For bootstrapping.
576 ("autoconf" ,autoconf)
577 ("automake" ,automake)))
578 (synopsis "Lightweight X11 session manager")
580 "Lxsession provides an lightweight X11 session manager.")
581 (home-page "https://lxde.github.io")
582 (license license:gpl2+)))
584 (define-public lxpanel
591 (uri (string-append "https://downloads.sourceforge.net/lxde/"
592 "lxpanel-" version ".tar.xz"))
594 (base32 "0zis3b815p375s6mymhf5sn1a0c1xv0ixxzb0mh3fqhrby6cqy26"))))
595 (build-system gnu-build-system)
598 (modify-phases %standard-phases
599 (add-after 'install 'wrap
600 (lambda* (#:key inputs outputs #:allow-other-keys)
601 (let ((out (assoc-ref outputs "out"))
602 (menu (assoc-ref inputs "lxmenu-data")))
603 (wrap-program (string-append out "/bin/lxpanel")
604 `("XDG_DATA_DIRS" ":" prefix
605 (,(string-append menu "/share"))))
608 ;; TODO: libindicator-0.3.0
611 ("alsa-lib" ,alsa-lib)
612 ("libwnck-2" ,libwnck-2)
613 ("keybinder" ,keybinder)
619 ("wireless-tools" ,wireless-tools)))
621 `(("pkg-config" ,pkg-config)
622 ("intltool" ,intltool)
623 ("docbook-xml" ,docbook-xml)
624 ("gettext-minimal" ,gettext-minimal)))
626 `(("lxmenu-data" ,lxmenu-data)
628 ("menu-cache" ,menu-cache)))
629 (synopsis "X11 Desktop panel for LXDE")
631 "Lxpanel provides an X11 desktop panel for LXDE.")
632 (home-page "https://lxde.github.io")
633 (license license:gpl2+)))
638 (version (package-version lxde-common))
640 (build-system trivial-build-system)
641 (arguments '(#:builder (begin (mkdir %output) #t)))
644 ;; lxshortcut, lxsession-edit
645 ;; lxappearance-obconf
646 `(("menu-cache" ,menu-cache)
647 ("gpicview" ,gpicview)
649 ("lxappearance" ,lxappearance)
650 ("lxde-icon-theme" ,lxde-icon-theme)
651 ("lxde-common" ,lxde-common)
652 ("lxmenu-data" ,lxmenu-data)
655 ("lxsession" ,lxsession)
657 ("libfm-extra" ,libfm-extra)
659 ("lxterminal" ,lxterminal)
663 (synopsis "Lightweight X11 Desktop Environment")
665 "LXDE, which stands for Lightweight X11 Desktop Environment, is a
666 desktop environment which is lightweight and fast. It is designed to be
667 user friendly and slim, while keeping the resource usage low. LXDE uses
668 less RAM and less CPU while being a feature rich desktop environment. Unlike
669 other tightly integrated desktops LXDE strives to be modular, so each
670 component can be used independently with few dependencies.")
671 (home-page "https://lxde.github.io")
672 (license license:gpl2+))) ; And others.
674 ;;; lxde.scm ends here