guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55903] [PATCH v2 02/35] gnu: Add go-github-com-creack-pty.


From: Maxime Devos
Subject: [bug#55903] [PATCH v2 02/35] gnu: Add go-github-com-creack-pty.
Date: Mon, 13 Jun 2022 09:43:05 +0200
User-agent: Evolution 3.38.3-1

( via Guix-patches via schreef op ma 13-06-2022 om 07:56 [+0100]:
> +(define (gnu-triplet->go-architecture target)
> +  (letrec-syntax
> +      ((matches (syntax-rules (=>)
> +                  ((_ (target-prefix => architecture) rest ...)
> +                   (if (string-prefix? target-prefix target)
> +                     architecture
> +                     (matches rest ...)))
> +                  ((_) (error "unsupported target" target)))))
> +    (matches ("x86_64"      => "amd64")
> +             ("i686"        => "386")
> +             ("aarch64"     => "arm64")
> +             ("arm"         => "arm")
> +             ("powerpc64le" => "ppc64le")
> +             ("powerpc"     => "ppc")
> +             ("mips64el"    => "mips64le")
> +             ("riscv64"     => "riscv64"))))


This looks like 'go-target' in (guix build-system go)?
(Haven't looked at the rest of the revised patches)

> +                       (with-output-to-file file
> +                         (lambda () (display text))))))))))

You can avoid global state here by using call-with-output-file.

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]