-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguix.scm
More file actions
81 lines (71 loc) · 2.79 KB
/
Copy pathguix.scm
File metadata and controls
81 lines (71 loc) · 2.79 KB
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
;;; Tarot --- Simple handler of Tarot cards
(use-modules (guix)
(guix build-system haskell)
(guix channels)
(guix git-download)
(guix inferior)
((guix licenses) #:prefix license:)
(guix profiles)
(gnu packages)
(gnu packages haskell-xyz))
;; Borrowed from the Guix Cookbook itself to enable building locally from repo
;; source: https://guix.gnu.org/cookbook/en/html_node/Getting-Started.html
(define vcs-file?
;; Return true if the given file is under version control.
(or (git-predicate (current-source-directory))
(const #t))) ; not in a Git checkout
;; === Inferior setup ===
(define haskell-inferior
(let ((channels (list (channel
(name 'guix)
(url "https://codeberg.org/guix/guix.git")
(branch "haskell-team")
(commit "bf5516c3fd668fa33b0cf73639a192554b5fb267")
(introduction
(make-channel-introduction
"1edfe6dd7b62ac2c9f3648ee1379588de45f3e74"
(openpgp-fingerprint
"3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5")))))))
(inferior-for-channels channels)))
(define-syntax-rule (inferior-haskell-package name version)
(car (lookup-inferior-packages haskell-inferior name version)))
;; === Dependencies ===
(define ghc-9.10
(inferior-haskell-package "ghc" "9.10.2"))
(define cabal-install
(inferior-haskell-package "cabal-install" "3.12.1.0"))
(define-public ghc-random-1.3.1
(package
(inherit ghc-random)
(version "1.3.1")
(source
(origin
(method url-fetch)
(uri (hackage-uri "random" version))
(sha256
(base32 "0d8snwlrq8x4r197q1igpvwhrdbyc9wfry3qlsiczc35ya1sqh6q"))))
(inputs (list ghc-splitmix ghc-data-array-byte))))
;; === Package Specification ===
(define-public tarot-hs
(package
(name "tarot-hs")
(version "1.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/jbelldev/tarot-hs")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1qbbxaqja10mkrgq4p4ml7asyrsdb0jy2gpbfvwjhzygf9m608ri"))))
(build-system haskell-build-system)
(arguments `(#:haskell ,ghc-9.10))
(inputs (list ghc-random-1.3.1))
(native-inputs (list ghc-9.10
cabal-install))
(synopsis "A simple project for exploring Literate Programming.")
(description "A simple project for exploring Literate Programming.")
(home-page "https://github.com/jbelldev/tarot-hs")
(license license:gpl3+)))
tarot-hs