all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob b9b309d6d5aed5bd745c0ab79cb36c63180a91aa 27216 bytes (raw)
name: gnu/packages/idris.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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
;;; Copyright © 2019, 2022 Eric Bavier <bavier@posteo.net>
;;;
;;; 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/>.

;;; TODO:
;;;
;;;  - Idris has multiple backends, but we only register Chez as an
;;;  input.  Decide how to make backends optional, and/or which ones to package
;;;  by default.
;;;
;;;  - Set RUNPATH instead of using LD_LIBRARY_PATH.  See
;;;  http://blog.tremily.us/posts/rpath/  This probably needs patching Idris
;;;  because it uses its FFI infrastrucutre to open libidris_support.so, which
;;;  is based on dlopen.
;;;
;;;  - The reason some of the historical packages point to
;;;  github.com/attila-lendvai-patches is that these versions need some
;;;  patches to make them buildable today, and these branches haven't been
;;;  incorporated into the official repo yet.  Once/if that happens, these
;;;  URL's can be changed to point to the official repo.

(define-module (gnu packages idris)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages chez)
  #:use-module (gnu packages haskell-check)
  #:use-module (gnu packages haskell-web)
  #:use-module (gnu packages haskell-xyz)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages llvm)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ncurses)
  #:use-module (gnu packages node)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages python)
  #:use-module (gnu packages racket)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages version-control)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system haskell)
  #:use-module (guix download)
  #:use-module (guix git)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (ice-9 match)
  #:use-module (ice-9 regex)
  #:export (make-idris-package))

