summary refs log tree commit diff
diff options
context:
space:
mode:
authorValentin Ignatev <valentignatev@gmail.com>2020-01-20 03:43:57 +0300
committerEfraim Flashner <efraim@flashner.co.il>2020-02-24 11:05:54 +0200
commite78e3be3e5d77166e21f9b42d4fe288df9a8f026 (patch)
tree27e7b76023eaab0ef37420cd2d23fb5f735c41ea
parent873c37b7e7c369b570ae29461e2f58ec152f8ca9 (diff)
downloadguix-e78e3be3e5d77166e21f9b42d4fe288df9a8f026.tar.gz
gnu: Add rust-bzip2-sys-0.1.
* gnu/packages/crates-io.scm (rust-bzip2-sys-0.1): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/packages/crates-io.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 90473b99cd..43411d7a8c 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -1491,6 +1491,43 @@ little-endian.")
        #:cargo-development-inputs
        (("rust-rand" ,rust-rand-0.3))))))
 
+(define-public rust-bzip2-sys-0.1
+  (package
+    (name "rust-bzip2-sys")
+    (version "0.1.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "bzip2-sys" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0pz2mdhkk8yphiqdh2kghdxb60kqyd10lfrjym3r4k5dylvam135"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            (delete-file-recursively "bzip2-1.0.6")
+            (delete-file "build.rs")
+            ;; Inspired by Debian's patch.
+            (with-output-to-file "build.rs"
+              (lambda _
+                (format #t "fn main() {~@
+                        println!(\"cargo:rustc-link-lib=bz2\");~@
+                        }~%")))
+            #t))))
+    (build-system cargo-build-system)
+    (arguments
+     `(#:cargo-inputs
+       (("rust-libc" ,rust-libc-0.2)
+        ("rust-cc" ,rust-cc-1.0))))
+    (home-page "https://github.com/alexcrichton/bzip2-rs")
+    (synopsis "Rust bindings to libbzip2")
+    (description
+     "Bindings to @code{libbzip2} for bzip2 compression and decompression
+exposed as Reader/Writer streams.")
+    (license (list license:expat license:asl2.0))))
+
 (define-public rust-c2-chacha-0.2
   (package
     (name "rust-c2-chacha")