;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016, 2017 Thomas Danckaert ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages kde) #:use-module (guix build-system cmake) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (
aboutsummaryrefslogtreecommitdiff
blob: 2a221790d2f74fe05489fce7802fde9968fa71c6 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu installer newt services)
  #:use-module (gnu installer services)
  #:use-module (gnu installer steps)
  #:use-module (gnu installer newt page)
  #:use-module (gnu installer newt utils)
  #:use-module (guix i18n)
  #:use-module (srfi srfi-34)
  #:use-module (srfi srfi-35)
  #:use-module (newt)
  #:export (run-services-page))

(define (run-desktop-environments-cbt-page)
  "Run a page allowing the user to choose between various desktop
environments."
  (run-checkbox-tree-page
   #:info-text (G_ "Please select the desktop(s) environment(s) you wish to \
install. If you select multiple desktops environments, you will be able to \
choose the one to use on the log-in screen.")
   #:title (G_ "Desktop environment")
   #:items (filter desktop-system-service? %system-services)
   #:item->text system-service-name               ;no i18n for DE names
   #:checkbox-tree-height 5
   #:exit-button-callback-procedure
   (lambda ()
     (raise
      (condition
       (&installer-step-abort))))))

(define (run-networking-cbt-page)
  "Run a page allowing the user to select networking services."
  (run-checkbox-tree-page
   #:info-text (G_ "You can now select networking services to run on your \
system.")
   #:title (G_ "Network service")
   #:items (filter (lambda (service)
                     (eq? 'networking (system-service-type service)))
                   %system-services)
   #:item->text (compose G_ system-service-name)
   #:checkbox-tree-height 5
   #:exit-button-callback-procedure
   (lambda ()
     (raise
      (condition
       (&installer-step-abort))))))

(define (run-network-management-page)
  "Run a page to select among several network management methods."
  (let ((title (G_ "Network management")))
    (run-listbox-selection-page
     #:title title
     #:info-text (G_ "Choose the method to manage network connections.

We recommend NetworkManager or Connman for a WiFi-capable laptop; the DHCP \
client may be enough for a server.")
     #:info-textbox-width 70
     #:listbox-items (filter (lambda (service)
                               (eq? 'network-management
                                    (system-service-type service)))
                             %system-services)
     #:listbox-item->text (compose G_ system-service-name)
     #:sort-listbox-items? #f
     #:button-text (G_ "Exit")
     #:button-callback-procedure
     (lambda _
       (raise
        (condition
         (&installer-step-abort)))))))

(define (run-services-page)
  (let ((desktop (run-desktop-environments-cbt-page)))
    ;; When the user did not select any desktop services, and thus didn't get
    ;; '%desktop-services', offer network management services.
    (append desktop
            (run-networking-cbt-page)
            (if (null? desktop)
                (list (run-network-management-page))
                '()))))
"/libksysguard-" version ".tar.xz")) (sha256 (base32 "158n30wbpsgbw3axhhsc58hnwhwdd02j3zc9hhcybmnbkfl5c96l")))) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) ("pkg-config" ,pkg-config))) (inputs `(("kconfigwidgets" ,kconfigwidgets) ("kiconthemes" ,kiconthemes) ("kwindowsystem" ,kwindowsystem) ("ki18n" ,ki18n) ("kauth" ,kauth) ("kcompletion" ,kcompletion) ("kconfig" ,kconfig) ("kcoreaddons" ,kcoreaddons) ("kwidgetsaddons" ,kwidgetsaddons) ("kservice" ,kservice) ("qtbase" ,qtbase) ("qtscript" ,qtscript) ("qtwebkit" ,qtwebkit) ("qtx11extras" ,qtx11extras) ("plasma" ,plasma-framework) ("zlib" ,zlib))) (build-system cmake-build-system) (arguments `(#:configure-flags `(,(string-append "-DKDE_INSTALL_DATADIR=" (assoc-ref %outputs "out") "/share")) #:phases (modify-phases %standard-phases (add-before 'configure 'patch-cmakelists (lambda _ (substitute* "processcore/CMakeLists.txt" (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR")))) (replace 'check (lambda _ ;other tests require a display and therefore fail (zero? (system* "ctest" "-R" "chronotest"))))))) (home-page "https://www.kde.org/info/plasma-5.8.2.php") (synopsis "Network enabled task and system monitoring") (description "KSysGuard can obtain information on system load and manage running processes. It obtains this information by interacting with a ksysguardd daemon, which may also run on a remote system.") (license license:gpl3+))) (define-public qca (package (name "qca") (version "2.1.3") (source (origin (method url-fetch) (uri (string-append "http://download.kde.org/stable/qca/" version "/src/qca-" version ".tar.xz")) (sha256 (base32 "0lz3n652z208daxypdcxiybl0a9fnn6ida0q7fh5f42269mdhgq0")))) (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("openssl" ,openssl) ("qtbase" ,qtbase))) (home-page "https://userbase.kde.org/QCA") (synopsis "Libraries for the Qt Cryptographic Architecture") (description "The Qt Cryptographic Architecture (QCA) provides a straightforward and cross-platform API for a range of cryptographic features, including SSL/TLS, X.509 certificates, SASL, OpenPGP, S/MIME CMS, and smart cards.") (license license:lgpl2.1))) (define-public snorenotify (package (name "snorenotify") (version "0.7.0") (source (origin (method url-fetch) (uri (string-append "http://download.kde.org/stable/snorenotify/" version "/src/snorenotify-" version ".tar.xz")) (sha256 (base32 "0jz6ivk90h7iwgyxar7xzzj8yvzn6s1my6cqs9bdnwqswfk1nhbd")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; both tests fail, require display (inputs `(("extra-cmake-modules" ,extra-cmake-modules) ("qtbase" ,qtbase) ("qttools" ,qttools))) (home-page "https://techbase.kde.org/Projects/Snorenotify") (synopsis "Qt notification framework") (description "Snorenotify is a multi platform Qt notification framework. Using a plugin system it is possible to create notifications with many different notification systems.") (license license:lgpl3)))