From b2602e02046c21636c86b71247a1988ee71616bb Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 2 Feb 2023 12:14:31 +0100 Subject: [PATCH] contrib: use unpublished rustc 1.64 to build the GUI in Guix --- contrib/reproducible/guix/manifest.scm | 33 ++++++++++++++++++-------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/contrib/reproducible/guix/manifest.scm b/contrib/reproducible/guix/manifest.scm index 8bba3395..72ddb0cf 100644 --- a/contrib/reproducible/guix/manifest.scm +++ b/contrib/reproducible/guix/manifest.scm @@ -1,15 +1,28 @@ -(specifications->manifest - (append - (list "rust" - "rust:cargo" - "coreutils" - "patchelf" - "gcc-toolchain@10.3.0") - ;; Additional dependencies for building the GUI - (let ((is_gui (getenv "IS_GUI"))) +(let ((is_gui (getenv "IS_GUI"))) + (concatenate-manifests + (list + (specifications->manifest + (append + (list + "rust:cargo" + "coreutils" + "patchelf" + "gcc-toolchain@10.3.0") + ;; Additional dependencies for building the GUI, and the regular rustc for building + ;; the daemon and CLI. (if (string=? is_gui "1") (list "pkg-config" "eudev" "fontconfig") - '())))) + (list "rust")))) + ;; The GUI MSRV is 1.65. We could patch the requirements for new compiler features but + ;; Iced 0.7 started relying on a lifetime that was treated as a bug until rustc 1.64. I + ;; couldn't find how to fix it therefore we are relying on a Rust toolchain unpublished + ;; by Guix to build the GUI. + (packages->manifest + (if + (string=? is_gui "1") + (list + (@@ (gnu packages rust) rust-1.64)) + '())))))