gnu: rust-openssl-sys-0.9: Don't skip build.
authorEfraim Flashner <efraim@flashner.co.il>
Wed, 5 Feb 2020 18:59:54 +0000 (20:59 +0200)
committerEfraim Flashner <efraim@flashner.co.il>
Thu, 6 Feb 2020 08:48:16 +0000 (10:48 +0200)
* gnu/packages/crates-io.scm (rust-openssl-sys-0.9)[source]: Add patch.
[arguments]: Don't skip build.
* gnu/packages/patches/rust-openssl-sys-no-vendor.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

gnu/local.mk
gnu/packages/crates-io.scm
gnu/packages/patches/rust-openssl-sys-no-vendor.patch [new file with mode: 0644]

index 0096010..f105f11 100644 (file)
@@ -1378,6 +1378,7 @@ dist_patch_DATA =                                         \
   %D%/packages/patches/rust-bootstrap-stage0-test.patch                \
   %D%/packages/patches/rust-coresimd-doctest.patch             \
   %D%/packages/patches/rust-reproducible-builds.patch           \
+  %D%/packages/patches/rust-openssl-sys-no-vendor.patch        \
   %D%/packages/patches/rxvt-unicode-escape-sequences.patch     \
   %D%/packages/patches/sbcl-graph-asdf-definitions.patch       \
   %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch  \
index b9836ca..ebd6ea5 100644 (file)
@@ -26,6 +26,7 @@
   #:use-module (guix download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages pcre)
@@ -7403,19 +7404,18 @@ system for OpenSSL.")
       (origin
         (method url-fetch)
         (uri (crate-uri "openssl-sys" version))
-        (file-name (string-append name "-" version ".crate"))
+        (file-name (string-append name "-" version ".tar.gz"))
         (sha256
-         (base32 "0vvk8vzrc73y8n5rf4yj3x8ygyxjaz7wxrbxiwqi7qy0gyp1cpa6"))))
+         (base32 "0vvk8vzrc73y8n5rf4yj3x8ygyxjaz7wxrbxiwqi7qy0gyp1cpa6"))
+        (patches (search-patches "rust-openssl-sys-no-vendor.patch"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:skip-build? #t ; it wants rust-openssl-src
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-libc" ,rust-libc-0.2)
         ;; Build dependencies:
         ("rust-autocfg" ,rust-autocfg-0.1)
         ("rust-cc" ,rust-cc-1.0)
         ("rust-pkg-config" ,rust-pkg-config-0.3)
-        ;("rust-openssl-src" ,rust-openssl-src-111)
         ("rust-vcpkg" ,rust-vcpkg-0.2))
        #:phases
        (modify-phases %standard-phases
diff --git a/gnu/packages/patches/rust-openssl-sys-no-vendor.patch b/gnu/packages/patches/rust-openssl-sys-no-vendor.patch
new file mode 100644 (file)
index 0000000..78a6b5e
--- /dev/null
@@ -0,0 +1,23 @@
+https://sources.debian.org/data/main/r/rust-openssl-sys/0.9.53-1/debian/patches/disable-vendor.patch
+"MIT" licensed according to debian/copyright file
+slightly modified to only change the vendored openssl-src dependency
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -31,14 +31,11 @@
+ [build-dependencies.cc]
+ version = "1.0"
+-[build-dependencies.openssl-src]
+-version = "111.0.1"
+-optional = true
+-
+ [build-dependencies.pkg-config]
+ version = "0.3.9"
+ [features]
+ vendored = ["openssl-src"]
++openssl-src = []
+ [target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg]
+ version = "0.2"
+