summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-01-21 18:49:10 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-01-21 18:49:10 +0200
commitf51fa60b1679c6d06cfe248e901b8df47d71ad77 (patch)
treee30323cbdad7cba3d489f7c1a6d45bff2c109f51
parent5e2ce6afad34cf9faa167406c9b8bd8eac68c078 (diff)
downloadguix-f51fa60b1679c6d06cfe248e901b8df47d71ad77.tar.gz
gnu: rust-pcre2-sys-0.2: Unbundle vendored source.
* gnu/packages/crates-io.scm (rust-pcre2-sys-0.2)[arguments]: Don't skip
build. Add custom phase to delete vendored sources.
[native-inputs]: Add pcre2, pkg-config.
-rw-r--r--gnu/packages/crates-io.scm19
1 files changed, 16 insertions, 3 deletions
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 04a9b49ba5..19a84f5cdb 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -28,6 +28,7 @@
   #:use-module (guix packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
@@ -7548,11 +7549,23 @@ deserialization, and interpreter in Rust.")
          "0nwdvc43dkb89qmm5q8gw1zyll0wsfqw7kczpn23mljra3874v47"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-libc" ,rust-libc-0.2)
         ("rust-pkg-config" ,rust-pkg-config-0.3)
-        ("rust-cc" ,rust-cc-1.0))))
+        ("rust-cc" ,rust-cc-1.0))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'configure 'unbundle-sources
+           (lambda _
+             (delete-file-recursively "pcre2")
+             (delete-file-recursively
+               (string-append "guix-vendor/rust-pcre2-sys-"
+                              ,(package-version rust-pcre2-sys-0.2)
+                              ".tar.gz/pcre2"))
+             #t)))))
+    (native-inputs
+     `(("pcre2" ,pcre2)
+       ("pkg-config" ,pkg-config)))
     (home-page
      "https://github.com/BurntSushi/rust-pcre2")
     (synopsis "Low level bindings to PCRE2")