[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/194: build: cargo-build-system: Check for pregenerated files.
From: |
guix-commits |
Subject: |
06/194: build: cargo-build-system: Check for pregenerated files. |
Date: |
Tue, 3 Oct 2023 14:57:07 -0400 (EDT) |
efraim pushed a commit to branch rust-team
in repository guix.
commit 59ec13fa8e9fe07777c72b56a56195f129c3c232
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sat Sep 30 23:48:56 2023 +0300
build: cargo-build-system: Check for pregenerated files.
* guix/build/cargo-build-system.scm (check-for-pregenerated-files): New
procedure.
(%standard-phases): Add 'check-for-pregenerated-files phase between
'unpack and 'unpack-rust-crates.
---
guix/build/cargo-build-system.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/guix/build/cargo-build-system.scm
b/guix/build/cargo-build-system.scm
index fbba554e9b..9094ea41d1 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -111,6 +111,13 @@ Cargo.toml file present at its root."
(define (rust-package? name)
(string-prefix? "rust-" name))
+(define* (check-for-pregenerated-files #:rest _)
+ "Check the source code for files which are known to generally be bundled
+libraries or executables."
+ (let ((pregenerated-files (find-files "." "\\.(a|dll|exe|lib)$")))
+ (when (not (null-list? pregenerated-files))
+ (error "Possible pre-generated files found:" pregenerated-files))))
+
(define* (configure #:key inputs
(vendor-dir "guix-vendor")
#:allow-other-keys)
@@ -285,7 +292,8 @@ directory = '" port)
(replace 'check check)
(replace 'install install)
(add-after 'build 'package package)
- (add-after 'unpack 'unpack-rust-crates unpack-rust-crates)
+ (add-after 'unpack 'check-for-pregenerated-files
check-for-pregenerated-files)
+ (add-after 'check-for-pregenerated-files 'unpack-rust-crates
unpack-rust-crates)
(add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
patch-cargo-checksums)))
(define* (cargo-build #:key inputs (phases %standard-phases)
- branch rust-team created (now dd72694a93), guix-commits, 2023/10/03
- 02/194: gnu: Add rust-1.70., guix-commits, 2023/10/03
- 01/194: gnu: Add rust-1.69., guix-commits, 2023/10/03
- 06/194: build: cargo-build-system: Check for pregenerated files.,
guix-commits <=
- 08/194: gnu: rust: Build more tools., guix-commits, 2023/10/03
- 05/194: gnu: rust-rustix-0.37: Remove precompiled files., guix-commits, 2023/10/03
- 04/194: gnu: rust: Update to 1.70.0., guix-commits, 2023/10/03
- 14/194: gnu: Add rust-pango-0.17., guix-commits, 2023/10/03
- 10/194: gnu: Add rust-cairo-sys-rs-0.17., guix-commits, 2023/10/03
- 17/194: gnu: Add rust-pangocairo-0.17., guix-commits, 2023/10/03
- 18/194: gnu: Add rust-cssparser-0.29., guix-commits, 2023/10/03
- 24/194: gnu: Add rust-data-url-0.2., guix-commits, 2023/10/03
- 26/194: gnu: Add rust-float-eq-derive-1., guix-commits, 2023/10/03
- 03/194: gnu: rust: Add make-ignore-test-list function., guix-commits, 2023/10/03