diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 8155bd7a94..ff2f9c52ef 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -5603,10 +5603,13 @@ values of all the exported APIs match the platform that libc is compiled for.") (origin (method url-fetch) (uri (crate-uri "libgit2-sys" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0l9fvki7qxsl97vgzqwlv75nl213a5vxw7b1jaik97ala356pv6r")))) + "0l9fvki7qxsl97vgzqwlv75nl213a5vxw7b1jaik97ala356pv6r")) + (modules '((guix build utils))) + (snippet + '(begin (delete-file-recursively "libgit2") #t)))) (build-system cargo-build-system) (arguments `(#:cargo-inputs @@ -5623,15 +5626,15 @@ values of all the exported APIs match the platform that libc is compiled for.") (lambda* (#:key inputs #:allow-other-keys) (let ((openssl (assoc-ref inputs "openssl"))) (setenv "OPENSSL_DIR" openssl)) - (delete-file-recursively "libgit2") - (delete-file-recursively - (string-append "guix-vendor/rust-libgit2-sys-" - ,(package-version rust-libgit2-sys-0.10) - ".crate/libgit2")) - (delete-file-recursively - (string-append "guix-vendor/rust-libz-sys-" - ,(package-version rust-libz-sys-1.0) - ".crate/src/zlib")) + ;(delete-file-recursively "libgit2") + ;(delete-file-recursively + ; (string-append "guix-vendor/rust-libgit2-sys-" + ; ,(package-version rust-libgit2-sys-0.10) + ; ".crate/libgit2")) + ;(delete-file-recursively + ; (string-append "guix-vendor/rust-libz-sys-" + ; ,(package-version rust-libz-sys-1.0) + ; ".crate/src/zlib")) (delete-file-recursively (string-append "guix-vendor/rust-libssh2-sys-" ,(package-version rust-libssh2-sys-0.2) @@ -6591,10 +6594,13 @@ types as proposed in RFC 1158.") (origin (method url-fetch) (uri (crate-uri "libz-sys" version)) - (file-name (string-append name "-" version ".crate")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1gjycyl2283525abks98bhxa4r259m617xfm5z52p3p3c8ry9d9f")))) + "1gjycyl2283525abks98bhxa4r259m617xfm5z52p3p3c8ry9d9f")) + (modules '((guix build utils))) + (snippet + '(begin (delete-file-recursively "src/zlib") #t)))) (build-system cargo-build-system) (arguments `(#:cargo-inputs @@ -6603,16 +6609,17 @@ types as proposed in RFC 1158.") ("rust-cc" ,rust-cc-1.0) ("rust-pkg-config" ,rust-pkg-config-0.3) ("rust-vcpkg" ,rust-vcpkg-0.2)) - #:phases - (modify-phases %standard-phases - (add-after 'configure 'delete-vendored-zlib - (lambda _ - (delete-file-recursively "src/zlib") - (delete-file-recursively - (string-append "guix-vendor/rust-libz-sys-" - ,(package-version rust-libz-sys-1.0) - ".crate/src/zlib")) - #t))))) + ;#:phases + ;(modify-phases %standard-phases + ; (add-after 'configure 'delete-vendored-zlib + ; (lambda _ + ; (delete-file-recursively "src/zlib") + ; (delete-file-recursively + ; (string-append "guix-vendor/rust-libz-sys-" + ; ,(package-version rust-libz-sys-1.0) + ; ".crate/src/zlib")) + ; #t))) + )) (native-inputs `(("pkg-config" ,pkg-config) ("zlib" ,zlib))) diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 8a8d74ee1b..c2046e5f5a 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -58,7 +58,7 @@ (define (crate-src? path) "Check if PATH refers to a crate source, namely a gzipped tarball with a Cargo.toml file present at its root." - (and (gzip-file? path) + (and (not (directory-exists? path)) ; not a tarball ;; First we print out all file names within the tarball to see if it ;; looks like the source of a crate. However, the tarball will include ;; an extra path component which we would like to ignore (since we're