gnu: rust-average-0.13: Move code changes to snippet.
* gnu/packages/crates-io.scm (rust-average-0.13)[arguments]: Move code relaxing version requirements ... [source]: ... to a snippet. (rust-nalgebra-0.26, rust-nalgebra-macros-0.1, rust-rand-distr-0.4, rust-statrs-0.14)[arguments]: Adjust accordingly.
This commit is contained in:
		
							parent
							
								
									210bc02c50
								
							
						
					
					
						commit
						408d78d3ef
					
				
					 1 changed files with 13 additions and 19 deletions
				
			
		| 
						 | 
					@ -5248,20 +5248,18 @@ they're not available.")
 | 
				
			||||||
       (uri (crate-uri "average" version))
 | 
					       (uri (crate-uri "average" version))
 | 
				
			||||||
       (file-name (string-append name "-" version ".tar.gz"))
 | 
					       (file-name (string-append name "-" version ".tar.gz"))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32 "1c97m8yagvq8r6qgd3harm5vnkdbld4mxg9byyxh6igjsf8wfgl4"))))
 | 
					        (base32 "1c97m8yagvq8r6qgd3harm5vnkdbld4mxg9byyxh6igjsf8wfgl4"))
 | 
				
			||||||
 | 
					       (modules '((guix build utils)))
 | 
				
			||||||
 | 
					       (snippet
 | 
				
			||||||
 | 
					        '(begin
 | 
				
			||||||
 | 
					           (substitute* "Cargo.toml"
 | 
				
			||||||
 | 
					             ;; The resolver feature is not supported by our versions of Cargo.
 | 
				
			||||||
 | 
					             (("resolver = \"2\".*") "")
 | 
				
			||||||
 | 
					             ;; Relax version requirement for byteorder
 | 
				
			||||||
 | 
					             (("=1.3") "^1.3"))))))
 | 
				
			||||||
    (build-system cargo-build-system)
 | 
					    (build-system cargo-build-system)
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:phases
 | 
					     `(#:cargo-inputs
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					 | 
				
			||||||
         (add-after 'configure 'patch-Cargo.toml
 | 
					 | 
				
			||||||
           (lambda _
 | 
					 | 
				
			||||||
             (substitute* '("guix-vendor/rust-average-0.13.1.tar.gz/Cargo.toml"
 | 
					 | 
				
			||||||
                            "Cargo.toml")
 | 
					 | 
				
			||||||
               ;; The resolver feature is not supported by this version of Cargo.
 | 
					 | 
				
			||||||
               (("resolver = \"2\".*") "")
 | 
					 | 
				
			||||||
               ;; Relax!
 | 
					 | 
				
			||||||
               (("1.3") ,(package-version rust-byteorder-1))))))
 | 
					 | 
				
			||||||
       #:cargo-inputs
 | 
					 | 
				
			||||||
       (("rust-easy-cast" ,rust-easy-cast-0.4)
 | 
					       (("rust-easy-cast" ,rust-easy-cast-0.4)
 | 
				
			||||||
        ("rust-float-ord" ,rust-float-ord-0.3)
 | 
					        ("rust-float-ord" ,rust-float-ord-0.3)
 | 
				
			||||||
        ("rust-num-traits" ,rust-num-traits-0.2)
 | 
					        ("rust-num-traits" ,rust-num-traits-0.2)
 | 
				
			||||||
| 
						 | 
					@ -35753,8 +35751,7 @@ quick compile time, and minimal dependencies.")
 | 
				
			||||||
         (add-after 'configure 'patch-Cargo.toml
 | 
					         (add-after 'configure 'patch-Cargo.toml
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (substitute* '("Cargo.toml"
 | 
					             (substitute* '("Cargo.toml"
 | 
				
			||||||
                            "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml"
 | 
					                            "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml")
 | 
				
			||||||
                            "guix-vendor/rust-average-0.13.1.tar.gz/Cargo.toml")
 | 
					 | 
				
			||||||
               ;; The resolver feature is not supported by this version of Cargo.
 | 
					               ;; The resolver feature is not supported by this version of Cargo.
 | 
				
			||||||
               (("resolver = \"2\".*") "")))))
 | 
					               (("resolver = \"2\".*") "")))))
 | 
				
			||||||
        #:cargo-inputs
 | 
					        #:cargo-inputs
 | 
				
			||||||
| 
						 | 
					@ -35930,8 +35927,7 @@ statically-sized or dynamically-sized matrices.")
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (substitute* '("Cargo.toml"
 | 
					             (substitute* '("Cargo.toml"
 | 
				
			||||||
                            "guix-vendor/rust-nalgebra-macros-0.1.0.tar.gz/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-0.26.2.tar.gz/Cargo.toml")
 | 
				
			||||||
                            "guix-vendor/rust-average-0.13.1.tar.gz/Cargo.toml")
 | 
					 | 
				
			||||||
               ;; The resolver feature is not supported by this version of Cargo.
 | 
					               ;; The resolver feature is not supported by this version of Cargo.
 | 
				
			||||||
               (("resolver = \"2\".*") "")))))
 | 
					               (("resolver = \"2\".*") "")))))
 | 
				
			||||||
       #:cargo-inputs
 | 
					       #:cargo-inputs
 | 
				
			||||||
| 
						 | 
					@ -46959,8 +46955,7 @@ tools for implementation.")
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					       (modify-phases %standard-phases
 | 
				
			||||||
         (add-after 'configure 'patch-Cargo.toml
 | 
					         (add-after 'configure 'patch-Cargo.toml
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (substitute* '("Cargo.toml"
 | 
					             (substitute* "Cargo.toml"
 | 
				
			||||||
                            "guix-vendor/rust-average-0.13.1.tar.gz/Cargo.toml")
 | 
					 | 
				
			||||||
               ;; The resolver feature is not supported by this version of Cargo.
 | 
					               ;; The resolver feature is not supported by this version of Cargo.
 | 
				
			||||||
               (("resolver = \"2\".*") "")))))
 | 
					               (("resolver = \"2\".*") "")))))
 | 
				
			||||||
       #:cargo-inputs
 | 
					       #:cargo-inputs
 | 
				
			||||||
| 
						 | 
					@ -58246,7 +58241,6 @@ map.")
 | 
				
			||||||
         (add-after 'configure 'patch-Cargo.toml
 | 
					         (add-after 'configure 'patch-Cargo.toml
 | 
				
			||||||
           (lambda _
 | 
					           (lambda _
 | 
				
			||||||
             (substitute* '("Cargo.toml"
 | 
					             (substitute* '("Cargo.toml"
 | 
				
			||||||
                            "guix-vendor/rust-average-0.13.1.tar.gz/Cargo.toml"
 | 
					 | 
				
			||||||
                            "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml")
 | 
					                            "guix-vendor/rust-nalgebra-0.26.2.tar.gz/Cargo.toml")
 | 
				
			||||||
               ;; The resolver feature is not supported by this version of Cargo.
 | 
					               ;; The resolver feature is not supported by this version of Cargo.
 | 
				
			||||||
               (("resolver = \"2\".*") "")))))
 | 
					               (("resolver = \"2\".*") "")))))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue