-
Notifications
You must be signed in to change notification settings - Fork 0
/
rust-src.scm
36 lines (34 loc) · 1.25 KB
/
rust-src.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
(define-module (rust-src)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (gnu packages rust))
(define (rust-source-package rust-pkg)
(package
(name "rust-src")
(version (package-version rust-pkg))
(source (package-source rust-pkg))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(target (string-append
out "/src/rust-" ,version)))
(mkdir-p target)
(copy-recursively "src" target)
#t))))))
(native-search-paths
(list (search-path-specification
(variable "RUST_SRC_PATH")
(files (list (string-append "src/rust-" version))))))
(synopsis (string-append "Sources for: " (package-synopsis rust-pkg)))
(description (string-append "Sources for: " (package-description rust-pkg)))
(home-page (package-home-page rust-pkg))
(license (package-license rust-pkg))))
(define-public rust-src
(rust-source-package rust))