diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2019-09-17 17:42:15 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2019-09-17 19:40:09 +0300 |
commit | 4bf8cd217a2d6d70f9bb506bbc1491cbeec172c3 (patch) | |
tree | 39b857477ff45cddb48fad08bd8f57547b3529da /gnu | |
parent | b81e1ea589ccf807d56d03002c0b16f564dc2629 (diff) | |
download | guix-4bf8cd217a2d6d70f9bb506bbc1491cbeec172c3.tar.gz |
gnu: Add rust-libgit2-sys.
* gnu/packages/crates-io.scm (rust-libgit2-sys): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/crates-io.scm | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 1fd2094043..e1a893a14d 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -33,6 +33,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) #:use-module (gnu packages web)) ;;; @@ -1566,6 +1567,51 @@ the platform that libc is compiled for.") (license (list license:expat license:asl2.0)))) +(define-public rust-libgit2-sys + (package + (name "rust-libgit2-sys") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (crate-uri "libgit2-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0y2mibmx7wy91s2kmb2gfb29mrqlqaxpy5wcwr8s1lwws7b9w5sc")) )) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-libc" ,rust-libc) + ("rust-libssh2-sys" ,rust-libssh2-sys) + ("rust-libz-sys" ,rust-libz-sys) + ("rust-openssl-sys" ,rust-openssl-sys)) + #:cargo-development-inputs + (("rust-cc" ,rust-cc) + ("rust-pkg-config" ,rust-pkg-config)) + #: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 "libgit2") + (setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1") + (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") + #t))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libgit2" ,libgit2) + ("openssl" ,openssl) + ("zlib" ,zlib))) + (home-page "https://github.com/rust-lang/git2-rs") + (synopsis "Native bindings to the libgit2 library") + (description + "This package provides native rust bindings to the @code{libgit2} library.") + (license (list license:asl2.0 + license:expat)))) + (define-public rust-libloading (package (name "rust-libloading") |