diff options
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/cargo-build-system.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index c7ca98105c..0a95672b00 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -91,11 +91,17 @@ Cargo.toml file present at its root." (mkdir-p "target/package") (mkdir-p vendor-dir) ;; TODO: copy only regular inputs to target/package, not native-inputs. - (for-each (lambda (input-crate) - (copy-recursively (string-append input-crate - "/share/cargo/registry") - "target/package")) - (delete-duplicates rust-inputs)) + (for-each + (lambda (input-crate) + (for-each + (lambda (packaged-crate) + (unless + (file-exists? + (string-append "target/package/" (basename packaged-crate))) + (install-file packaged-crate "target/package/"))) + (find-files + (string-append input-crate "/share/cargo/registry") "\\.crate$"))) + (delete-duplicates rust-inputs)) (for-each (lambda (crate) (invoke "tar" "xzf" crate "-C" vendor-dir)) |