all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 46669e3a2a7179e02e8dc5a2f44455b4ca89e228 11543 bytes (raw)
name: gnu/packages/hare.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
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2023 Timmy Douglas <mail@timmydouglas.com>
;;;
;;; 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 hare)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix gexp)
  #:use-module (guix utils)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix store)
  #:use-module (guix utils)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages c)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages man)
  #:use-module (gnu packages pkg-config))

(define-public harec
  (let ((revision "1")
        (commit "08af3257fc210601713ad026e05c0269e4f71473"))
    (package
      (name "harec")
      (version (git-version "0.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~sircmpwn/harec")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1a265f4dla482yqzzf2jsz10j6jhj1whnic0qsvmdv9q80mi444n"))))
      (build-system gnu-build-system)
      (inputs (list qbe scdoc))
      (arguments
       (list
        #:phases #~(modify-phases %standard-phases
                     (replace 'configure
                       ;; its custom configure script doesn't understand 'CONFIG_SHELL'.
                       (lambda* (#:key outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out")))
                           (setenv "CC"
                                   #$(cc-for-target))
                           (setenv "AR"
                                   #$(ar-for-target))
                           (setenv "AS"
                                   #$(as-for-target))
                           (setenv "CC"
                                   #$(cc-for-target))
                           (setenv "LD"
                                   #$(ld-for-target))
                           (setenv "QBE"
                                   (string-append #$qbe "/bin/qbe"))
                           (invoke "./configure"
                                   (string-append "--prefix=" out))))))))
      (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
      (synopsis "Hare bootstrap compiler")
      (description
       "This is a Hare compiler written in C11 for POSIX-compatible systems.")
      (home-page "https://harelang.org")
      (license license:gpl3+))))


(define hare-tzdata
  (package
    (inherit tzdata)
    (arguments
     (substitute-keyword-arguments (package-arguments tzdata)
       ((#:phases phases)
        #~(modify-phases #$phases
            (add-after 'install 'copy-leap-seconds-list
              (lambda _
                (copy-file "leap-seconds.list"
                           (string-append
                            #$output "/share/zoneinfo/leap-seconds.list"))))))))))

(define-public hare
  (let ((revision "1")
        (commit "3cf277739c142cdc611415ca605639aa39c38d20"))
    (package
      (name "hare")
      (version (git-version "0.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~sircmpwn/hare")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1h0mz2w8bwcif43zq9csk8v3i8czqv3hqd6s2ijf2rdkg1mshrr5"))))
      (build-system gnu-build-system)
      (native-inputs (list scdoc))
      (propagated-inputs (list binutils harec qbe))
      (inputs (list hare-tzdata))
      (arguments
       (list
        #:phases #~(modify-phases %standard-phases
                     (add-after 'unpack 'fix-makefile
                       (lambda* (#:key inputs outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out"))
                               (tzdata-dir (assoc-ref inputs "tzdata"))
                               (buildtmp (getenv "TMPDIR"))
                               (arch-name (if #$(target-aarch64?) "aarch64"
                                              (if #$(target-riscv64?)
                                                  "riscv64" "x86_64"))))
                           (copy-file "configs/linux.mk" "config.mk")
                           (setenv "XDG_CACHE_HOME" buildtmp) ;"Error creating /homeless-shelter/.cache/hare: Permission denied"
                           (substitute* "wordexp/wordexp.ha"
                             (("/bin/sh")
                              (which "sh")))
                           (substitute* "time/chrono/+linux.ha"
                             (("/usr")
                              tzdata-dir)) ;it uses leap-seconds.list
                           (substitute* "config.mk"
                             (("/usr/local")
                              out)
                             (("x86_64")
                              arch-name)
                             (("_LD=[-a-z]+")
                              (string-append "_LD="
                                             #$(ld-for-target)))
                             (("_AS=[-a-z]+")
                              (string-append "_AS="
                                             #$(as-for-target)))
                             (("_CC=[-a-z]+")
                              (string-append "_CC="
                                             #$(cc-for-target)))
                             (("HARECACHE = .cache")
                              (string-append "HARECACHE=" buildtmp "/.cache"))
                             (("BINOUT = .bin")
                              (string-append "BINOUT=" buildtmp "/.bin"))))))
                     (delete 'configure))))
      (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
      (native-search-paths
       (list (search-path-specification
              (variable "HAREPATH")
              (files '("src/hare/stdlib" "src/hare/third-party")))))
      (synopsis "Hare compiler")
      (description
       "This is the Hare compiler. Hare is a systems programming language.")
      (home-page "https://harelang.org")
      (license (list license:gpl3 ;compiler
                     license:mpl2.0))))) ; stdlib


(define-public hare-xml
  (let ((revision "1")
        (commit "6b90e482c431f072e9b3ce3ba4d9d5f59ffedef0"))
    (package
      (name "hare-xml")
      (version (git-version "0.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~sircmpwn/hare-xml")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1n62xxni4l1xrprdb81j7yh0n3fwyjvw20a72b1xbmq8gkn863pb"))))
      (build-system gnu-build-system)
      (native-inputs (list hare scdoc))
      (arguments
       (list
        #:phases #~(modify-phases %standard-phases
                     (add-after 'unpack 'fix-makefile
                       (lambda* (#:key inputs outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out")))
                           (setenv "XDG_CACHE_HOME"
                                   (getenv "TMPDIR"))
                           (substitute* "Makefile"
                             (("/usr/local")
                              out)))))
                     (delete 'configure))))
      (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
      (synopsis "Hare XML Library")
      (description "This package provides XML support for Hare.")
      (home-page "https://git.sr.ht/~sircmpwn/hare-xml")
      (license license:mpl2.0))))


(define-public hare-ev
  (let ((revision "1")
        (commit "e3c3f7613c602672ac41a3e47c106a5bd27a2378"))
    (package
      (name "hare-ev")
      (version (git-version "0.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~sircmpwn/hare-ev")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1ssb51a6qhsg4022k61wzk4yx6pqr8pjgabmwzp46zn9apd122sd"))))
      (build-system gnu-build-system)
      (native-inputs (list hare))
      (arguments
       (list
        #:phases #~(modify-phases %standard-phases
                     (add-after 'unpack 'fix-makefile
                       (lambda* (#:key inputs outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out")))
                           (setenv "XDG_CACHE_HOME"
                                   (getenv "TMPDIR"))
                           (substitute* "Makefile"
                             (("/usr/local")
                              out)))))
                     (delete 'configure))))
      (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
      (synopsis "Hare event loop Library")
      (description "This package provides an event loop for Hare programs.")
      (home-page "https://git.sr.ht/~sircmpwn/hare-ev")
      (license license:mpl2.0))))


(define-public hare-wayland
  (let ((revision "1")
        (commit "21ba2418387bd00221290b28e8056173a459fd4a"))
    (package
      (name "hare-wayland")
      (version (git-version "0.0.0" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://git.sr.ht/~sircmpwn/hare-wayland")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "1vv3apcxq7pdv2xblayi2ncqjh3gz0521x70schhn30781qp0l52"))))
      (build-system gnu-build-system)
      (native-inputs (list hare hare-xml pkg-config wayland wayland-protocols))
      (arguments
       (list
        #:phases #~(modify-phases %standard-phases
                     (add-after 'unpack 'fix-makefile
                       (lambda* (#:key inputs outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out")))
                           (setenv "XDG_CACHE_HOME"
                                   (getenv "TMPDIR"))
                           (substitute* "Makefile"
                             (("/usr/local")
                              out)))))
                     (delete 'configure))))
      (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
      (synopsis "Native Hare Wayland bindings")
      (description
       "This package provides native Wayland bindings generated from Wayland
XML protocol definitions.")
      (home-page "https://git.sr.ht/~sircmpwn/hare-wayland")
      (license license:mpl2.0))))


debug log:

solving 46669e3a2a ...
found 46669e3a2a in https://yhetil.org/guix/611eda75b5cca8d39d4c73ae69db32982673a5a6.1702192273.git.mail@timmydouglas.com/

applying [1/1] https://yhetil.org/guix/611eda75b5cca8d39d4c73ae69db32982673a5a6.1702192273.git.mail@timmydouglas.com/
diff --git a/gnu/packages/hare.scm b/gnu/packages/hare.scm
new file mode 100644
index 0000000000..46669e3a2a

Checking patch gnu/packages/hare.scm...
1:280: new blank line at EOF.
+
Applied patch gnu/packages/hare.scm cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 46669e3a2a7179e02e8dc5a2f44455b4ca89e228	gnu/packages/hare.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.