aboutsummaryrefslogtreecommitdiff
path: root/src/org/euandre/packages.scm
blob: b60911428f4ff26d304601f78d0bd54b96638214 (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
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
(define-module (org euandre packages)
  #:use-module ((guix licenses) #:prefix licenses:)
  #:use-module ((org euandre queue) #:prefix q:)
  #:use-module (gnu packages)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages texinfo)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix utils))



(define-public (pkg name version checksum)
  (package
    (name name)
    (version version)
    (source
      (origin
        (method url-fetch)
        (uri
          (string-append
           "https://euandre.org/git/" name "/snapshot/" name "-" version ".tar.xz"))
        (sha256
          (base32 checksum))))
    (build-system gnu-build-system)
    (arguments
      (list
       #:make-flags #~(list (string-append "PREFIX=" #$output))
       #:phases
       #~(modify-phases %standard-phases
           (delete 'configure))))
    (synopsis    #f) ;; FIXME: get
    (description #f) ;;        from tarball!
    (home-page (string-append "https://euandre.org/git/" name "/"))
    (license licenses:agpl3+)))


(define-public remembering
  (pkg
   "remembering"
   "22a7b4f0c8e018077984d58476a0c419b5e11942"
   "01wnq0vbl70dwxh19pqv258r9kd850kwi4nv1h4q4vmg5iiglhd1"))

(define-public eut
  (pkg
   "eut"
   "c5fbe36d5e71a94589039ad9bc422da543fddf01"
   "013aayqb64qvafvnpshwg30nndjv5gj69l5xs0li6xvjkhmpsvnw"))

(define-public cage
  (pkg
   "cage"
   "c0482531fc16a55715b759b695d27d555d927ab8"
   "0laan68dj3s1n2d2alcwpvhnjjc2483kyx5xl384rcwrn3s0kcyl"))

(define-public nicely
  (pkg
   "nicely"
   "6699e732f00d2a8d8c377527dc588824ba3cbece"
   "1j6s7z29m126mxgacqbk0g4lmk8ap526z716d70kbwadh91n1a5v"))

(define-public q
  (pkg
   "q"
   "5e8e65015a77ed7606c6cfbd2d1cedc79e42a6a5"
   "1dramr7p5ncbnna0v3ncaa77rm1c8vzxw5si4n6d3rr0ji2v48ac"))

(define-public syskeep
  (pkg
   "syskeep"
   "ff2fc08875db996c251a52f43c07fe93b7718fd6"
   "04d6fzycfv87gzsjaxlrkb3dgm4m2kqpx2ypjkbmyxq9qbqqd7m7"))

(define-public guile-heredoc
  (package
    (inherit
      (pkg
       "guile-heredoc"
       "065435cdce609604e33b879b9be3e81ab89f3e7b"
       "1y1110bg4ki0dvn8hggxy34wg7ig4r3377nc84isnj3dydqm2vjd"))
    (native-inputs
      (list
       guile-3.0
       texinfo))))



(define (format-inputs l)
  (map (lambda (p)
         (list (package-name p)
               p
               "out"))
       l))

(define (normalize-inputs l)
  (map (compose (lambda (l)
                  (cons (package-name (car l))
                        l))
                list
                specification->package+output
                symbol->string)
       l))

(define (gopkg name inputs version checksum)
  (package
    (inherit
      (pkg
       name
       version
       checksum))
    (source
      (origin
        (method url-fetch)
        (uri
          (string-append "https://papo.im/git/"
                         name
                         "/snapshot/"
                         name
                         "-"
                         version
                         ".tar.xz"))
        (sha256
          (base32 checksum))))
    (arguments
      (list
       #:strip-binaries? #f
       #:make-flags
       #~(list
          "-e"
          (string-append "PREFIX=" #$output)
          (string-append "VERSION=" #$version)
          (string-append "CC=" #$(cc-for-target)))
       #:phases
       #~(modify-phases %standard-phases
           (delete 'configure)
           (add-before 'build 'setenv-golang
             (lambda _
               (define (path->flags option)
                 (let ((search-path (getenv "GOLIBPACKPATH")))
                   (string-join
                    (map (lambda (path)
                           (string-append option " " path))
                         (if search-path
                           (string-split search-path #\:)
                           '()))
                    " ")))
               (setenv "GOCFLAGS"  (path->flags "-I"))
               (setenv "GOLDFLAGS" (path->flags "-L")))))))
    (native-inputs
      (append
       (format-inputs
        (list q:go-full))
       inputs))
    (native-search-paths
      (list
       (search-path-specification
         (variable "GOLIBPACKPATH")
         (files
           (list "lib/go")))))))


(define-public gobang
  (gopkg
   "gobang"
   '()
   "b1bed38e5e0a261616343c7555962162416c28e2"
   "1h937x3clk3xydvl7876qd3b6plapjsnxmdlyan1iydmh6ym7vg0"))

(define-public golite
  (gopkg
   "golite"
   (normalize-inputs '(sqlite))
   "b31e279bade22276f27f4990b7564a2114f3058a"
   "14q9bhkw1v60mby187balwnnwyz2ig8hi03v5f2nm8p3m8sl5ykd"))

(define-public binder
  (gopkg
   "binder"
   (append (format-inputs     (list gobang eut))
           (normalize-inputs '(socat lsof)))
   "aa44df7545e13f6d2bb5ea088786d14f4a31a04d"
   "15zdcvx1gxlzz3g7gasckna3xfrf0c6yd8pvii169ivgm0rrbpll"))

(define-public wscat
  (gopkg "wscat"
   (append (format-inputs     (list gobang eut))
           (normalize-inputs '()))
   "00f822df8bcecc3b40bdc39f0cd5dfb6d1efc45e"
   "0ypj05w6kh7dd55qn0gfc1fdiyy5kfalypxm5dhsbmqkzk09m3id"))

(define-public glaze
  (gopkg
   "glaze"
   (append (format-inputs     (list gobang eut))
           (normalize-inputs '()))
   "ebe6b2ae31145fd3534a0fb583410ce2cd8e8d69"
   "0r0lsfx5g6crgyrzf8kqid3370lvyq0h573qbcpzl6mcm57nc9hj"))

(define-public untls
  (gopkg
   "untls"
   (append (format-inputs     (list gobang eut))
           (normalize-inputs '()))
   "3833dbae57bcf87a33ecbb38fb877861fb1c8d63"
   "0pxmqhzy4286w3aivq1qykqdr4mcd6b3p7q9frbnwlqmk5gfp36z"))

(define-public papod
  (gopkg
   "papod"
   (append (format-inputs     (list gobang golite eut))
           (normalize-inputs '(sqlite sqlite:static)))
   "db0315223571daaf43ab5e8456bed7f3d7f9dafa"
   "19dr8w1hpi9h8rjad9dwb0s6r41xgj1x4m4j7yndchikwrwg4lgx"))



(list
 remembering
 eut
 cage
 nicely
 q
 syskeep
 guile-heredoc

 gobang
 golite
 binder
 glaze
 untls
 wscat
 papod)