blob: a4272dd5dfde6efa1b1431bbd0c3e935af58cef9 (
plain)
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
|
(define-module (andromeda utils)
#:use-module (andromeda packages haskell)
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (ice-9 match))
(define-public (from-ghc-to-ghc-9.14 name) (string-append "ghc-9.14" (string-drop name (string-length "ghc"))))
(define-public (with-ghc-9.14 base)
(package
(inherit base)
(name (from-ghc-to-ghc-9.14 (package-name base)))
(arguments
(append
(list #:haskell ghc-9.14)
(package-arguments base)))
(inputs
(map
(match-lambda
((input-name input)
(if (string-prefix? "ghc-" input-name)
(list
(from-ghc-to-ghc-9.14 input-name)
(specification->package (from-ghc-to-ghc-9.14 input-name)))
(if (string=? "hspec-discover" input-name)
(list "ghc-9.14-hspec-discover-bootstrap" (specification->package "ghc-9.14-hspec-discover-bootstrap"))
(list input-name input)))))
(package-inputs base)))
(native-inputs
(map
(match-lambda
((input-name input)
(if (string-prefix? "ghc-" input-name)
(list
(from-ghc-to-ghc-9.14 input-name)
(specification->package (from-ghc-to-ghc-9.14 input-name)))
(list input-name input))))
(package-native-inputs base)))))
|