me
/
guix
Archived
1
0
Fork 0

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.
master
Efraim Flashner 2020-01-21 13:13:08 +02:00
parent 0c85385450
commit d7364e85e0
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 33 additions and 17 deletions

View File

@ -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))))