aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-09-17 17:36:13 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-09-17 19:40:09 +0300
commitb81e1ea589ccf807d56d03002c0b16f564dc2629 (patch)
tree33104dd304b841f177fb4796b1c21d1ee0581759 /gnu
parente416c930084fbbed02f46f0197ce2fe2669b29b7 (diff)
downloadpatches-b81e1ea589ccf807d56d03002c0b16f564dc2629.tar
patches-b81e1ea589ccf807d56d03002c0b16f564dc2629.tar.gz
gnu: Add rust-libssh2-sys.
* gnu/packages/crates-io.scm (rust-libssh2-sys): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/crates-io.scm47
1 files changed, 47 insertions, 0 deletions
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")