mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-30 14:18:38 +02:00
44 lines
1.5 KiB
Scheme
44 lines
1.5 KiB
Scheme
(define-module (glicid utils)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix transformations)
|
|
#:use-module (gnu packages gcc)
|
|
#:use-module (glicid packages gcc)
|
|
#:use-module (gnu packages commencement)
|
|
#:use-module (gnu packages)
|
|
#:export (latest-version)
|
|
#:export (gcc11-instead-of-gcc)
|
|
#:export (gcc10-instead-of-gcc)
|
|
|
|
|
|
)
|
|
;; helper function
|
|
;; return latest version of 2 packages
|
|
|
|
(define (latest-version v1 v2) (if (string> (package-version v1) (package-version v2)) v1 v2))
|
|
|
|
(define gcc11-instead-of-gcc
|
|
;; This is a procedure to replace GCC by GCC11,
|
|
;; recursively.
|
|
; (package-input-rewriting/spec `((,gcc-toolchain . ,(const gcc-toolchain-11)))))
|
|
(package-input-rewriting `(
|
|
(,gcc-toolchain . ,gcc-toolchain-11)
|
|
(,gfortran-toolchain . ,gfortran-toolchain-11)
|
|
)
|
|
)
|
|
)
|
|
|
|
;(define gcc10-instead-of-gcc
|
|
; ;; This is a procedure to replace GCC by GCC10,
|
|
; ;; recursively.
|
|
;; (package-input-rewriting/spec `((,gcc-toolchain . ,(const gcc-toolchain-10)))))
|
|
; (package-input-rewriting `((,gcc-toolchain . ,gcc-toolchain-10))))
|
|
|
|
|
|
|
|
(define (gcc10-instead-of-gcc packagetorewrite)
|
|
(let ((toolchaingcc (specification->package "gcc-toolchain@10"))
|
|
; (toolchaingfortran (specification->package "gfortran-toolchain@10.3.0"))
|
|
)
|
|
(package-with-c-toolchain packagetorewrite `(("toolchaingcc" ,toolchaingcc)
|
|
; ("toulchaingfortran",toolchaingfortran)
|
|
))))
|