diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-01-21 13:13:08 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-01-21 16:24:01 +0200 |
commit | d7364e85e05a3faae0542d1b6470657863b11410 (patch) | |
tree | 35a046f82cea17cc14f3b80bb3bcb024597b4389 /gnu/packages/crates-io.scm | |
parent | 0c8538545036cfadd548e2c0afeca71d7e63c7fd (diff) | |
download | patches-d7364e85e05a3faae0542d1b6470657863b11410.tar patches-d7364e85e05a3faae0542d1b6470657863b11410.tar.gz |
gnu: rust-libssh2-sys-0.2: Don't hide package.
* gnu/packages/crates-io.scm (rust-libssh2-sys-0.2)[arguments]: Add
rust-libc-0.2, rust-libz-sys-1.0, rust-openssl-sys-0.9, rust-cc-1.0,
rust-pkg-config-0.3, rust-vcpkg-0.2 to cargo-inputs. Add custom phase to
unbundle vendored sources and set environment variables.
[native-inputs]: Add libssh2, openssl, pkg-config, zlib.
[properties]: Remove field.
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)))) |