guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36841] [PATCH] build/cargo-build-system: Patch cargo checksums.


From: Efraim Flashner
Subject: [bug#36841] [PATCH] build/cargo-build-system: Patch cargo checksums.
Date: Tue, 30 Jul 2019 11:17:57 +0300
User-agent: Mutt/1.12.1 (2019-06-15)

On Mon, Jul 29, 2019 at 06:44:31PM -0700, Ivan Petkov wrote:
> Hi Efraim,
> 
> > On Jul 29, 2019, at 12:04 PM, Efraim Flashner <address@hidden> wrote:
> > 
> > +;; After patching the 'patch-generated-file-shebangs phase any vendored 
> > crates
> > +;; will have a mismatch on their checksum.
> > +(define* (patch-cargo-checksums #:key
> > +                                (vendor-dir "guix-vendor")
> > +                                #:allow-other-keys)
> 
> [snip]
> 
> > +    (replace 'install install)
> > +    (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums 
> > patch-cargo-checksums)))
> 
> I can’t quite remember the order the phases run in off the top of my head. 
> Would it be possible to
> make the configure/checksum generation phase run after shebang-patching (or 
> ensure the patching
> happens first)? It would avoid having to checksum all the files twice that 
> way…

The 'configure phase could be renamed the plop-vendored-crates-into-place
phase. It actually can't come after the 'patch-generated-file-shebangs
phase since then there won't be any vendored crates to patch.

If we remove the generate-checksums call from 'configure then there
won't be a .cargo-checksum.json to remove and regenerate during the
'patch-cargo-checksums phase, so I've changed that to search for
"Cargo.toml$" and not delete it. Not as robust as "for each top-level
directory in the 'vendor-dir'", but should be good enough.

-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: 0001-build-cargo-build-system-Patch-cargo-checksums.patch
Description: Text document

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]