all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fries via Guix-patches via <guix-patches@gnu.org>
To: 64804@debbugs.gnu.org
Cc: Fries <fries1234@protonmail.com>, efraim@flashner.co.il, juli@incana.org
Subject: [bug#64804] [PATCH 2/5] gnu: rust: Add rust-1.70.
Date: Mon, 24 Jul 2023 05:36:36 +0000	[thread overview]
Message-ID: <7e849ca25c4cceb184058d3a897c5462896d5695.1690176958.git.fries1234@protonmail.com> (raw)
In-Reply-To: <MZN9YR.MV79N2FVWSJD@incana.org>

* gnu/packages/rust.scm (rust-1.70): New variable.
---
 .../patches/rust-1.70-fix-rustix-build.patch  | 20 +++++++++++++++++++
 gnu/packages/rust.scm                         | 16 +++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 gnu/packages/patches/rust-1.70-fix-rustix-build.patch

diff --git a/gnu/packages/patches/rust-1.70-fix-rustix-build.patch b/gnu/packages/patches/rust-1.70-fix-rustix-build.patch
new file mode 100644
index 0000000000..a7e2003aff
--- /dev/null
+++ b/gnu/packages/patches/rust-1.70-fix-rustix-build.patch
@@ -0,0 +1,20 @@
+--- a/vendor/fd-lock/Cargo.toml	2023-05-31 14:44:48.000000000 -0700
++++ b/vendor/fd-lock/Cargo.toml	2023-07-14 21:19:34.637702319 -0700
+@@ -45,7 +45,7 @@
+ 
+ [target."cfg(unix)".dependencies.rustix]
+ version = "0.37.0"
+-features = ["fs"]
++features = ["fs", "cc"]
+ 
+ [target."cfg(windows)".dependencies.windows-sys]
+ version = "0.45.0"
+--- a/src/bootstrap/Cargo.lock	2023-07-11 20:32:40.000000000 -0700
++++ b/src/bootstrap/Cargo.lock	2023-07-14 22:41:53.269284713 -0700
+@@ -618,6 +618,7 @@
+ dependencies = [
+  "bitflags",
++ "cc",
+  "errno",
+  "io-lifetimes",
+  "libc",
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index c0738a6064..0b9afd3ea9 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -724,6 +724,22 @@ (define rust-1.69
               (for-each delete-file
                         (find-files "vendor" ".*\\.(a|dll|exe|lib)$")))))))))
 
+(define rust-1.70
+ (let ((base-rust
+         (rust-bootstrapped-package
+          rust-1.69 "1.70.0" "0z6j7d0ni0rmfznv0w3mrf882m11kyh51g2bxkj40l3s1c0axgxj")))
+   (package
+     (inherit base-rust)
+     (source
+      (origin
+        (inherit (package-source base-rust))
+        ;; Rust 1.70 adds the rustix library which depends on the vendored fd-lock
+        ;; crate. The fd-lock crate uses Outline assembly which expects a precompiled
+        ;; static library. Enabling the "cc" feature tells the build.rs script to
+        ;; compile the assembly files instead of searching for a precompiled library.
+        (patches (search-patches "rust-1.70-fix-rustix-build.patch"))
+        (patch-flags '("-p1")))))))
+
 ;;; Note: Only the latest versions of Rust are supported and tested.  The
 ;;; intermediate rusts are built for bootstrapping purposes and should not
 ;;; be relied upon.  This is to ease maintenance and reduce the time
-- 
2.41.0






  parent reply	other threads:[~2023-07-24  7:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-23  6:38 [bug#64804] [PATCH] gnu: rust: Update to Rust 1.71.0 Fries via Guix-patches via
2023-07-23 20:38 ` Juliana Sims
2023-07-24  5:36   ` [bug#64804] [PATCH 1/5] gnu: rust: Add rust-1.69 Fries via Guix-patches via
2023-07-24  5:36   ` Fries via Guix-patches via [this message]
2023-07-24  5:36   ` [bug#64804] [PATCH 3/5] gnu: rust: Add rust-1.71 Fries via Guix-patches via
2023-07-24  5:36   ` [bug#64804] [PATCH 4/5] gnu: rust: Add make-ignore-test-list function Fries via Guix-patches via
2023-07-24  5:36   ` [bug#64804] [PATCH 5/5] gnu: rust: Update to 1.71 Fries via Guix-patches via
2023-07-24  5:51     ` Fries via Guix-patches via
2023-10-01  7:10       ` Efraim Flashner
2023-09-30 15:40 ` [bug#64804] Please merge it Milan Svoboda
2023-10-01  9:30   ` Malte Frank Gerdes
2023-10-01  3:47 ` [bug#64804] [PATCH] gnu: rust: Update to Rust 1.71.0 jaeme via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e849ca25c4cceb184058d3a897c5462896d5695.1690176958.git.fries1234@protonmail.com \
    --to=guix-patches@gnu.org \
    --cc=64804@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=fries1234@protonmail.com \
    --cc=juli@incana.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.