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 disk)
35 #:use-module (gnu packages docbook)
36 #:use-module (gnu packages file-systems)
37 #:use-module (gnu packages freedesktop)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages image-viewers)
43 #:use-module (gnu packages libusb)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages lsof)
46 #:use-module (gnu packages openbox)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages polkit)
49 #:use-module (gnu packages text-editors)
50 #:use-module (gnu packages video)
51 #:use-module (gnu packages wget)
52 #:use-module (gnu packages wm)
53 #:use-module (gnu packages xdisorg)
54 #:use-module (gnu packages xml)
55 #:use-module (gnu packages xorg)
56 #:use-module (guix build-system glib-or-gtk)
57 #:use-module (guix build-system gnu)
58 #:use-module (guix build-system trivial)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module ((guix licenses) #:prefix license:)
62 #:use-module (guix packages)
63 #:use-module (guix utils))
71 (uri (string-append "mirror://sourceforge/pcmanfm/"
72 "PCManFM%20%2B%20Libfm%20%28tarball%20release"
73 "%29/LibFM/" name "-" version ".tar.xz"))
76 "1r6gl49xrykldwz8y4h2s7gjarxigg3bbkrj0gphxjj1vr5j9ccn"))))
77 (build-system gnu-build-system)
78 (inputs `(("glib" ,glib)
80 (native-inputs `(("intltool" ,intltool)
81 ("glib" ,glib "bin") ; for gtester
83 ("menu-cache" ,menu-cache)
84 ("pkg-config" ,pkg-config)
86 (synopsis "File management support (core library)")
87 (description "LibFM provides file management functions built on top of
88 Glib/GIO giving a higher-level API.")
89 (home-page "https://lxde.org")
90 (license license:gpl2+)))
92 (define-public libfm-extra
93 (package (inherit libfm)
95 (arguments '(#:configure-flags '("--with-extra-only")))
96 (inputs `(("glib" ,glib)))
97 (native-inputs `(("intltool" ,intltool)
99 ("pkg-config" ,pkg-config)))
100 (synopsis "File management support (extra library)")
101 (description "This package contains standalone library which extends the
102 libFM file management library.")))
104 (define-public lxappearance
106 (name "lxappearance")
111 (uri (string-append "mirror://sourceforge/lxde/"
112 "LXAppearance/lxappearance-" version ".tar.xz"))
114 (base32 "0f4bjaamfxxdr9civvy55pa6vv9dx1hjs522gjbbgx7yp1cdh8kj"))))
115 (build-system gnu-build-system)
116 (inputs `(("gtk+" ,gtk+-2)))
117 (native-inputs `(("intltool" ,intltool)
118 ("pkg-config" ,pkg-config)))
119 (synopsis "LXDE GTK+ theme switcher")
120 (description "LXAppearance is a desktop-independent GTK+ theme switcher
121 able to change themes, icons, and fonts used by GTK+ applications.")
122 (home-page "https://lxde.org")
123 (license license:gpl2+)))
125 (define-public lxrandr
131 (uri (string-append "mirror://sourceforge/lxde/LXRandR"
132 "%20%28monitor%20config%20tool%29/LXRandR%20"
133 (version-major+minor version) ".x/"
134 name "-" version ".tar.xz"))
137 "0khqi42paqg82jllb2kza4arf3fafzgq90fhyr3rw3d9hn23763d"))))
138 (build-system gnu-build-system)
139 (inputs `(("gtk+" ,gtk+-2)))
140 (native-inputs `(("intltool" ,intltool)
141 ("pkg-config" ,pkg-config)))
142 (synopsis "LXDE monitor configuration tool")
143 (description "LXRandR is a very basic monitor configuration tool. It
144 relies on the X11 resize-and-rotate (RandR) extension but doesn't aim to be a
145 full frontend of it. LXRandR only gives you some easy and quick options which
146 are intuitive. It's suitable for laptop users who frequently uses projectors
147 or external monitor.")
148 (home-page "https://lxde.org")
149 (license license:gpl2+)))
151 (define-public lxtask
157 (uri (string-append "mirror://sourceforge/lxde/LXTask"
158 "%20%28task%20manager%29/LXTask%20"
159 (version-major+minor version) ".x/"
160 "lxtask-" version ".tar.xz"))
163 "0cv4hx5dg01hbyi5p10pl78n0a40xajpq4wx9c7886pkmpq8isj1"))))
164 (build-system gnu-build-system)
165 (inputs `(("gtk+" ,gtk+-2)))
166 (native-inputs `(("intltool" ,intltool)
167 ("pkg-config" ,pkg-config)))
168 (synopsis "LXDE task manager")
169 (description "LXTask is a lightweight task manager derived from Xfce task
170 manager with all dependencies on Xfce removed. LXTask is based on the GTK+
171 toolkit. It allows users to monitor and control of running processes.")
172 (home-page "https://lxde.org")
173 (license license:gpl2+)))
175 (define-public lxterminal
181 (uri (string-append "mirror://sourceforge/lxde/LXTerminal"
182 "%20%28terminal%20emulator%29/LXTerminal%20"
183 version "/" name "-" version ".tar.xz"))
186 "1124pghrhnx6q4391ri8nvi6bsmvbj1dx81an08mird8jf2b2rii"))))
187 (build-system gnu-build-system)
188 (inputs `(("gtk+" ,gtk+-2)
189 ("vte" ,vte/gtk+-2)))
190 (native-inputs `(("intltool" ,intltool)
191 ("pkg-config" ,pkg-config)))
192 (synopsis "LXDE terminal emulator")
193 (description "LXTerminal is a VTE-based terminal emulator. It supports
194 multiple tabs and has only minimal dependencies thus being completely
195 desktop-independent. In order to reduce memory usage and increase the
196 performance, all instances of the terminal are sharing a single process.")
197 (home-page "https://lxde.org")
198 (license license:gpl2+)))
200 (define-public menu-cache
206 (uri (string-append "mirror://sourceforge/lxde/" name "/"
207 (version-major+minor version) "/"
208 name "-" version ".tar.xz"))
211 "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd"))))
212 (build-system gnu-build-system)
213 (inputs `(("glib" ,glib)
214 ("libfm" ,libfm-extra)))
215 (native-inputs `(("pkg-config" ,pkg-config)))
216 (synopsis "LXDE implementation of the freedesktop menu's cache")
217 (description "Menu-cache is a library creating and utilizing caches to
218 speed up the access to freedesktop.org defined application menus.")
219 (home-page "https://lxde.org")
220 (license license:lgpl2.1+)))
222 (define-public pcmanfm
228 (uri (string-append "mirror://sourceforge/pcmanfm/"
229 "PCManFM%20%2B%20Libfm%20%28tarball%20release"
230 "%29/PCManFM/pcmanfm-" version ".tar.xz"))
233 "0mb8hg76x1z0szdyl0w7jpz0bdblc6a29is1vvnh79z37qxh8138"))))
234 (build-system gnu-build-system)
235 (inputs `(("gtk+" ,gtk+-2)
236 ("gvfs" ,gvfs) ; for trash and mount support
239 (native-inputs `(("intltool" ,intltool)
241 ("pkg-config" ,pkg-config)))
243 `(("lxmenu-data" ,lxmenu-data))) ; for "Open With..." application list
244 (synopsis "LXDE file manager")
245 (description "PCMan is a lightweight GTK+ based file manager, compliant
246 with freedesktop.org standard.")
247 (home-page "https://lxde.org")
248 (license license:gpl2+)))
250 (define-public spacefm
251 ;; SpaceFM is based on PCManFM.
260 (url "https://github.com/IgnorantGuru/spacefm.git")
262 (file-name (git-file-name name version))
264 (base32 "193mdcv73cfc2bnm4bzmnf1wmkzgj1ya64y0lgyxn3ww36ghcsx9"))
265 (modules '((guix build utils)))
268 (substitute* "src/main.c"
269 (("#include <sys/types\\.h>" all)
270 ;; Add missing include for 'major' and 'minor' with glibc
272 (string-append all "\n"
273 "#include <sys/sysmacros.h>\n")))
275 (build-system glib-or-gtk-build-system)
277 `(("desktop-file-utils" ,desktop-file-utils)
278 ("glib:bin" ,glib "bin")
279 ("gtk+:bin" ,gtk+ "bin")
280 ("intltool" ,intltool)
281 ("pkg-config" ,pkg-config)))
284 ("btrfs-progs" ,btrfs-progs)
286 ("coreutils" ,coreutils)
287 ("curlftpfs" ,curlftpfs)
288 ("e2fsprogs" ,e2fsprogs)
290 ("fakeroot" ,fakeroot)
291 ("ffmpegthumbnailer" ,ffmpegthumbnailer)
292 ("fsarchiver" ,fsarchiver)
295 ("gphotofs" ,gphotofs)
305 ("shared-mime-info" ,shared-mime-info)
306 ("startup-notification" ,startup-notification)
308 ("util-linux" ,util-linux)
312 (modify-phases %standard-phases
313 (add-after 'unpack 'patch-bin-dirs
314 (lambda* (#:key inputs #:allow-other-keys)
315 (let* ((bash (assoc-ref inputs "bash"))
316 (coreutils (assoc-ref inputs "coreutils"))
317 (util-linux (assoc-ref inputs "util-linux"))
318 (procps (assoc-ref inputs "procps"))
319 (e2fsprogs (assoc-ref inputs "e2fsprogs"))
320 (btrfs-progs (assoc-ref inputs "btrfs-progs"))
321 (ntfs-3g (assoc-ref inputs "ntfs-3g"))
322 (lsof (assoc-ref inputs "lsof"))
323 (fsarchiver (assoc-ref inputs "fsarchiver"))
324 (ktsuss (assoc-ref inputs "ktsuss")))
325 (with-directory-excursion "src"
326 (substitute* '("ptk/ptk-file-task.c" "ptk/ptk-handler.h"
327 "ptk/ptk-location-view.c" "spacefm-auth"
328 "spacefm-auth.bash" "vfs/vfs-file-task.c"
329 "settings.c" "../data/ui/prefdlg.ui"
330 "../data/ui/prefdlg2.ui")
331 (("/bin/sh" file) (string-append bash file))
332 (("/bin/bash" file) (string-append bash file))
333 (("/bin/kill" file) (string-append coreutils file))
334 (("/bin/ls" file) (string-append coreutils file))
335 (("/usr(/bin/sha256sum)" _ file) (string-append coreutils file))
336 (("/usr(/bin/sha512sum)" _ file) (string-append coreutils file))
337 (("/sbin/fsck" file) (string-append util-linux file))
338 (("/sbin/mkfs" file) (string-append util-linux file))
339 (("/sbin/mkswap" file) (string-append util-linux file))
340 (("/bin/ps" file) (string-append procps file))
341 (("/sbin/tune2fs" file) (string-append e2fsprogs file))
342 (("/sbin/btrfs") (string-append btrfs-progs "/bin/btrfs"))
343 (("/sbin/ntfslabel" file) (string-append ntfs-3g file))
344 (("/usr(/bin/lsof)" _ file) (string-append lsof file))
345 (("(/usr)?/(sbin|bin)/fsarchiver") (string-append fsarchiver
347 (("/usr(/bin/ktsuss)" _ file) (string-append ktsuss file))))
349 (add-after 'patch-bin-dirs 'patch-share-dirs
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let* ((out (assoc-ref outputs "out"))
352 (share (string-append out "/share")))
353 (with-directory-excursion "src"
354 (substitute* '("main-window.c" "settings.c"
355 "ptk/ptk-app-chooser.c")
356 (("/usr(/local)?/share") share)))
358 (add-after 'patch-share-dirs 'patch-mime-dirs
359 (lambda* (#:key inputs #:allow-other-keys)
360 (let* ((mime (string-append (assoc-ref inputs "shared-mime-info")
362 (with-directory-excursion "src"
363 (substitute* '("mime-type/mime-type.c" "ptk/ptk-file-menu.c")
364 (("/usr(/local)?/share/mime") mime)))
366 (add-after 'patch-mime-dirs 'patch-setuid-progs
368 (let* ((su "/run/setuid-programs/su")
369 (mount "/run/setuid-programs/mount")
370 (umount "/run/setuid-programs/umount")
371 (udevil "/run/setuid-programs/udevil"))
372 (with-directory-excursion "src"
373 (substitute* '("settings.c" "settings.h" "vfs/vfs-file-task.c"
374 "vfs/vfs-volume-hal.c" "../data/ui/prefdlg.ui"
375 "../data/ui/prefdlg2.ui")
376 (("(/usr)?/bin/su") su)
377 (("/(bin|sbin)/mount") mount)
378 (("/(bin|sbin)/umount") umount)
379 (("/usr/bin/udevil") udevil)))
381 (add-after 'patch-setuid-progs 'patch-spacefm-conf
382 (lambda* (#:key inputs #:allow-other-keys)
383 (substitute* "etc/spacefm.conf"
384 (("#terminal_su=/bin/su")
385 "terminal_su=/run/setuid-programs/su")
386 (("#graphical_su=/usr/bin/gksu")
387 (string-append "graphical_su="
388 (string-append (assoc-ref inputs "ktsuss")
391 #:configure-flags (list
392 (string-append "--with-preferable-sudo="
393 (assoc-ref %build-inputs "ktsuss")
395 (string-append "--with-bash-path="
396 (assoc-ref %build-inputs "bash")
398 (string-append "--sysconfdir="
399 (assoc-ref %outputs "out")
401 (home-page "https://ignorantguru.github.io/spacefm/")
402 (synopsis "Multi-panel tabbed file manager")
403 (description "SpaceFM is a graphical, multi-panel, tabbed file manager
404 based on PCManFM with built-in virtual file system, udev-based device manager,
405 customizable menu system, and Bash integration.")
407 ;; The combination is GPLv3+ but src/exo is under LGPLv3+.
408 (license license:gpl3+)))
410 (define-public lxmenu-data
417 (uri (string-append "https://downloads.sourceforge.net/lxde/"
418 name "-" version ".tar.xz"))
421 "1f5sh2dvb3pdnjlcsyzq9543ck2jsqizkx3204cr22zm5s6j3qwz"))))
422 (build-system gnu-build-system)
424 `(("pkg-config" ,pkg-config)
425 ("intltool" ,intltool)))
426 (synopsis "Freedesktop.org desktop menus for LXDE")
428 "Lxmenu-data provides files required to build freedesktop.org
429 menu spec-compliant desktop menus for LXDE.")
430 (home-page "https://lxde.org")
431 (license license:lgpl2.1+)))
433 (define-public lxde-icon-theme
435 (name "lxde-icon-theme")
440 (uri (string-append "https://downloads.sourceforge.net/lxde/"
441 name "-" version ".tar.xz"))
444 "0v4i6x86fr2hbx4fb2si7y2qzmj7h6hcjwaifnin18r8kwwvgl73"))))
445 (build-system gnu-build-system)
447 `(("pkg-config" ,pkg-config)))
448 (synopsis "LXDE default icon theme based on nuoveXT2")
450 "Lxde-icon-theme provides an default icon theme for LXDE.")
451 (home-page "https://lxde.org")
452 (license license:lgpl3)))
454 (define-public lxde-common
461 (uri (string-append "https://downloads.sourceforge.net/lxde/"
462 name "-" version ".tar.xz"))
465 "0mj84fa3f4ak1jjslrwc2q3ci9zxrxpciggviza9bjb0168brn8w"))))
466 (build-system gnu-build-system)
468 '(#:phases (modify-phases %standard-phases
469 (add-before 'configure 'set-lxsession
470 (lambda* (#:key inputs #:allow-other-keys)
471 ;; Set the right file name for 'lxsession'.
472 (let ((lxsession (assoc-ref inputs "lxsession")))
473 (substitute* "startlxde.in"
474 (("^exec .*/bin/lxsession")
475 (string-append "exec " lxsession
479 `(("pkg-config" ,pkg-config)
480 ("intltool" ,intltool)
481 ("lxmenu-data" ,lxmenu-data)
482 ("lxde-icon-theme" ,lxde-icon-theme)))
484 `(("lxsession" ,lxsession)
485 ;; ("lxlock" ,lxlock) ;for 'lxde-screenlock.desktop'
487 (synopsis "Common files of the LXDE Desktop")
489 "Lxde-common provides common files of the LXDE Desktop.")
490 (home-page "https://lxde.org")
491 (license license:gpl2+)))
493 (define-public lxinput
500 (uri (string-append "https://downloads.sourceforge.net/lxde/"
501 name "-" version ".tar.xz"))
504 "123f3yn4rp1w5b3n5aj3ad9snkxab29qkrs7bcvf5bx4cn57g3sf"))))
505 (build-system gnu-build-system)
507 `(("gtk+-2" ,gtk+-2)))
509 `(("pkg-config" ,pkg-config)
510 ("intltool" ,intltool)))
511 (synopsis "Tool for mouse and keyboard configuration in LXDE")
513 "Lxinput provides a small program to configure keyboard and mouse
515 (home-page "https://lxde.org")
516 (license license:gpl2+)))
518 (define-public lxsession
525 (uri (string-append "https://downloads.sourceforge.net/lxde/"
526 name "-" version ".tar.xz"))
527 (patches (search-patches "lxsession-use-gapplication.patch"))
530 "1a0zmyywwzdh59nc0l94cir18vhp633z4q2xfhn5zx11ajj45gwh"))
531 (modules '((guix build utils)))
533 ;; Remove C files generated by Vala so we can build from source.
536 (string-append (string-drop-right file 2)
540 (and (string-suffix? ".c" file)
541 (file-exists? (c->vala file))))))
542 (for-each delete-file
543 (find-files "." generated-c-file?))
545 (build-system gnu-build-system)
548 (modify-phases %standard-phases
549 (add-after 'unpack 'rm-stamp
551 (for-each delete-file (find-files "." "\\.stamp$"))
552 ;; Force regeneration of configure script.
553 (delete-file "configure")
559 `(("pkg-config" ,pkg-config)
560 ("intltool" ,intltool)
561 ("docbook-xsl" ,docbook-xsl)
563 ("autoconf" ,autoconf)
564 ("automake" ,automake)))
565 (synopsis "Lightweight X11 session manager")
567 "Lxsession provides an lightweight X11 session manager.")
568 (home-page "https://lxde.org")
569 (license license:gpl2+)))
571 (define-public lxpanel
578 (uri (string-append "https://downloads.sourceforge.net/lxde/"
579 name "-" version ".tar.xz"))
582 "1ccgv7jgl3y865cpb6w7baaz7468fxncm83bqxlwyni5bwhglb1l"))))
583 (build-system gnu-build-system)
586 (modify-phases %standard-phases
587 (add-after 'install 'wrap
588 (lambda* (#:key inputs outputs #:allow-other-keys)
589 (let ((out (assoc-ref outputs "out"))
590 (menu (assoc-ref inputs "lxmenu-data")))
591 (wrap-program (string-append out "/bin/lxpanel")
592 `("XDG_DATA_DIRS" ":" prefix
593 (,(string-append menu "/share"))))
596 ;; TODO: libindicator-0.3.0
598 ("alsa-lib" ,alsa-lib)
599 ("libwnck-2" ,libwnck-2)
600 ("keybinder" ,keybinder)
606 ("wireless-tools" ,wireless-tools)))
608 `(("pkg-config" ,pkg-config)
609 ("intltool" ,intltool)
610 ("docbook-xml" ,docbook-xml)
611 ("gettext-minimal" ,gettext-minimal)))
613 `(("lxmenu-data" ,lxmenu-data)
615 ("menu-cache" ,menu-cache)))
616 (synopsis "X11 Desktop panel for LXDE")
618 "Lxpanel provides an X11 desktop panel for LXDE.")
619 (home-page "https://lxde.org")
620 (license license:gpl2+)))
625 (version (package-version lxde-common))
627 (build-system trivial-build-system)
628 (arguments '(#:builder (begin (mkdir %output) #t)))
631 ;; lxshortcut, lxsession-edit
632 ;; lxappearance-obconf
633 `(("menu-cache" ,menu-cache)
634 ("gpicview" ,gpicview)
636 ("lxappearance" ,lxappearance)
637 ("lxde-icon-theme" ,lxde-icon-theme)
638 ("lxde-common" ,lxde-common)
639 ("lxmenu-data" ,lxmenu-data)
642 ("lxsession" ,lxsession)
644 ("libfm-extra" ,libfm-extra)
646 ("lxterminal" ,lxterminal)
650 (synopsis "Lightweight X11 Desktop Environment")
652 "LXDE, which stands for Lightweight X11 Desktop Environment, is a
653 desktop environment which is lightweight and fast. It is designed to be
654 user friendly and slim, while keeping the resource usage low. LXDE uses
655 less RAM and less CPU while being a feature rich desktop environment. Unlike
656 other tightly integrated desktops LXDE strives to be modular, so each
657 component can be used independently with few dependencies.")
658 (home-page "https://lxde.org")
659 (license license:gpl2+))) ; And others.
661 ;;; lxde.scm ends here