summaryrefslogtreecommitdiff
path: root/tw/packages/ci.scm
blob: 2de79e756a9b78f6296dcad72bd3f12c6fc2b7e4 (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
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
(define-module (tw packages ci)
  #:use-module (gnu packages base)
  #:use-module (gnu packages elf)
  #:use-module (guix build-system copy)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix modules)
  #:use-module (guix packages)
  #:use-module (guix utils))

(define-public (hashicorp-arch)
  (cond
   ((target-x86-64?) "amd64")
   ((target-x86-32?) "386")
   ((target-arm32?) "arm")
   ((target-aarch64?) "arm64")))

(define-public (hashicorp-download-url name version)
  (string-append "https://releases.hashicorp.com/" name "/" version "/"
                 name "_" version "_linux_" (hashicorp-arch) ".zip"))

(define-public hashicorp-packer-bin
  (package
    (name "hashicorp-packer")
    (version "1.9.5")
    (source
     (origin
       (method url-fetch/zipbomb)
       (uri (hashicorp-download-url "packer" version))
       (sha256 (base32 "172axa66vm502yzm3rkf9blbcg93fb9ampmkqa1naq3di9jp50kg"))))
    (build-system copy-build-system)
    (arguments '(#:install-plan '(("packer" "bin/"))))
    (home-page "https://packer.io/")
    (synopsis "Build automated machine images")
    (description "Hashicorp Packer is a tool for creating identical machine
images for multiple platforms from a single source configuration.")
    (license license:mpl2.0)))

(define-public hashicorp-consul-bin
  (package
    (name "hashicorp-consul")
    (version "1.17.0")
    (source
     (origin
       (method url-fetch/zipbomb)
       (uri (hashicorp-download-url "consul" version))
       (sha256 (base32 "0gp2jzzg4s8lhqfkl03vhlrrrs0vb9vfk7ql2k9p5z6x0lx6rfsg"))))
    (build-system copy-build-system)
    (arguments '(#:install-plan '(("consul" "bin/"))))
    (home-page "https://consul.io/")
    (synopsis "Datacenter service mesh tool")
    (description "Consul is a distributed, highly available, and data center
aware solution to connect and configure applications across dynamic,
distributed infrastructure.")
    (license license:mpl2.0)))

(define-public hashicorp-vault-bin
  (package
    (name "hashicorp-vault")
    (version "1.15.2")
    (source
     (origin
       (method url-fetch/zipbomb)
       (uri (hashicorp-download-url "vault" version))
       (sha256 (base32 "1576n8kn16bx81k1dim1qmpimpcnxjskclbsllxp24n27fa2022s"))))
    (build-system copy-build-system)
    (arguments '(#:install-plan '(("vault" "bin/"))))
    (home-page "https://vaultproject.io/")
    (synopsis "Secrets management, encryption as a service, and privileged
access management")
    (description "Vault is a tool for securely accessing secrets.  A secret is
anything that you want to tightly control access to, such as API keys,
passwords, certificates, and more.  Vault provides a unified interface to any
secret, while providing tight access control and recording a detailed audit
log.")
    (license license:mpl2.0)))

(define-public hashicorp-nomad-bin
  (package
    (name "hashicorp-nomad")
    (version "1.6.3")
    (source
     (origin
       (method url-fetch/zipbomb)
       (uri (hashicorp-download-url "nomad" version))
       (sha256 (base32 "1l7lnxdvkkhfjklqm2drwchnfmjb9y13xdwp9ddy5h6r60qghw8p"))))
    (build-system copy-build-system)
    (arguments
     `(#:install-plan '(("nomad" "bin/"))
       #:phases
       ,(with-imported-modules (source-module-closure
                                '((guix build utils)))
          #~(modify-phases %standard-phases
              (add-after 'unpack 'patch-interpreter
                ;; For some reason, the "nomad" binary has /lib64/ld-linux*.so
                ;; hardcoded, so fix that.
                (lambda* (#:key inputs #:allow-other-keys)
                  (use-modules (guix build utils))
                  (let ((patchelf
                         (search-input-file inputs "bin/patchelf"))
                        (ld-linux.so
                         ;; TODO: remove hardcoded linux-x86-64.
                         ;; (%current-target-system) is almost the right format...
                         (search-input-file inputs "lib/ld-linux-x86-64.so.2")))
                    (invoke patchelf "--set-interpreter" ld-linux.so "nomad"))))))))
    (inputs (list glibc))
    (native-inputs (list patchelf))
    (home-page "https://nomadproject.io/")
    (synopsis "A simple orchestrator to deploy and manage applications")
    (description "Nomad is an easy-to-use, flexible, and performant workload
orchestrator that can deploy a mix of microservice, batch, containerized, and
non-containerized applications.  Nomad is easy to operate and scale and has
native Consul and Vault integrations.")
    (license license:mpl2.0)))

(define-public hashicorp-levant-bin
  (package
    (name "hashicorp-levant")
    (version "0.3.3")
    (source
     (origin
       (method url-fetch/zipbomb)
       (uri (hashicorp-download-url "levant" version))
       (sha256 (base32 "0qnljbqhc3gj4d5lkc8s07w504yqvhc5x412pq2bkh7xk424q333"))))
    (build-system copy-build-system)
    (arguments
     `(#:install-plan '(("levant" "bin/"))))
    (home-page "https://github.com/hashicorp/levant")
    (synopsis "An open source templating and deployment tool for HashiCorp Nomad jobs")
    (description "Levant is an open source templating and deployment tool for
HashiCorp Nomad jobs that provides realtime feedback and detailed failure
messages upon deployment issues.")
    (license license:mpl2.0)))