From b81e1ea589ccf807d56d03002c0b16f564dc2629 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 17 Sep 2019 17:36:13 +0300 Subject: gnu: Add rust-libssh2-sys. * gnu/packages/crates-io.scm (rust-libssh2-sys): New variable. --- gnu/packages/crates-io.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 4194e4c134..1fd2094043 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -31,6 +31,7 @@ #:use-module (gnu packages llvm) #:use-module (gnu packages maths) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages ssh) #:use-module (gnu packages tls) #:use-module (gnu packages web)) @@ -1592,6 +1593,52 @@ allows loading dynamic libraries (also known as shared libraries) as well as use functions and static variables these libraries contain.") (license license:isc))) +(define-public rust-libssh2-sys + (package + (name "rust-libssh2-sys") + (version "0.2.12") + (source + (origin + (method url-fetch) + (uri (crate-uri "libssh2-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1zb6gsw795nq848nk5x2smzpfnn1s15wjlzjnvr8ihlz2l5x2549")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc) + ("rust-libz-sys" ,rust-libz-sys) + ("rust-openssl-sys" ,rust-openssl-sys)) + #:cargo-development-inputs + (("rust-cc" ,rust-cc) + ("rust-openssl-src" ,rust-openssl-src) + ("rust-pkg-config" ,rust-pkg-config) + ("rust-vcpkg" ,rust-vcpkg)) + #: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))) + (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.") + (license (list license:asl2.0 + license:expat)))) + + (define-public rust-lock-api (package (name "rust-lock-api") -- cgit v1.2.3