diff options
Diffstat (limited to 'gnu/packages/crates-io.scm')
-rw-r--r-- | gnu/packages/crates-io.scm | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 60664e3e17..5c6d760208 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -28,6 +28,7 @@ #:use-module (guix packages) #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages ssh) #:use-module (gnu packages tls) #:use-module (gnu packages version-control)) @@ -5688,27 +5689,42 @@ functions and static variables these libraries contain.") (base32 "1zb6gsw795nq848nk5x2smzpfnn1s15wjlzjnvr8ihlz2l5x2549")))) (build-system cargo-build-system) - ;(arguments - ; `(#:phases - ; (modify-phases %standard-phases - ; (add-after 'unpack 'find-openssl - ; (lambda* (#:key inputs #:allow-other-keys) - ; (let ((openssl (assoc-ref inputs "openssl"))) - ; (setenv "OPENSSL_DIR" openssl)) - ; (delete-file-recursively "libssh2") - ; (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") - ; #t))))) - ;(native-inputs - ; `(("pkg-config" ,pkg-config))) - ;(inputs - ; `(("libssh2" ,libssh2) - ; ("openssl" ,openssl) - ; ("zlib" ,zlib))) + (arguments + `(#:skip-build? #t ; it wants rust-openssl-src + #:cargo-inputs + (("rust-libc" ,rust-libc-0.2) + ("rust-libz-sys" ,rust-libz-sys-1.0) + ("rust-openssl-sys" ,rust-openssl-sys-0.9) + ;; Build dependencies: + ("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 'dont-vendor-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((openssl (assoc-ref inputs "openssl"))) + (setenv "OPENSSL_DIR" openssl)) + (delete-file-recursively "libssh2") + (delete-file-recursively + (string-append "guix-vendor/rust-libssh2-sys-" + ,(package-version rust-libssh2-sys-0.2) + ".crate/libssh2")) + (delete-file-recursively + (string-append "guix-vendor/rust-libz-sys-" + ,(package-version rust-libz-sys-1.0) + ".crate/src/zlib")) + (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") + #t))))) + (native-inputs + `(("libssh2" ,libssh2) + ("openssl" ,openssl) + ("pkg-config" ,pkg-config) + ("zlib" ,zlib))) (home-page "https://github.com/alexcrichton/ssh2-rs") (synopsis "Native bindings to the libssh2 library") (description "This package provides native rust bindings to the @code{libssh2} library.") - (properties '((hidden? . #t))) (license (list license:asl2.0 license:expat)))) |