unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 4e13d0171572041c8f3b479fe06af0e8a36d07f3 12240 bytes (raw)
name: gnu/packages/ci.scm 	 # note: path name is non-authoritative(*)

  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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2017, 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.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 packages ci)
  #:use-module ((guix licenses) #:prefix l:)
  #:use-module (gnu packages)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix download)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages boost)
  #:use-module (gnu packages check)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages guile-xyz)
  #:use-module (gnu packages gnupg)
  #:use-module (gnu packages mail)
  #:use-module (gnu packages package-management)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages perl-compression)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages serialization)
  #:use-module (gnu packages sqlite)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages web)
  #:use-module (gnu packages xml)
  #:use-module (guix build-system cmake)
  #:use-module (guix build-system gnu))

(define-public cuirass
  (let ((commit "6f4a203a0bb2d441d091d561c1735fbe2d170cf7")
        (revision "2"))
    (package
      (name "cuirass")
      (version (git-version "1.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32
           "120cnnjy4j2dinfmas1ddmqzzc7ikj9c76sl4li6g6dn8g7s8f69"))))
      (build-system gnu-build-system)
      (arguments
       '(#:modules ((guix build utils)
                    (guix build gnu-build-system)
                    (ice-9 rdelim)
                    (ice-9 popen))
         #:configure-flags '("--localstatedir=/var") ;for /var/log/cuirass
         #:parallel-tests? #f
         #:phases
         (modify-phases %standard-phases
           (add-before 'check 'set-PATH-for-tests
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((pg (assoc-ref inputs "ephemeralpg"))
                     (path (getenv "PATH")))
                 (setenv "PATH" (string-append pg "/bin:" path))
                 #t)))
           ;; Disable the remote tests that require a Guix daemon connection.
           (add-before 'check 'disable-remote-tests
             (lambda _
               (substitute* "Makefile.am"
                 (("tests/remote.scm") ""))
               #t))
           (add-after 'install 'wrap-program
             (lambda* (#:key inputs outputs #:allow-other-keys)
               ;; Wrap the 'cuirass' command to refer to the right modules.
               (let* ((out    (assoc-ref outputs "out"))
                      (avahi  (assoc-ref inputs "guile-avahi"))
                      (gcrypt (assoc-ref inputs "guile-gcrypt"))
                      (json   (assoc-ref inputs "guile-json"))
                      (zmq    (assoc-ref inputs "guile-simple-zmq"))
                      (squee  (assoc-ref inputs "guile-squee"))
                      (git    (assoc-ref inputs "guile-git"))
                      (bytes  (assoc-ref inputs "guile-bytestructures"))
                      (fibers (assoc-ref inputs "guile-fibers"))
                      (zlib   (assoc-ref inputs "guile-zlib"))
                      (matd   (assoc-ref inputs "guile-mastodon"))
                      (tls    (assoc-ref inputs "gnutls"))
                      (mail   (assoc-ref inputs "mailutils"))
                      (guix   (assoc-ref inputs "guix"))
                      (deps   (list avahi gcrypt json zmq squee git bytes
                                    fibers zlib matd tls mail guix))
                      (guile  (assoc-ref %build-inputs "guile"))
                      (effective
                       (read-line
                        (open-pipe* OPEN_READ
                                    (string-append guile "/bin/guile")
                                    "-c" "(display (effective-version))")))
                      (mods
                       (string-drop-right  ;drop trailing colon
                        (string-join deps
                                     (string-append "/share/guile/site/"
                                                    effective ":")
                                     'suffix)
                        1))
                      (objs
                       (string-drop-right
                        (string-join deps
                                     (string-append "/lib/guile/" effective
                                                    "/site-ccache:")
                                     'suffix)
                        1)))
                 ;; Make sure 'cuirass' can find the relevant Guile modules.
                 (wrap-program (string-append out "/bin/cuirass")
                   `("PATH" ":" prefix (,(string-append out "/bin")))
                   `("GUILE_LOAD_PATH" ":" prefix (,mods))
                   `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs)))
                 #t))))))
      (inputs
       `(("guile" ,guile-3.0/libgc-7)
         ("guile-avahi" ,guile-avahi)
         ("guile-fibers" ,guile-fibers)
         ("guile-gcrypt" ,guile-gcrypt)
         ("guile-json" ,guile-json-4)
         ("guile-simple-zmq" ,guile-simple-zmq)
         ("guile-squee" ,guile-squee)
         ("guile-git" ,guile-git)
         ("guile-zlib" ,guile-zlib)
         ("guile-mastodon" ,guile-mastodon)
         ("gnutls" ,gnutls)
         ("mailutils" ,mailutils)
         ;; FIXME: this is propagated by "guile-git", but it needs to be among
         ;; the inputs to add it to GUILE_LOAD_PATH.
         ("guile-bytestructures" ,guile-bytestructures)
         ("guix" ,guix)))
      (native-inputs
       `(("autoconf" ,autoconf)
         ("automake" ,automake)
         ("pkg-config" ,pkg-config)
         ("texinfo" ,texinfo)
         ("ephemeralpg" ,ephemeralpg)))
      (native-search-paths
       ;; For HTTPS access, Cuirass itself honors these variables, with the
       ;; same semantics as Git and OpenSSL (respectively).
       (list (search-path-specification
              (variable "GIT_SSL_CAINFO")
              (file-type 'regular)
              (separator #f)                      ;single entry
              (files '("etc/ssl/certs/ca-certificates.crt")))
             (search-path-specification
              (variable "SSL_CERT_DIR")
              (files '("etc/ssl/certs")))))
      (synopsis "Continuous integration system")
      (description
       "Cuirass is a continuous integration tool using GNU Guix.  It is
intended as a replacement for Hydra.")
      (home-page "https://www.gnu.org/software/guix/")
      (license l:gpl3+))))

(define-public laminar
  (package
    (name "laminar")
    (version "1.0")
    (source
     (origin (method url-fetch)
             (uri (string-append "https://github.com/ohwgiles/laminar/archive/"
                                 version
                                 ".tar.gz"))
             (file-name (string-append name "-" version ".tar.gz"))
             (sha256
              (base32
               "11m6h3rdmj2rsmsryy7r40gqccj4gg1cnqwy6blscs87gx4s423g"))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f                      ; TODO Can't build tests
       #:configure-flags
       (list "-DCMAKE_CXX_STANDARD=17"
             ;; "-DBUILD_TESTS=true" TODO: objcopy: js/stPskyUS: can't add
             ;; section '.note.GNU-stack': file format not recognized
             (string-append "-DLAMINAR_VERSION=" ,version))
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch-CMakeLists.txt
           (lambda _
             (substitute* "CMakeLists.txt"
               (("file\\(DOWNLOAD.*\n$")
                "# file download removed by Guix --")
               (("install\\(FILES etc/laminar.service DESTINATION \\$\\{SYSTEMD\\_UNITDIR\\}\\)")
                "")
               (("install\\(FILES \\$\\{CMAKE\\_CURRENT\\_BINARY\\_DIR\\}\\/laminar\\.service DESTINATION \\$\\{SYSTEMD\\_UNITDIR\\}\\)")
                "")
               (("install\\(FILES etc/laminar\\.conf DESTINATION \\/etc\\)") "")
               (("\\/usr\\/") ""))
             #t))
         (add-after 'configure 'copy-in-javascript-and-css
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (mkdir-p "../build/js")
             (for-each (lambda (file)
                         (copy-file
                          file
                          (string-append
                           "../build/js/" (strip-store-file-name file))))
                       (map (lambda (input)
                              (assoc-ref inputs input))
                            '("vue.min.js"
                              "vue-router.min.js"
                              "ansi_up.js"
                              "Chart.min.js")))
             #t)))))
    (inputs
     `(("capnproto" ,capnproto)
       ("rapidjson" ,rapidjson)
       ("sqlite" ,sqlite)
       ("boost" ,boost)
       ("zlib" ,zlib)))
    (native-inputs
     `(("googletest" ,googletest)

       ("vue.min.js"
        ,(origin (method url-fetch)
                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
                                     "vue/2.6.12/vue.min.js"))
                 (sha256
                  (base32
                   "01zklp5cyik65dfn64m8h2y2dxzgbyzgmbf99y7fwgnf0155r7pq"))))
       ("vue-router.min.js"
        ,(origin (method url-fetch)
                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
                                     "vue-router/3.4.8/vue-router.min.js"))
                 (sha256
                  (base32
                   "07gx7znb30rk1z7w6ca7dlfjp44q12bbq6jghwfm27mf6psa80as"))))
       ("ansi_up.js"
        ,(origin (method url-fetch)
                 (uri (string-append "https://raw.githubusercontent.com/"
                                     "drudru/ansi_up/v1.3.0/ansi_up.js"))
                 (sha256
                  (base32
                   "1993dywxqi2ylnxybwk7m0s0bg2bq7kfllpyr0s8ck6chd0p8i6r"))))
       ("Chart.min.js"
        ,(origin (method url-fetch)
                 (uri (string-append "https://cdnjs.cloudflare.com/ajax/libs/"
                                     "Chart.js/2.7.2/Chart.min.js"))
                 (sha256
                  (base32
                   "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9"))))))
    (synopsis "Lightweight Continuous Integration service")
    (description
     "Laminar is a lightweight and modular Continuous Integration service.  It
doesn't have a configuration web UI instead uses version-controllable
configuration files and scripts.

Laminar encourages the use of existing GNU/Linux tools such as bash and cron
instead of reinventing them.")
    (home-page "https://laminar.ohwg.net/")
    (license l:gpl3+)))

debug log:

solving 4e13d01715 ...
found 4e13d01715 in https://yhetil.org/guix-patches/20210325152612.15321-1-mail@cbaines.net/
found bafe997c82 in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 bafe997c82d7c88aeca60a348b2ef0c0e57c7d34	gnu/packages/ci.scm

applying [1/1] https://yhetil.org/guix-patches/20210325152612.15321-1-mail@cbaines.net/
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index bafe997c82..4e13d01715 100644

Checking patch gnu/packages/ci.scm...
Applied patch gnu/packages/ci.scm cleanly.

index at:
100644 4e13d0171572041c8f3b479fe06af0e8a36d07f3	gnu/packages/ci.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).