summaryrefslogtreecommitdiff
path: root/packages/komodo/strong-type.scm
blob: aca04e2892d08fb03df7fde470752ab2c237c9ff (about) (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
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
(define-module (strong-type)
  ;; #:use-module (guix build utils)
  #:use-module (guix build-system copy)
  ;; #:use-module (guix build-system cmake)
  #:use-module (guix git-download)
  #:use-module ((guix licenses)
		#:prefix license:)
  #:use-module (guix packages))

;; DATA LAYER

(define git-extension ".git")

(define installation-source "../source")

(define installation-target ".")

(define strong-type-description-lines
  (list "This tiny library provides a way to wrap an existing type in order to "
	"give it additional meaning."))

(define strong-type-github "https://github.com/doom/strong_type")

(define strong-type-hash "08r10j6qdv18jxsxb4qfs2pfii65by65cmfvn1baag9vv1cd6idf")

(define strong-type-name "strong-type")

(define strong-type-synopsis-lines
  (list "C++ implementation of strong types"))

(define strong-type-version "1.0.3")

;; ABSTRACTION LAYER -2

(define install-everything
  `(list ,installation-source ,installation-target))

(define strong-type-git
  (string-append strong-type-github git-extension))

;; ABSTRACTION LAYER -1

(define install-plan
  `(list ,install-everything))

(define strong-type-content-hash
  (content-hash (base32 strong-type-hash)))

(define strong-type-git-reference
  (git-reference (url strong-type-git)
		 (commit strong-type-version)))

;; ABSTRACTION LAYER -0

(define get-strong-type-arguments
  (list #:install-plan install-plan))

(define get-strong-type-description
  (string-concatenate strong-type-description-lines))

(define get-home-page strong-type-github)

(define get-strong-type-name strong-type-name)

(define get-strong-type-origin
  (origin (uri strong-type-git-reference)
	  (method git-fetch)
	  (hash strong-type-content-hash)))

(define get-strong-type-synopsis
  (string-concatenate strong-type-synopsis-lines))

(define get-strong-type-version strong-type-version)

;; SURFACE LAYER

(define-public strong-type
  (package (name get-strong-type-name)
	   (version get-strong-type-version)
	   (source get-strong-type-origin)
	   (build-system copy-build-system)
	   (arguments get-strong-type-arguments)
	   (synopsis get-strong-type-synopsis)
	   (description get-strong-type-description)
	   (license license:expat)
	   (home-page get-home-page)))