From 9dd784bacee8f3d3aed6e25520a4fd049be0597d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 11 May 2022 11:13:28 +0300 Subject: [PATCH] gnu: rust-nalgebra-0.26: Move code changes to snippet. * gnu/packages/crates-io.scm (rust-nalgebra-0.26)[arguments]: Move code relaxing version requirements ... [source]: ... to a snippet. (rust-nalgebra-macros-0.1, rust-statrs-0.14)[arguments]: Adjust accordingly. --- gnu/packages/crates-io.scm | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index c3718bea72..bfd8e42b7d 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -35742,18 +35742,16 @@ quick compile time, and minimal dependencies.") (uri (crate-uri "nalgebra" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "01hxksmgg17c4k2rzjx1h8kkjbw9rm81dsancg459zh2zrcisva7")))) + (base32 "01hxksmgg17c4k2rzjx1h8kkjbw9rm81dsancg459zh2zrcisva7")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "Cargo.toml" + ;; The resolver feature is not supported by our versions of Cargo. + (("resolver = \"2\".*") "")))))) (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:phases - (modify-phases %standard-phases - (add-after 'configure 'patch-Cargo.toml - (lambda _ - (substitute* '("Cargo.toml" - "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml") - ;; The resolver feature is not supported by this version of Cargo. - (("resolver = \"2\".*") ""))))) #:cargo-inputs (("rust-abomonation" ,rust-abomonation-0.7) ("rust-alga" ,rust-alga-0.9) @@ -35926,8 +35924,7 @@ statically-sized or dynamically-sized matrices.") (add-after 'configure 'patch-Cargo.toml (lambda _ (substitute* '("Cargo.toml" - "guix-vendor/rust-nalgebra-macros-0.1.0.tar.gz/Cargo.toml" - "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml") + "guix-vendor/rust-nalgebra-macros-0.1.0.tar.gz/Cargo.toml") ;; The resolver feature is not supported by this version of Cargo. (("resolver = \"2\".*") ""))))) #:cargo-inputs @@ -58236,14 +58233,6 @@ map.") (build-system cargo-build-system) (arguments `(#:skip-build? #t - #:phases - (modify-phases %standard-phases - (add-after 'configure 'patch-Cargo.toml - (lambda _ - (substitute* '("Cargo.toml" - "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml") - ;; The resolver feature is not supported by this version of Cargo. - (("resolver = \"2\".*") ""))))) #:cargo-inputs (("rust-approx" ,rust-approx-0.4) ("rust-lazy-static" ,rust-lazy-static-1)