;;;
;;; Idris 1
;;;
(define-public idris-1.3.4
  (package
    (name "idris")
    (version "1.3.4")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/idris-lang/Idris-dev.git")
                    (commit (string-append "v" version))))
              (sha256
               (base32
                "0cd2a92323hb9a6wy8sc0cqwnisf4pv8y9y2rxvxcbyv8cs1q8g2"))
              (patches (search-patches "idris-test-ffi008.patch"))
              (file-name (git-file-name "idris" version))))
    (build-system haskell-build-system)
    (native-inputs                      ;For tests
     (list perl ghc-cheapskate ghc-tasty ghc-tasty-golden
           ghc-tasty-rerun))
    (inputs
     (list bash-minimal
           gmp
           ncurses
           ghc-aeson
           ghc-annotated-wl-pprint
           ghc-ansi-terminal
           ghc-ansi-wl-pprint
           ghc-async
           ghc-base64-bytestring
           ghc-blaze-html
           ghc-blaze-markup
           ghc-cheapskate
           ghc-code-page
           ghc-fingertree
           ghc-fsnotify
           ghc-ieee754
           ghc-libffi
           ghc-megaparsec
           ghc-network
           ghc-optparse-applicative
           ghc-regex-tdfa
           ghc-safe
           ghc-split
           ghc-terminal-size
           ghc-uniplate
           ghc-unordered-containers
           ghc-utf8-string
           ghc-vector
           ghc-vector-binary-instances
           ghc-zip-archive))
    (arguments
     `(#:configure-flags
       (list (string-append "--datasubdir="
                            (assoc-ref %outputs "out") "/lib/idris")
             "-fFFI" "-fGMP")
       #:phases
       (modify-phases %standard-phases
         ;; This allows us to call the 'idris' binary before installing.
         (add-after 'unpack 'set-ld-library-path
           (lambda _
             (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/dist/build"))))
         (add-before 'configure 'update-constraints
           (lambda _
             (substitute* "idris.cabal"
               (("(aeson|ansi-terminal|haskeline|megaparsec|optparse-applicative)\\s+[^,]+" all dep)
                dep))))
         (add-before 'configure 'set-cc-command
           (lambda _
             (setenv "CC" ,(cc-for-target))))
         (add-after 'install 'fix-libs-install-location
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (lib (string-append out "/lib/idris"))
                    (modules (string-append lib "/libs")))
               (for-each
                (lambda (module)
                  (symlink (string-append modules "/" module)
                           (string-append lib "/" module)))
                '("prelude" "base" "contrib" "effects" "pruviloj")))))
         (delete 'check)                ;Run check later
         (add-after 'install 'check
           (lambda* (#:key outputs #:allow-other-keys #:rest args)
             (let ((out (assoc-ref outputs "out")))
               (chmod "test/scripts/timeout" #o755) ;must be executable
               (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count)))
               (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
               (apply (assoc-ref %standard-phases 'check) args))))
         (add-before 'check 'restore-libidris_rts
           (lambda* (#:key outputs #:allow-other-keys)
             ;; The Haskell build system moves this library to the
             ;; "static" output.  Idris only knows how to find it in the
             ;; "out" output, so we restore it here.
             (let ((out (assoc-ref outputs "out"))
                   (static (assoc-ref outputs "static"))
                   (filename "/lib/idris/rts/libidris_rts.a"))
               (rename-file (string-append static filename)
                            (string-append out filename)))))
         (add-before 'check 'wrap-program
           (lambda* (#:key outputs inputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (exe (string-append out "/bin/idris")))
               (wrap-program exe
                 `("IDRIS_CC" = (,',(cc-for-target))))
               (with-directory-excursion (string-append out "/bin/")
                 (let ((versioned-name ,(string-append name "-" version)))
                   (rename-file ,name versioned-name)
                   (symlink versioned-name ,name)))))))))
    (native-search-paths
     (list (search-path-specification
            (variable "IDRIS_LIBRARY_PATH")
            (files '("lib/idris")))))
    (home-page "https://www.idris-lang.org")
    (synopsis "General purpose language with full dependent types")
    (description "Idris is a general purpose language with full dependent
types.  It is compiled, with eager evaluation.  Dependent types allow types to
be predicated on values, meaning that some aspects of a program's behaviour
can be specified precisely in the type.  The language is closely related to
Epigram and Agda.")
    (license license:bsd-3)))

(define-public idris idris-1.3.4)

;;;
;;; Idris 2
;;;
(define* (make-idris-package source idris-version
                             #:key bootstrap-idris
                             (idris-version-tag #false)
                             (guix-version (string-append
                                            idris-version
                                            (if idris-version-tag
                                                (string-append
                                                 "-" idris-version-tag)
                                                "")))
                             (ignore-test-failures? #false)
                             (unwrap? #true)
                             (tests? #true)
                             (historical? #false)
                             (hidden? #false) ; or (hidden? historical?)
                             (substitutable? (not historical?))
                             (files-to-patch-for-shell
                              '("src/Compiler/Scheme/Chez.idr"
                                "src/Compiler/Scheme/Racket.idr"
                                "src/Compiler/Scheme/Gambit.idr"
                                "src/Compiler/ES/Node.idr"
                                "bootstrap/idris2_app/idris2.rkt"
                                "bootstrap/idris2_app/idris2.ss"
                                "build/stage1/idris2_app/idris2.ss"
                                "build/stage1/idris2_app/idris2.rkt"
                                ))
                             (with-bootstrap-shortcut? (not historical?)))
  "HISTORICAL? means that it's only interesting for historical reasons, e.g. to be
used as a bootsrapping stage.

WITH-BOOTSTRAP-SHORTCUT? controls whether to use a previous version of Idris to
build us (which is potentially recursive), or use the captured compiler output
(Scheme code)."
  (package
    (name "idris2")
    (version guix-version)
    (source (match source
              ((commit hash . url)
               (origin
                 (method git-fetch)
                 (uri (git-reference
                       (url (if (null? url)
                                "https://github.com/idris-lang/Idris2.git"
                                (car url)))
                       (commit commit)))
                 (sha256 (base32 hash))
                 (file-name (git-file-name name version))))
              ((or (? git-checkout?)
                   (? local-file?))
               source)))
    (build-system gnu-build-system)
    (native-inputs
     (list (if with-bootstrap-shortcut?
               chez-scheme
               bootstrap-idris)
           clang-toolchain-12 ; older clang-toolchain versions don't have a bin/cc
           coreutils which git
           sed
           ;; Only for the tests
           node
           racket
           ;; Only for the docs
           python-minimal
           python-sphinx
           python-sphinx-rtd-theme))
    (inputs
     (list bash-minimal chez-scheme gmp))
    (outputs '("out" "doc"))
    (arguments
     (list
      #:tests? tests?
      #:substitutable? substitutable?
      #:make-flags
      #~(list (string-append "CC=" #$(cc-for-target))
              #$(string-append "IDRIS_VERSION=" idris-version)
              #$(string-append "IDRIS_VERSION_TAG=" (or idris-version-tag ""))
              #$(if with-bootstrap-shortcut?
                    #~(string-append "SCHEME="
                                     #$(this-package-input "chez-scheme")
                                     "/bin/scheme")
                    #~(string-append "BOOTSTRAP_IDRIS="
                                     #$bootstrap-idris
                                     "/bin/" #$(package-name bootstrap-idris)))
              (string-append "PREFIX=" (assoc-ref %outputs "out"))
              "-j1")
      #:phases
      `(modify-phases %standard-phases
         (delete 'bootstrap)
         (delete 'configure)
         (delete 'check)    ; check must happen after install and wrap-program
         (add-before 'build 'build-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (invoke "make" "--directory" "docs/" "html")))
         (add-after 'build-doc 'install-doc
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((doc (assoc-ref outputs "doc")))
               (copy-recursively "docs/build/html"
                                 (string-append doc "/share/doc/"
                                                ,name "-" ,version)))))
         (add-after 'unpack 'patch-paths
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((files-to-patch (filter file-exists?
                                           ',files-to-patch-for-shell)))
               (substitute* files-to-patch
                 ((,(regexp-quote "#!/bin/sh"))
                  (string-append "#!" (assoc-ref inputs "bash") "/bin/sh"))
                 (("/usr/bin/env")
                  (string-append (assoc-ref inputs "coreutils") "/bin/env"))))))
         ,@(if unwrap?
               `((add-after 'install 'unwrap
                   (lambda* (#:key outputs #:allow-other-keys)
                     ;; The bin/idris2 calls bin/idris2_app/idris2.so which is
                     ;; the real executable, but it sets LD_LIBRARY_PATH
                     ;; incorrectly.  Remove bin/idris2 and replace it with
                     ;; bin/idris2_app/idris2.so instead.
                     (let* ((out (assoc-ref outputs "out"))
                            (image-base (string-append
                                         out "/bin/idris2_app/idris2"))
                            (image (if (file-exists? image-base)
                                       image-base
                                       ;; For v0.5.1 and older.
                                       (string-append image-base ".so"))))
                       (delete-file (string-append out "/bin/idris2"))
                       (rename-file image (string-append out "/bin/idris2"))
                       (delete-file-recursively (string-append out "/bin/idris2_app"))
                       (delete-file-recursively (string-append out "/lib"))))))
               '())
         ,@(if with-bootstrap-shortcut?
               `((replace 'build
                   (lambda* (#:key make-flags #:allow-other-keys)
                     ;; i.e. do not build it using the previous version of
                     ;; Idris, but rather compile the comitted compiler
                     ;; output.
                     (apply invoke "make" "bootstrap" make-flags))))
               '())
         (add-after 'unwrap 'wrap-program
           (lambda* (#:key outputs inputs #:allow-other-keys)
             (let* ((chez (string-append (assoc-ref inputs "chez-scheme")
                                         "/bin/scheme"))
                    (out (assoc-ref outputs "out"))
                    (exe (string-append out "/bin/" ,name))
                    (version ,idris-version))
               (wrap-program exe
                 `("IDRIS2_PREFIX" = (,out))
                 `("LD_LIBRARY_PATH" prefix (,(string-append
                                               out "/idris2-" version "/lib")))
                 `("CC" = (,',(cc-for-target)))
                 `("CHEZ" = (,chez)))
               (with-directory-excursion (string-append out "/bin/")
                 (let ((versioned-name ,(string-append name "-" version)))
                   (rename-file ,name versioned-name)
                   (symlink versioned-name ,name))))))
         (add-after 'wrap-program 'check
           (lambda* (#:key outputs make-flags #:allow-other-keys)
             (let ((invoke-make
                    (lambda (target)
                      (apply invoke "make"
                             "INTERACTIVE="
                             ;; "THREADS=1" ; for reproducible test output
                             (string-append "IDRIS2="
                                            (assoc-ref outputs "out")
                                            "/bin/" ,name)
                             target make-flags))))
               ;; TODO This is something like how it should be handled, but
               ;; the Makefile unconditionally invokes the `testenv` target,
               ;; and thus overwrites the `runtest` script when `make test` is
               ;; invoked.  For now this situation is resolved in the Idris
               ;; Makefile, by explicitly invoking the Idris `runtest` wrapper
               ;; script with an sh prefix.
               ;;
               ;;(invoke-make "testenv")
               ;;(patch-shebang "build/stage2/runtests")
               (,(if ignore-test-failures?
                     'false-if-exception
                     'begin)
                (invoke-make "test"))))))))
    (properties `((hidden? . ,hidden?)))
    (home-page "https://www.idris-lang.org")
    (synopsis "General purpose language with full dependent types")
    (description "Idris is a general purpose language with full dependent
types.  It is compiled, with eager evaluation.  Dependent types allow types to
be predicated on values, meaning that some aspects of a program's behaviour
can be specified precisely in the type.  The language is closely related to
Epigram and Agda.")
    (license license:bsd-3)))

(define-public idris2-0.1.1
  ;; branch idris.2
  ;; This is the first (untagged) Idris2 version that bootstraps off of the
  ;; Idris1 line.  Originally it was in the repo called Idris2-boot.
  (make-idris-package '("3c2335ee6bc00b7f417ac672a4ab7b73599abeb3"
                        "10w10ggyvlw7m1pazbfxr4sj3wpb6z1ap6rg3lxc0z6f2s3x53cb")
                      "0.1.1"
                      #:bootstrap-idris idris-1.3.4
                      #:historical? #true
                      #:unwrap? #false
                      ;; TODO `make bootstrap` needs to be backported into the
                      ;; Makefile in this branch.  Force the bootstrap
                      ;; shortcut to be turned off.
                      #:with-bootstrap-shortcut? #false))

(define-public idris2-0.2.1
  ;; branch idris.3
  (make-idris-package '("257bbc27498808e8cd4155cc06ea3f6a07541537"
                        "0idxplcmd6p13i2n0g49bc2snddny4kdr4wvd8854snzsiwqn7p1"
                        "https://github.com/attila-lendvai-patches/Idris2")
                      "0.2.1"
                      #:bootstrap-idris idris2-0.1.1
                      #:historical? #true))

(define-public idris2-0.2.2
  ;; branch idris.4
  (make-idris-package '("9bc8e6e9834cbc7b52dc6ca2d80d7e96afeb47d1"
                        "0xzl1mb5yxgp6v36rngy00i59cfy67niyiblcpaksllrgmg639p4"
                        "https://github.com/attila-lendvai-patches/Idris2")
                      "0.2.2"
                      #:bootstrap-idris idris2-0.2.1
                      #:historical? #true))

(define-public idris2-0.3.0
  ;; branch idris.5
  (make-idris-package '("025b5cd25b76eae28283a10bd155c384e46fbd82"
                        "00a83paib571ahknipmgw7g9pbym105isk3bz0c1ng41s4kjpsxh"
                        "https://github.com/attila-lendvai-patches/Idris2")
                      "0.3.0"
                      #:bootstrap-idris idris2-0.2.2
                      #:historical? #true))

(define-public idris2-0.4.0
  ;; branch idris.6
  (make-idris-package '("v0.4.0"
                        "105jybjf5s0k6003qzfxchzsfcpsxip180bh3mdmi74d464d0h8g")
                      "0.4.0"
                      #:bootstrap-idris idris2-0.3.0
                      #:ignore-test-failures? #true ; TODO investigate
                      #:historical? #true))

(define-public idris2-0.5.1
  (make-idris-package '("v0.5.1"
                        "09k5fxnplp6fv3877ynz1lwq9zapxcxbvfvkn6g68yb0ivrff978")
                      "0.5.1"))

;; TODO re build failure: in the build sandbox some parts of the test output
;; is missing.  I cannot reproduce it in a guix shell.  My assumption is that
;; it's an Idris bug that only manifests in certain circumstances.  There are
;; some other issues left with the use of #!/bin/sh, too.
(define-public idris2-dev
  (make-idris-package '("4bb12225424d76c7874b176e2bfb8b5550c112eb"
                        "0kb800cgfm0afa83pbyi3x9bpswcl8jz4pr68zy092fs50km3bj7"
                        "https://github.com/attila-lendvai-patches/Idris2")
                      "0.5.1"
                      #:ignore-test-failures? #true
                      #:idris-version-tag "dev"))

(define-public idris2 idris2-0.5.1)

;;;
;;; Idris apps
;;;

;; Idris modules use the gnu-build-system so that the IDRIS_LIBRARY_PATH is set.
(define (idris-default-arguments name)
  `(#:modules ((guix build gnu-build-system)
               (guix build utils)
               (ice-9 ftw)
               (ice-9 match))
    #:phases
    (modify-phases %standard-phases
      (delete 'configure)
      (delete 'build)
      (delete 'check)
      (replace 'install
        (lambda* (#:key inputs outputs #:allow-other-keys)
          (let* ((out (assoc-ref outputs "out"))
                 (idris (assoc-ref inputs "idris"))
                 (idris-bin (string-append idris "/bin/idris"))
                 (idris-libs (string-append idris "/lib/idris/libs"))
                 (module-name (and (string-prefix? "idris-" ,name)
                                   (substring ,name 6)))
                 (ibcsubdir (string-append out "/lib/idris/" module-name))
                 (ipkg (string-append module-name ".ipkg"))
                 (idris-library-path (getenv "IDRIS_LIBRARY_PATH"))
                 (idris-path (string-split idris-library-path #\:))
                 (idris-path-files (apply append
                                          (map (lambda (path)
                                                 (map (lambda (dir)
                                                        (string-append path "/" dir))
                                                      (scandir path))) idris-path)))
                 (idris-path-subdirs (filter (lambda (path)
                                               (and path (match (stat:type (stat path))
                                                           ('directory #t)
                                                           (_ #f))))
                                                    idris-path-files))
                 (install-cmd (cons* idris-bin
                                     "--ibcsubdir" ibcsubdir
                                     "--build" ipkg
                                     ;; only trigger a build, as --ibcsubdir
                                     ;; already installs .ibc files.

                                     (apply append (map (lambda (path)
                                                          (list "--idrispath"
                                                                path))
                                                        idris-path-subdirs)))))
            ;; FIXME: Seems to be a bug in idris that causes a dubious failure.
            (apply system* install-cmd)
            #t))))))

(define-public idris-lightyear
  (let ((commit "6d65ad111b4bed2bc131396f8385528fc6b3678a"))
    (package
      (name "idris-lightyear")
      (version (git-version "0.1" "1" commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/ziman/lightyear")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1pkxnn3ryr0v0cin4nasw7kgkc9dnnpja1nfbj466mf3qv5s98af"))))
      (build-system gnu-build-system)
      (native-inputs
       (list idris))
      (arguments (idris-default-arguments name))
      (home-page "https://github.com/ziman/lightyear")
      (synopsis "Lightweight parser combinator library for Idris")
      (description "Lightweight parser combinator library for Idris, inspired
by Parsec.  This package is used (almost) the same way as Parsec, except for one
difference: backtracking.")
      (license license:bsd-2))))

(define-public idris-wl-pprint
  (let ((commit "1d365fcf4ba075859844dbc5eb96a90f57b9f338"))
    (package
      (name "idris-wl-pprint")
      (version (git-version "0.1" "1" commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/shayan-najd/wl-pprint")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0g7c3y9smifdz4sivi3qmvymhdr7v9kfq45fmfmmvkqcrix0spzn"))))
      (build-system gnu-build-system)
      (native-inputs
       (list idris))
      (arguments (idris-default-arguments name))
      (home-page "https://github.com/shayan-najd/wl-pprint")
      (synopsis "Pretty printing library")
      (description "A pretty printing library for Idris based on Phil Wadler's
paper A Prettier Printer and on Daan Leijen's extensions in the Haskell
wl-pprint library.")
      (license license:bsd-2))))

(define-public idris-bifunctors
  (let ((commit "53d06a6ccfe70c49c9ae8c8a4135981dd2173202"))
    (package
      (name "idris-bifunctors")
      (version (git-version "0.1" "1" commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/HuwCampbell/Idris-Bifunctors")
                      (commit commit)))
                (file-name (string-append name "-" version "-checkout"))
                (sha256
                 (base32
                  "02vbsd3rmgnj0l1qq787709qcxjbr9890cbad4ykn27f77jk81h4"))))
      (build-system gnu-build-system)
      (native-inputs
       (list idris))
      (arguments (idris-default-arguments name))
      (home-page "https://github.com/HuwCampbell/Idris-Bifunctors")
      (synopsis "Bifunctor library")
      (description "This is a bifunctor library for Idris based off the
excellent Haskell Bifunctors package from Edward Kmett.")
      (license license:bsd-3))))

(define-public idris-lens
  (let ((commit "26f012005f6849806cea630afe317e42cae97f29"))
    (package
      (name "idris-lens")
      (version (git-version "0.1" "1" commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                      (url "https://github.com/HuwCampbell/idris-lens")
                      (commit commit)))
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "06jzfj6rad08rk92w8jk5byi79svmyg0mrcqhibgx8rkjjy6vmai"))))
      (build-system gnu-build-system)
      (native-inputs
       (list idris))
      (propagated-inputs
       (list idris-bifunctors))
      (arguments (idris-default-arguments name))
      (home-page "https://github.com/HuwCampbell/idris-lens")
      (synopsis "Van Laarhoven lenses for Idris")
      (description "Lenses are composable functional references.  They allow
accessing and modifying data within a structure.")
      (license license:bsd-3))))

debug log:

solving b9b309d6d5 ...
found b9b309d6d5 in https://yhetil.org/guix/20220414121612.9815-3-attila@lendvai.name/
found 28e918a486 in https://yhetil.org/guix/20220414121612.9815-2-attila@lendvai.name/
found f84431cab9 in https://yhetil.org/guix/20220414121612.9815-1-attila@lendvai.name/
found cdf76244fb in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 cdf76244fbb25d2d72799e69f1770db09f3ef0fc	gnu/packages/idris.scm

applying [1/3] https://yhetil.org/guix/20220414121612.9815-1-attila@lendvai.name/
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index cdf76244fb..f84431cab9 100644


applying [2/3] https://yhetil.org/guix/20220414121612.9815-2-attila@lendvai.name/
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index f84431cab9..28e918a486 100644


applying [3/3] https://yhetil.org/guix/20220414121612.9815-3-attila@lendvai.name/
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 28e918a486..b9b309d6d5 100644

Checking patch gnu/packages/idris.scm...
Applied patch gnu/packages/idris.scm cleanly.
Checking patch gnu/packages/idris.scm...
Applied patch gnu/packages/idris.scm cleanly.
Checking patch gnu/packages/idris.scm...
Applied patch gnu/packages/idris.scm cleanly.

index at:
100644 b9b309d6d5aed5bd745c0ab79cb36c63180a91aa	gnu/packages/idris.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.