aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/tutorial.scm
blob: bbe8575a6a7dfd834102ca09eb8974df7711d9ba (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
(use-modules (gnu)
             (gnu packages autotools)
             (gnu packages gawk)
             (gnu packages guile)
             (gnu packages pkg-config)
             (gnu packages version-control)
             (gnu services ci)
             (forge forge)
             (forge laminar)
             (forge utils))

(define guile-json-tests
  (with-imported-modules '((guix build utils))
    (with-packages (list autoconf automake coreutils
                         gawk git-minimal gnu-make grep
                         guile-3.0 sed pkg-config)
      #~(begin
          (use-modules (guix build utils))
          (invoke "git" "clone" "/srv/git/guile-json" ".")
          (invoke "autoreconf" "--verbose" "--install" "--force")
          (invoke "./configure")
          (invoke "make")
          (invoke "make" "check")))))

(define guile-json-project
  (forge-project
   (name "guile-json")
   (user "vetri")
   (repository "/srv/git/guile-json")
   (description "JSON module for Guile")
   (ci-jobs (list (forge-laminar-job
                   (name "guile-json")
                   (run guile-json-tests))))))

(operating-system
  (host-name "tutorial")
  (timezone "UTC")
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)))
  (file-systems %base-file-systems)
  (users (cons* (user-account
                 (name "vetri")
                 (group "users")
                 (home-directory "/home/vetri"))
                %base-user-accounts))
  (packages %base-packages)
  (services (cons* (service forge-service-type
                            (forge-configuration
                             (projects (list guile-json-project))))
                   (service laminar-service-type
                            (laminar-configuration
                             (bind-http "localhost:8080")))
                   %base-services)))