aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorIvan Petkov <ivanppetkov@gmail.com>2019-04-27 21:39:48 -0700
committerDanny Milosavljevic <dannym@scratchpost.org>2019-05-10 00:44:08 +0200
commite88735b45fcfb0c40c6ba4d4076411b7241547f3 (patch)
tree3ad66d80522d7f79eef1107b5753d0f386686ffb /guix
parentd78010b81ee6ef4fd8803082e2f401b9e55b44db (diff)
downloadgnu-guix-e88735b45fcfb0c40c6ba4d4076411b7241547f3.tar
gnu-guix-e88735b45fcfb0c40c6ba4d4076411b7241547f3.tar.gz
build/cargo-utils: Remove "src-name" parameter.
* gnu/packages/gnuzilla.scm (icecat)[arguments]<#:phases> [patch-cargo-checksums]: Delete "null-file" variable. * gnu/packages/rust.scm (%cargo-reference-project-file): Delete variable. * gnu/packages/rust.scm (rust-1.19): Remove reference to "%cargo-reference-project-file". * guix/build/cargo-utils.scm (generate-checksums): Remove "src-name" parameter. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/build/cargo-build-system.scm2
-rw-r--r--guix/build/cargo-utils.scm11
2 files changed, 7 insertions, 6 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index b68a1f90d2..9f44bd6ee9 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -131,7 +131,7 @@ directory = '" port)
;; to store paths.
(copy-recursively "." rsrc)
(touch (string-append rsrc "/.cargo-ok"))
- (generate-checksums rsrc "/dev/null")
+ (generate-checksums rsrc)
(install-file "Cargo.toml" rsrc)
#t))
diff --git a/guix/build/cargo-utils.scm b/guix/build/cargo-utils.scm
index 6af572e611..79e5440378 100644
--- a/guix/build/cargo-utils.scm
+++ b/guix/build/cargo-utils.scm
@@ -41,12 +41,10 @@
(close-pipe port)
result)))
-(define (generate-checksums dir-name src-name)
+(define (generate-checksums dir-name)
"Given DIR-NAME, a store directory, checksum all the files in it one
by one and put the result into the file \".cargo-checksum.json\" in
-the same directory. Also includes the checksum of an extra file
-SRC-NAME as if it was part of the directory DIR-NAME with name
-\"package\"."
+the same directory."
(let* ((file-names (find-files dir-name "."))
(dir-prefix-name (string-append dir-name "/"))
(dir-prefix-name-len (string-length dir-prefix-name))
@@ -62,6 +60,9 @@ SRC-NAME as if it was part of the directory DIR-NAME with name
(write file-relative-name port)
(display ":" port)
(write (file-sha256 file-name) port))) file-names))
+ ;; NB: cargo requires the "package" field in order to check if the Cargo.lock
+ ;; file needs to be regenerated when the value changes. However, it doesn't
+ ;; appear to care what the value is to begin with...
(display "},\"package\":" port)
- (write (file-sha256 src-name) port)
+ (write (file-sha256 "/dev/null") port)
(display "}" port)))))