Next: table count/group on criteria, Previous: 101, Up: Guix REPL [Contents][Index]
(→ 4 min 20 s into Simon Tournier presentation)
In the following REPL session
#:cabal-revision argument
(present in the package ghc-crypthohash-sha1, as shown below, for
instance)
(define-public ghc-cryptohash-sha1
(package
;; skipped for clarity
(build-system haskell-build-system)
(arguments
`(#:cabal-revision
("6" "10rpxrmqgwihmplczglwxf5q3l13z9j3kvi065z884y4dymmnkgc")
;; …
REPL session :
$ guix repl
GNU Guile 3.0.8
;; [skipped licence preamble]
> (use-modules
(guix)
(guix build-system haskell)
(gnu)
(ice-9 match))
>
> (define haskell-packages
(fold-packages
(lambda (package result)
(if (eq? (package-build-system package) haskell-build-system)
(cons package result)
result))
'()))
> (define (cabal-revision? package)
(apply (lambda* (#:key cabal-revision #:allow-other-keys)
(match cabal-revision
((revision hash) #t)
(_ #f)))
(package-arguments package)))
> (define cabal-revision-packages
(filter cabal-revision? haskell-packages))
> (length haskell-packages)
$1 = 721
> (length cabal-revision-packages)
$2 = 108