summaryrefslogtreecommitdiffstats
path: root/devops.scm
blob: 0068ee7f5ca32be558544b8259402f31ff236349 (plain) (blame)
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
(define-module (devops)
               #:use-module ((guix licenses) #:prefix license:)
               #:use-module (guix build-system go)
               #:use-module (guix build utils) 
               #:use-module (guix packages)
               #:use-module (gnu packages)
               #:use-module (guix git-download)
               #:use-module (gnu packages golang)
               #:use-module (gnu packages golang-build)
               #:use-module (gnu packages golang-xyz)
               )

(define-public morph
               (package
                 (name "morph")
                 (version "1.8.0")
                 (source
                   (origin
                     (method git-fetch)
                     (uri (git-reference
                            (url "https://github.com/DBCDK/morph")
                            (commit (string-append "v" version))))
                     (file-name (git-file-name name version))
                     (sha256
                       (base32 "0kwpp8imn6a3wzb81mpx1pvgcpfyylgjz861w7vssjkk95bav992"))
                     (patches (search-patches "aux-files/morph/fix-kingpin-path.patch"))
                     ))
                 (build-system go-build-system)
                 (arguments
                   (list
                     #:go go-1.24
                     #:tests? #f
                     #:import-path "github.com/DBCDK/morph"))
                 (propagated-inputs (list go-golang-org-x-crypto go-github-com-gobwas-glob
                                          go-github-com-alecthomas-kingpin-v2-morphified
                                          go-github-com-mattes-go-expand-tilde
                                          go-github-com-alecthomas-template
                                          ))
                 (home-page "https://github.com/DBCDK/morph")
                 (synopsis "morph")
                 (description
                   "Morph is a tool for managing existing @code{NixOS} hosts - basically a fancy
                   wrapper around @@code{nix-build}, @@code{nix copy}, @@code{nix-env},
                   @@code{/nix/store/.../bin/switch-to-configuration}, @@code{scp} and more.  Morph
                   supports updating multiple hosts in a row, and with support for health checks
                   makes it fairly safe to do so.")
                   (license license:expat)))

(define-public go-github-com-alecthomas-kingpin-v2-morphified
               (package
                 (inherit go-github-com-alecthomas-kingpin-v2)
                 (name "go-github-com-alecthomas-kingpin-v2-morphified")
                 (version "8554767bc91254c59c7297a99e9867c770e4eadb")
                 (arguments
                   (list
                     #:go go-1.24
                     #:tests? #f
                     #:import-path "github.com/alecthomas/kingpin/v2"))
                 (source
                   (origin
                     (method git-fetch)
                     (uri (git-reference
                            (url "https://github.com/DBCDK/kingpin")
                            (commit version)))
                     (file-name (git-file-name name version))
                     (sha256
                       (base32 "05hfpgylv5mfnjz2mdd3jl8p3psmczvdbs4ydf9xvvc17c9mlrpq"))))
                 (inputs (modify-inputs (package-inputs go-github-com-alecthomas-kingpin-v2)
                                        (prepend go-github-com-mattes-go-expand-tilde go-github-com-alecthomas-template)))
                 ))


(define-public go-github-com-alecthomas-template
               (package
                 (name "go-github-com-alecthomas-template")
                 (version "0.0.0-20190718012654-fb15b899a751")
                 (source
                   (origin
                     (method git-fetch)
                     (uri (git-reference
                            (url "https://github.com/alecthomas/template")
                            (commit (go-version->git-ref version))))
                     (file-name (git-file-name name version))
                     (sha256
                       (base32 "1vlasv4dgycydh5wx6jdcvz40zdv90zz1h7836z7lhsi2ymvii26"))))
                 (build-system go-build-system)
                 (arguments
                   (list
                     #:tests? #f
                     #:go go-1.24
                     #:import-path "github.com/alecthomas/template"))
                 (home-page "https://github.com/alecthomas/template")
                 (synopsis "Go's")
                 (description
                   "Package template implements data-driven templates for generating textual output.")
                 (license license:bsd-3)))

(define-public go-github-com-mattes-go-expand-tilde
               (package
                 (name "go-github-com-mattes-go-expand-tilde")
                 (version "1")
                 (source
                   (origin
                     (method git-fetch)
                     (uri (git-reference
                            (url "https://github.com/mattes/go-expand-tilde")
                            (commit (string-append "v" version))))
                     (file-name (git-file-name name version))
                     (sha256
                       (base32 "06xrp05njwam4sn031fkmd4gym5wfsw5q0v24nqhs4883lsx9dwq"))))
                 (build-system go-build-system)
                 (arguments
                   (list
                     #:go go-1.24
                     #:import-path "gopkg.in/mattes/go-expand-tilde.v1"))
                 (home-page "https://github.com/mattes/go-expand-tilde")
                 (synopsis #f)
                 (description #f)
                 (license #f)))