summaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2025-07-02 11:41:28 +0300
committerHilton Chain <hako@ultrarare.space>2025-08-21 19:09:03 +0800
commit7b7f4f58c358d36eb116f94731e793bc01b82e15 (patch)
treee6f503ce7bb72983e4dfb0e05023bc22c11f31f9 /gnu/packages/rust.scm
parent3fa7d009209540020e6949bda0ee92a69093927d (diff)
gnu: Add rust-1.87.
* gnu/packages/rust.scm (rust-1.87): New variable. Change-Id: Ic7a6d98595f222109c720d3dd81f6180e8746add Signed-off-by: Hilton Chain <hako@ultrarare.space>
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index f445516df9c..fbf6613c330 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1359,6 +1359,51 @@ safety and thread safety guarantees.")
1359 (substitute* "config.toml" 1359 (substitute* "config.toml"
1360 (("\\[rust\\]") "[rust]\nlld = false"))))))))))) 1360 (("\\[rust\\]") "[rust]\nlld = false")))))))))))
1361 1361
1362(define-public rust-1.87
1363 (let ((base-rust
1364 (rust-bootstrapped-package rust-1.86 "1.87.0"
1365 "0xlfzl24qhs4vlwn7d2hd2zkg6k2y1lgq03rx2j2sndy57yvk6ql")))
1366 (package
1367 (inherit base-rust)
1368 (source
1369 (origin
1370 (inherit (package-source base-rust))
1371 (snippet
1372 '(begin
1373 (for-each delete-file-recursively
1374 '("src/llvm-project"
1375 "vendor/jemalloc-sys-0.3.2"
1376 "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
1377 "vendor/openssl-src-111.17.0+1.1.1m/openssl"
1378 "vendor/openssl-src-300.4.2+3.4.1/openssl"
1379 "vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
1380 "vendor/tikv-jemalloc-sys-0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/jemalloc"))
1381 ;; Remove vendored dynamically linked libraries.
1382 ;; find . -not -type d -executable -exec file {} \+ | grep ELF
1383 ;; Also remove the bundled (mostly Windows) libraries.
1384 (for-each delete-file
1385 (find-files "vendor" "\\.(a|dll|exe|lib)$"))
1386 ;; Adjust vendored dependency to explicitly use rustix with libc backend.
1387 (substitute* '("vendor/tempfile-3.14.0/Cargo.toml"
1388 "vendor/tempfile-3.15.0/Cargo.toml"
1389 "vendor/tempfile-3.17.1/Cargo.toml")
1390 (("features = \\[\"fs\"" all)
1391 (string-append all ", \"use-libc\"")))))))
1392 (arguments
1393 (substitute-keyword-arguments (package-arguments base-rust)
1394 ((#:phases phases)
1395 `(modify-phases ,phases
1396 (replace 'build
1397 ;; Just building stage 1 no longer builds cargo.
1398 (lambda* (#:key parallel-build? #:allow-other-keys)
1399 (let ((job-spec (string-append
1400 "-j" (if parallel-build?
1401 (number->string (parallel-job-count))
1402 "1"))))
1403 (invoke "./x.py" job-spec "build" "--stage=2"
1404 "library/std"
1405 "src/tools/cargo")))))))))))
1406
1362(define (make-ignore-test-list strs) 1407(define (make-ignore-test-list strs)
1363 "Function to make creating a list to ignore tests a bit easier." 1408 "Function to make creating a list to ignore tests a bit easier."
1364 (map (lambda (str) 1409 (map (lambda (str)