summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-08-12 13:57:44 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-08-12 13:59:44 +0300
commit17c26b7ec52b21f19234eaf160036ad400071eb0 (patch)
treebd2d6e3edff42942c63f9520749e69bdac27baa4 /guix/build
parent5e5cdac0ae128f36c0cd62a671e7760aca3d9c6c (diff)
build/cargo-build-system: Move generate-all-checksums to cargo-utils.
* guix/build/cargo-build-system.scm (generate-all-checksums): Move procedure ... * guix/build/cargo-utils.scm: ... to here.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/cargo-build-system.scm15
-rw-r--r--guix/build/cargo-utils.scm16
2 files changed, 15 insertions, 16 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 7d363a18a5..8aa9390457 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -40,21 +40,6 @@
;;
;; Code:
-;; TODO: Move this to (guix build cargo-utils). Will cause a full rebuild
-;; of all rust compilers.
-
-(define (generate-all-checksums dir-name)
- (for-each
- (lambda (filename)
- (let* ((dir (dirname filename))
- (checksum-file (string-append dir "/.cargo-checksum.json")))
- (when (file-exists? checksum-file) (delete-file checksum-file))
- (display (string-append
- "patch-cargo-checksums: generate-checksums for "
- dir "\n"))
- (generate-checksums dir)))
- (find-files dir-name "Cargo.toml$")))
-
(define (manifest-targets)
"Extract all targets from the Cargo.toml manifest"
(let* ((port (open-input-pipe "cargo read-manifest"))
diff --git a/guix/build/cargo-utils.scm b/guix/build/cargo-utils.scm
index 79e5440378..5ac429a62a 100644
--- a/guix/build/cargo-utils.scm
+++ b/guix/build/cargo-utils.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -22,7 +23,8 @@
#:use-module (guix build utils)
#:use-module (ice-9 popen)
#:use-module (ice-9 rdelim)
- #:export (generate-checksums))
+ #:export (generate-checksums
+ generate-all-checksums))
;; Commentary:
;;
@@ -66,3 +68,15 @@ the same directory."
(display "},\"package\":" port)
(write (file-sha256 "/dev/null") port)
(display "}" port)))))
+
+(define (generate-all-checksums dir-name)
+ (for-each
+ (lambda (filename)
+ (let* ((dir (dirname filename))
+ (checksum-file (string-append dir "/.cargo-checksum.json")))
+ (when (file-exists? checksum-file) (delete-file checksum-file))
+ (display (string-append
+ "patch-cargo-checksums: generate-checksums for "
+ dir "\n"))
+ (generate-checksums dir)))
+ (find-files dir-name "Cargo.toml$")))