forked from jsoo1/guix-channel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cargo.scm
55 lines (52 loc) · 1.52 KB
/
cargo.scm
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
(define-module (cargo)
#:use-module (gnu packages rust)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (ice-9 match))
(define-public (cargo-for rust)
(package
(inherit rust)
(name "cargo")
(version (package-version rust))
(source (package-source rust))
(build-system trivial-build-system)
(inputs `(("cargo" ,rust "cargo")))
(outputs '("out"))
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((cargo (assoc-ref %build-inputs "cargo"))
(out (assoc-ref %outputs "out")))
(mkdir-p out)
(copy-recursively cargo out)))))
(home-page (package-home-page rust))
(synopsis (package-synopsis rust))
(description (package-description rust))
(license (package-license rust))))
(define rusts
`((rust . ,rust)
(rust-1.36 . ,rust-1.36)
(rust-1.35 . ,rust-1.35)
(rust-1.34 . ,rust-1.34)
(rust-1.33 . ,rust-1.33)
(rust-1.32 . ,rust-1.32)
(rust-1.31 . ,rust-1.31)
(rust-1.30 . ,rust-1.30)
(rust-1.29 . ,rust-1.29)
(rust-1.28 . ,rust-1.28)
(rust-1.27 . ,rust-1.27)
(rust-1.26 . ,rust-1.26)
(rust-1.25 . ,rust-1.25)
(rust-1.24 . ,rust-1.24)
(rust-1.23 . ,rust-1.23)
(rust-1.22 . ,rust-1.22)
(rust-1.21 . ,rust-1.21)
(rust-1.20 . ,rust-1.20)))
(for-each
(match-lambda
((n . r)
(eval `(define-public ,n (cargo-for ,r)) (current-module))))
rusts)