From patchwork Mon Apr 7 20:07:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morgan Smith X-Patchwork-Id: 41417 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 46EFC27BC49; Mon, 7 Apr 2025 21:09:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A1B0B27BC4B for ; Mon, 7 Apr 2025 21:09:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u1smH-0006IA-Pb; Mon, 07 Apr 2025 16:09:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u1smG-0006He-0M for guix-patches@gnu.org; Mon, 07 Apr 2025 16:09:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u1smF-0007u4-MG for guix-patches@gnu.org; Mon, 07 Apr 2025 16:09:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=FsvLrZatyQ8d2UbQSp49dFxweskLdT9EqwvmRQk2aDc=; b=vM1RQbsjLueU7X6tfQOTML3K6BvN6iFCX4PHEcbP3n9qdeQ8h09jZTkFJh4SU82PH6QmH8IkKh7uTOKDOl/aW94t5aLHN8nr8nEqbU0qEli8j4RoQ8VpY35xMQGnmrIBlcIO8nnAslLNS3ltcJPQHjVSlVlNQSqYrmeXaik2DKibGWKZCjKXMtgfrZBMrWTvuvede5hYoDOohvz/MZItLDDVjuI+cDhWUMxuO8VjQJgV0HUOR5eyqJUVep0FqFzhC6TFO++Id8HnzmibKXoFoA63No5M5Yf7CQbYRT6EVuXZMz3UsFt8JofimSGmrJY2yI5iWUvJCxhKD6uYWAtMAg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u1smF-00043Z-0s; Mon, 07 Apr 2025 16:09:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77616] [PATCH 3/6] gnu: rust-1.75: Inherit from rust-bootstrap. Resent-From: Morgan Smith Original-Sender: "Debbugs-submit" Resent-CC: divya@subvertising.org, efraim@flashner.co.il, steve@futurile.net, guix-patches@gnu.org Resent-Date: Mon, 07 Apr 2025 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77616 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77616@debbugs.gnu.org Cc: Morgan Smith , Divya Ranjan Pattanaik , Efraim Flashner , Steve George X-Debbugs-Original-Xcc: Divya Ranjan Pattanaik , Efraim Flashner , Steve George Received: via spool by 77616-submit@debbugs.gnu.org id=B77616.174405650415407 (code B ref 77616); Mon, 07 Apr 2025 20:09:02 +0000 Received: (at 77616) by debbugs.gnu.org; 7 Apr 2025 20:08:24 +0000 Received: from localhost ([127.0.0.1]:57039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u1slb-00040N-Gn for submit@debbugs.gnu.org; Mon, 07 Apr 2025 16:08:24 -0400 Received: from mail-dm6nam12olkn20817.outbound.protection.outlook.com ([2a01:111:f403:2c17::817]:25953 helo=NAM12-DM6-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u1slX-0003z0-5D for 77616@debbugs.gnu.org; Mon, 07 Apr 2025 16:08:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SnXMkTwKpSrxEJ4N/mk63hHUtOIK9AsR02URF1lIJ/tFWUNViBglVSv3ZriFz59SnpgvLzg3aY9HqZLAbql1XgAR2XSDwla4jynx278+7nBco9rfSi0DPcPSMHSmFXbyReLKdMOTjIU0yQ9qDiqXAoUdQZMmEkEpjrWsr7FKzSzWpR9w/9xVXhVwm7HBpPurCNRhGtGRRh/0XisMbSo3myTygWEWe30OYgPxKBqt/qZ2gdxq8d0EcHin0ZapmSCAHOOm736ZkNfEI9MLx1G0ZcC4ITFh8vcfeDSy0kG8u3V31fK34hsdIsDEJSOtVHPxLGZa7NZ+TSAzh7+q63Hwrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FsvLrZatyQ8d2UbQSp49dFxweskLdT9EqwvmRQk2aDc=; b=alfyuwXqP9VmpWojN5HY/rhz+QNiI3+wRwFsdMXAIX77B5wQKCoGLHF81kbVT5vI7Hdfq3W4PmR5b2G0Vyf6IMwFoB/beBMNqns7q2Ryzo8FQlKtGK+8zwMOs3oQ0xRNTJwEtFzRMwZczDHFdH7id9KJ0fyDNMIrOvprHpnpKytrXxm9EFu0S7Jc7/m5K5ijT9egeFMdBGLeVv88Mwad/nB7UPFu9CpVFERZNbh8WmyoGTrBmQIVAu85QqHDvHMt++3ezr45ce5TUzbevB6wCzPTkkq0xDUQsGmAoaIptekOY++FQHOAydhMJNqUMbbBwIIHB+AbSUvdE5j39O2jBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FsvLrZatyQ8d2UbQSp49dFxweskLdT9EqwvmRQk2aDc=; b=khs592UIDiws26pzcKW8IPUR7w6UcIpHYo9GYVac+0JxVLODdyII/Nkb94ggjvOg13MXWlNtxCVpZdtRZhoMerotUqXq4Tp88q+ow2s1B+3uUxp4vx9U0kepetpyWD661YdjW0h7iSg4jQ3A+r5BSavOSk04u6SI4rymIS2EGJmYOzEE5Q4Ll0TwaJ3KuCCp50RmPd4piiPSthX9FJ68sdLanXCifexet4GcqlTpPUvYyj5047/lkr+vgf7Soz/Fs7QDIxWuikF0KpxQbZl2/eFZWkLM+3fvQSYM12CBOnA5XEG2HDkTNf8IS3IpiqyvknQbpC8NrXZ7vM9ArIlCzQ== Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) by DS0PR84MB3589.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:8:1b8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8606.31; Mon, 7 Apr 2025 20:08:14 +0000 Received: from CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef]) by CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM ([fe80::5c77:7a58:48ed:9aef%5]) with mapi id 15.20.8606.033; Mon, 7 Apr 2025 20:08:14 +0000 From: Morgan Smith Date: Mon, 7 Apr 2025 16:07:47 -0400 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: <2141283854b61187d507f0dfaf768e3416e09845.1744056453.git.Morgan.J.Smith@outlook.com> References: <2141283854b61187d507f0dfaf768e3416e09845.1744056453.git.Morgan.J.Smith@outlook.com> X-ClientProxiedBy: YQZPR01CA0115.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:83::8) To CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:610:1c4::17) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR84MB3424:EE_|DS0PR84MB3589:EE_ X-MS-Office365-Filtering-Correlation-Id: 39806e44-89db-41d9-68f8-08dd760fed2a X-Microsoft-Antispam: BCL:0; ARA:14566002|461199028|8060799006|15080799006|7092599003|19110799003|5072599009|41001999003|440099028|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: bZ3woY2JZt/EGqCESvt1ystvarBLnnCxxpeWQwsOl5Ux+fr0kc7KVu0d1lThaTIk1f8QTkzwLtyLZ9hVHDZUzfSsToyQ0BkY1D15a3Z3KaNgKgSuC68MdK0LVjbkOpOa8IQlxituRudIy+flxLkZZ2GzBb76jDJb7l0aVEf46QvhBP98GwUfi7S6LdiA8zLpw0QbPnhUnVktatAS6CsxCzgzYvl+YV5W4Qer2Nh2qFNKhiuTpTk+MAWOB7S2mWwPl4wzc7yR8YutuOKLjIJfKCMXConLS61ls96KDcLLHSjo4lcXoborjVGzmlHMwLgsGQdF2Vqf13rfvCSv/cEdz948dLaO4V8B1quadb+aC3YgPBBcqLmhbRPhoVce4mTGeC646dk24txpkkDBjKMBGJxyY/ygwjbN0R0ot4KVhyhNjqacGlApnlnJ07DKRI8RVBCbb9MvuMoj3NK3/uUSq75kLe6QxMQ7nzKuczmKE74PgejqD/ttBiKFM3E7IyXYqn3W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.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2025 20:08:14.3549 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR84MB3589 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/rust.scm (rust-1.75): Inherit from rust-bootstrap. (rust-1.75): Remove variable. Change-Id: I8474b703baebfcb7b1e5442a6593c22039997924 --- gnu/packages/rust.scm | 227 ++++++++++++++++++++---------------------- 1 file changed, 109 insertions(+), 118 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 66703abc35..ccedfd2c74 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -341,87 +341,71 @@ (define-public rust-bootstrap ;; Dual licensed. (license (list license:asl2.0 license:expat)))) -(define-public rust-1.55 +(define-public rust-1.75 (package (name "rust") - (version "1.55.0") + (version "1.75.0") (source (origin - (method url-fetch) + (inherit (package-source rust-bootstrap)) (uri (rust-uri version)) - (sha256 (base32 "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj")) - (modules '((guix build utils))) - (snippet - '(begin - (for-each delete-file-recursively - '("src/llvm-project" - "vendor/openssl-src/openssl" - "vendor/tikv-jemalloc-sys/jemalloc")) - ;; Remove vendored dynamically linked libraries. - ;; find . -not -type d -executable -exec file {} \+ | grep ELF - (delete-file "vendor/vte/vim10m_match") - (delete-file "vendor/vte/vim10m_table") - ;; Also remove the bundled (mostly Windows) libraries. - ;; find vendor -not -type d -exec file {} \+ | grep PE32 - (for-each delete-file - (find-files "vendor" "\\.(a|dll|exe|lib)$")) - ;; Add support for riscv64-linux. - (substitute* "vendor/tikv-jemallocator/src/lib.rs" - ((" target_arch = \"s390x\"," all) - (string-append all "\n target_arch = \"riscv64\","))))))) + (sha256 (base32 "1260mf3066ki6y55pvr35lnf54am6z96a3ap3hniwd4xpi2rywsv")) + (patches '()))) (outputs '("out" "cargo")) (properties '((hidden? . #t) (timeout . 72000) ;20 hours (max-silent-time . 18000))) ;5 hours (for armel) (build-system gnu-build-system) (arguments - `(#:validate-runpath? #f - ;; Only the final Rust is tested, not the intermediate bootstrap ones, - ;; for performance and simplicity. - #:tests? #f - #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums' - #:modules ((guix build cargo-utils) + (list + #:disallowed-references (list rust-bootstrap) + #:validate-runpath? #f + ;; Only the final Rust is tested, not the intermediate bootstrap ones, + ;; for performance and simplicity. + #:tests? #f + #:imported-modules %cargo-utils-modules ;for `generate-all-checksums' + #:modules '((guix build cargo-utils) (guix build utils) (guix build gnu-build-system) (ice-9 match) (srfi srfi-1)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-env - (lambda* (#:key inputs #:allow-other-keys) - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (setenv "CC" (search-input-file inputs "/bin/gcc")) - ;; The Guix LLVM package installs only shared libraries. - (setenv "LLVM_LINK_SHARED" "1"))) - (add-after 'unpack 'set-linker-locale-to-utf8 - (lambda _ - (substitute* (find-files "." "^linker.rs$") - (("linker.env\\(\"LC_ALL\", \"C\"\\);") - "linker.env(\"LC_ALL\", \"C.UTF-8\");")))) - (add-after 'unpack 'add-cc-shim-to-path - (lambda _ - (mkdir-p "/tmp/bin") - (symlink (which "gcc") "/tmp/bin/cc") - (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH"))))) - (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (gcc (assoc-ref inputs "gcc")) - (python (assoc-ref inputs "python")) - (binutils (assoc-ref inputs "binutils")) - (rustc (assoc-ref inputs "rustc-bootstrap")) - (cargo (assoc-ref inputs "cargo-bootstrap")) - (llvm (assoc-ref inputs "llvm"))) - (call-with-output-file "config.toml" - (lambda (port) - (display (string-append " + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-env + (lambda* (#:key inputs #:allow-other-keys) + (setenv "SHELL" (which "sh")) + (setenv "CONFIG_SHELL" (which "sh")) + (setenv "CC" (search-input-file inputs "/bin/gcc")) + ;; The Guix LLVM package installs only shared libraries. + (setenv "LLVM_LINK_SHARED" "1"))) + (add-after 'unpack 'set-linker-locale-to-utf8 + (lambda _ + (substitute* (find-files "." "^linker.rs$") + (("linker.env\\(\"LC_ALL\", \"C\"\\);") + "linker.env(\"LC_ALL\", \"C.UTF-8\");")))) + (add-after 'unpack 'add-cc-shim-to-path + (lambda _ + (mkdir-p "/tmp/bin") + (symlink (which "gcc") "/tmp/bin/cc") + (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH"))))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (gcc (assoc-ref inputs "gcc")) + (python (search-input-file inputs "/bin/python")) + (binutils (assoc-ref inputs "binutils")) + (rustc (search-input-file inputs "/bin/rustc")) + (cargo (search-input-file inputs "/bin/cargo")) + (llvm (assoc-ref inputs "llvm"))) + (call-with-output-file "config.toml" + (lambda (port) + (display (string-append " [llvm] [build] -cargo = \"" cargo "/bin/cargo" "\" -rustc = \"" rustc "/bin/rustc" "\" +cargo = \"" cargo "\" +rustc = \"" rustc "\" docs = false -python = \"" python "/bin/python" "\" +python = \"" python "\" vendor = true submodules = false [install] @@ -433,69 +417,76 @@ (define-public rust-1.55 default-linker = \"" gcc "/bin/gcc" "\" channel = \"stable\" rpath = true -[target." ,(platform-rust-target (lookup-platform-by-system (%current-system))) "] +[target." #$(platform-rust-target (lookup-platform-by-system (%current-system))) "] llvm-config = \"" llvm "/bin/llvm-config" "\" cc = \"" gcc "/bin/gcc" "\" cxx = \"" gcc "/bin/g++" "\" ar = \"" binutils "/bin/ar" "\" [dist] ") port)))))) - (replace 'build - ;; The standard library source location moved in this release. - (lambda* (#:key parallel-build? #:allow-other-keys) - (let ((job-spec (string-append - "-j" (if parallel-build? - (number->string (parallel-job-count)) - "1")))) - (invoke "./x.py" job-spec "build" "--stage=1" - "library/std" - "src/tools/cargo")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (cargo-out (assoc-ref outputs "cargo")) - (build (string-append "build/" - ,(platform-rust-target - (lookup-platform-by-target-or-system - (or (%current-target-system) - (%current-system))))))) - ;; Manually do the installation instead of calling './x.py - ;; install', as that is slow and needlessly rebuilds some - ;; things. - (install-file (string-append build "/stage1/bin/rustc") - (string-append out "/bin")) - (copy-recursively (string-append build "/stage1/lib") - (string-append out "/lib")) - (install-file (string-append build "/stage1-tools-bin/cargo") - (string-append cargo-out "/bin"))))) - (add-after 'install 'delete-install-logs - (lambda* (#:key outputs #:allow-other-keys) - (for-each (lambda (f) - (false-if-exception (delete-file f))) - (append-map (lambda (output) - (find-files (string-append - output "/lib/rustlib") - "(^install.log$|^manifest-)")) - (map cdr outputs))))) - (add-after 'install 'wrap-rustc - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc")) - (ld-wrapper (assoc-ref inputs "ld-wrapper"))) - ;; Let gcc find ld and libc startup files. - (wrap-program (string-append out "/bin/rustc") - `("PATH" ":" prefix (,(string-append ld-wrapper "/bin"))) - `("LIBRARY_PATH" ":" - suffix (,(string-append libc "/lib")))))))))) + (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums + (lambda _ + (substitute* (cons* "Cargo.lock" + "src/bootstrap/Cargo.lock" + (find-files "src/tools" "Cargo.lock")) + (("(checksum = )\".*\"" all name) + (string-append name "\"" #$%cargo-reference-hash "\""))) + (generate-all-checksums "vendor"))) + (replace 'build + ;; The standard library source location moved in this release. + (lambda* (#:key parallel-build? #:allow-other-keys) + (let ((job-spec (string-append + "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1")))) + (invoke "./x.py" job-spec "build" "--stage=1" + "library/std" + "src/tools/cargo")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (cargo-out (assoc-ref outputs "cargo")) + (build (string-append "build/" + #$(platform-rust-target + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system))))))) + ;; Manually do the installation instead of calling './x.py + ;; install', as that is slow and needlessly rebuilds some + ;; things. + (install-file (string-append build "/stage1/bin/rustc") + (string-append out "/bin")) + (copy-recursively (string-append build "/stage1/lib") + (string-append out "/lib")) + (install-file (string-append build "/stage1-tools-bin/cargo") + (string-append cargo-out "/bin"))))) + (add-after 'install 'delete-install-logs + (lambda* (#:key outputs #:allow-other-keys) + (for-each (lambda (f) + (false-if-exception (delete-file f))) + (append-map (lambda (output) + (find-files (string-append + output "/lib/rustlib") + "(^install.log$|^manifest-)")) + (map cdr outputs))))) + (add-after 'install 'wrap-rustc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (libc (assoc-ref inputs "libc")) + (ld-wrapper (assoc-ref inputs "ld-wrapper"))) + ;; Let gcc find ld and libc startup files. + (wrap-program (string-append out "/bin/rustc") + `("PATH" ":" prefix (,(string-append ld-wrapper "/bin"))) + `("LIBRARY_PATH" ":" + suffix (,(string-append libc "/lib")))))))))) (native-inputs - `(("pkg-config" ,pkg-config) - ("python" ,python-minimal-wrapper) - ("rustc-bootstrap" ,rust-bootstrap) - ("cargo-bootstrap" ,rust-bootstrap "cargo"))) + (list + pkg-config + python-minimal-wrapper + rust-bootstrap + `(,rust-bootstrap "cargo"))) (inputs - `(("bash" ,bash-minimal) - ("llvm" ,llvm-13) - ("openssl" ,openssl))) + (list bash-minimal llvm-15 openssl)) ;; rustc invokes gcc, so we need to set its search paths accordingly. (native-search-paths %gcc-search-paths)