I made a follow-up on fediverse: https://social.boiledscript.com/notes/a4kcjwcgon
In short: Package crates as origins, limit them in one module, so there won't be variables duplicated within one Guix channel. Every Guix channel can have their own such file to avoid API breakage, since origins produce deterministic outputs, downloading of crates from different channels can be deduplicated. --8<---------------cut here---------------start------------->8--- (define-module (gnu packages rust-crates)) ;; Generated crates. (define-public rust-... (origin ...) ... ;; Crates dependencies for one app, also generated. (define-public app-cargo-inputs (list rust-... ...)) ... --8<---------------cut here---------------end--------------->8--- Apps are kept out of the very module, depending on an intermediate variable to save lines in non-generated modules: --8<---------------cut here---------------start------------->8--- (define-module ... #:use-module (gnu packages rust-crates)) (define-public app ... (inputs app-cargo-inputs)) --8<---------------cut here---------------end--------------->8--- I'm working on the generator in: https://git.boiledscript.com/hako/guix/commits/branch/origin-crates Next step is to integrate cargo2guix, I expect to have a working demo within this week.