summaryrefslogtreecommitdiff
path: root/guix/build/cargo-build-system.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-08-22 16:21:26 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-08-28 09:41:59 +0300
commit3762e31b6c8089928aad3186f70f157502950e3b (patch)
tree9cc9f39e3dfc32ff1964b784b4068892e8e2f281 /guix/build/cargo-build-system.scm
parent4ad7e7e604ef9b1f936b6fa02bb13061ad73c2a5 (diff)
downloadgnu-guix-3762e31b6c8089928aad3186f70f157502950e3b.tar
gnu-guix-3762e31b6c8089928aad3186f70f157502950e3b.tar.gz
build/cargo-build-system: Remove 'update-cargo-lock phase.
* guix/build/cargo-build-system.scm (update-cargo-lock): Remove procedure. (configure): Delete Cargo.lock file if it exists. (%standard-phases): Remove 'update-cargo-lock. * doc/guix.texi (Build System)[cargo-build-system]: Remove references to the 'update-cargo-lock phase.
Diffstat (limited to 'guix/build/cargo-build-system.scm')
-rw-r--r--guix/build/cargo-build-system.scm19
1 files changed, 4 insertions, 15 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 7d363a18a5..06ed14b89f 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -134,22 +134,12 @@ directory = '" port)
;; upgrading the compiler for example.
(setenv "RUSTFLAGS" "--cap-lints allow")
(setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
- #t)
-;; The Cargo.lock file tells the build system which crates are required for
-;; building and hardcodes their version and checksum. In order to build with
-;; the inputs we provide, we need to recreate the file with our inputs.
-(define* (update-cargo-lock #:key
- (vendor-dir "guix-vendor")
- #:allow-other-keys)
- "Regenerate the Cargo.lock file with the current build inputs."
+ ;; We don't use the Cargo.lock file to determine the package versions we use
+ ;; during building, and in any case if one is not present it is created
+ ;; during the 'build phase by cargo.
(when (file-exists? "Cargo.lock")
- (begin
- ;; Unfortunately we can't generate a Cargo.lock file until the checksums
- ;; are generated, so we have an extra round of generate-all-checksums here.
- (generate-all-checksums vendor-dir)
- (delete-file "Cargo.lock")
- (invoke "cargo" "generate-lockfile")))
+ (delete-file "Cargo.lock"))
#t)
;; After the 'patch-generated-file-shebangs phase any vendored crates who have
@@ -203,7 +193,6 @@ directory = '" port)
(replace 'build build)
(replace 'check check)
(replace 'install install)
- (add-after 'configure 'update-cargo-lock update-cargo-lock)
(add-after 'patch-generated-file-shebangs 'patch-cargo-checksums patch-cargo-checksums)))
(define* (cargo-build #:key inputs (phases %standard-phases)