summaryrefslogtreecommitdiff
path: root/px/packages/user-services.scm
blob: 76308b724f8a3f6048ed9b4cc99b7dc992072b4f (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
(define-module (px packages user-services)
  #:use-module (guix packages)
  #:use-module (guix build-system trivial)
  #:use-module (guix download)
  #:use-module (guix utils)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages guile-xyz)
  #:use-module (gnu packages syncthing)
  #:use-module (gnu packages sync)
  #:use-module (px packages accounts)
  #:use-module (px packages contacts-calendar)
  #:use-module (px packages desktop-tools)
  #:use-module (px packages events)
  #:use-module (px packages hub)
  #:use-module (px packages mastodon)
  #:use-module (px packages secret)
  #:use-module (px packages time-tracking)
  #:use-module (px packages settings)
  #:use-module ((guix licenses)
                #:prefix license:))

(define-public px-user-services
  (package
    (name "px-user-services")
    (version "2.0.6")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://source.pantherx.org/" name "_v" version
                           ".tgz"))
       (sha256
        (base32 "0mrqdgcm7z20inf6qrq8agliidn13327gihjassqdlcr9k7fkq1y"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let* ((out (assoc-ref %outputs "out"))
                          (src (assoc-ref %build-inputs "source")))
                     (setenv "PATH"
                             (string-append (assoc-ref %build-inputs "tar")
                                            "/bin"
                                            ":"
                                            (assoc-ref %build-inputs "gzip")
                                            "/bin"
                                            ":"))
                     (invoke "tar" "xvf" src)
                     (chdir ,name)
                     (mkdir-p (string-append out "/etc/xdg/autostart"))
                     (copy-recursively "etc/xdg/autostart"
                                       (string-append out "/etc/xdg/autostart"))
                     (mkdir-p (string-append out "/etc/px/services"))
                     (copy-recursively "etc/px/services"
                                       (string-append out "/etc/px/services"))
                     (substitute* (string-append out
                                   "/etc/xdg/autostart/user-services.desktop")
                       (("Exec=/etc/px/services/start.sh")
                        (string-append "Exec=" out "/etc/px/services/start.sh")))
                     #t))))
    (native-inputs `(("tar" ,tar)
                     ("gzip" ,gzip)))
    (propagated-inputs `(;; ("px-secret-service"    ,px-secret-service)
                         
                         ;; ("px-events-service"    ,px-events-service)
                         ;; ("px-accounts-service"  ,px-accounts-service)
                         ;; ("px-contacts-calendar" ,px-contacts-calendar)
                         ;; ("px-settings-service"  ,px-settings-service)
                         ;; ("px-mastodon-service"  ,px-mastodon-service)
                         ;; ("px-hub-service"       ,px-hub-service)
                         ;; ("px-time-tracking"     ,px-time-tracking)
                         ("mcron" ,mcron)
                         ("syncthing" ,syncthing)
                         ("syncthingtray" ,syncthingtray)))
    (home-page "https://www.pantherx.org/")
    (synopsis "PantherX user services execution package")
    (description "Run user-level services for PantherX desktop")
    (license license:expat)))

(define-public px-user-services-gtk
  (package
    (name "px-user-services")
    (version "2.0.6")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://source.pantherx.org/" name "_v" version
                           ".tgz"))
       (sha256
        (base32 "0mrqdgcm7z20inf6qrq8agliidn13327gihjassqdlcr9k7fkq1y"))))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder (begin
                   (use-modules (guix build utils))
                   (let* ((out (assoc-ref %outputs "out"))
                          (src (assoc-ref %build-inputs "source")))
                     (setenv "PATH"
                             (string-append (assoc-ref %build-inputs "tar")
                                            "/bin"
                                            ":"
                                            (assoc-ref %build-inputs "gzip")
                                            "/bin"
                                            ":"))
                     (invoke "tar" "xvf" src)
                     (chdir ,name)
                     (mkdir-p (string-append out "/etc/xdg/autostart"))
                     (copy-recursively "etc/xdg/autostart"
                                       (string-append out "/etc/xdg/autostart"))
                     (mkdir-p (string-append out "/etc/px/services"))
                     (copy-recursively "etc/px/services"
                                       (string-append out "/etc/px/services"))
                     (substitute* (string-append out
                                   "/etc/xdg/autostart/user-services.desktop")
                       (("Exec=/etc/px/services/start.sh")
                        (string-append "Exec=" out "/etc/px/services/start.sh")))
                     #t))))
    (native-inputs `(("tar" ,tar)
                     ("gzip" ,gzip)))
    (propagated-inputs `(;; ("px-secret-service"    ,px-secret-service)
                         
                         ;; ("px-events-service"    ,px-events-service)
                         ;; ("px-accounts-service"  ,px-accounts-service)
                         ;; ("px-contacts-calendar" ,px-contacts-calendar)
                         ;; ("px-settings-service"  ,px-settings-service)
                         ;; ("px-mastodon-service"  ,px-mastodon-service)
                         ;; ("px-hub-service"       ,px-hub-service)
                         ;; ("px-time-tracking"     ,px-time-tracking)
                         ("mcron" ,mcron)
                         ("syncthing" ,syncthing)))
    (home-page "https://www.pantherx.org/")
    (synopsis "PantherX user services execution package")
    (description "Run user-level services for PantherX desktop")
    (license license:expat)))