gnu: d-tools: Use G-expressions.

* gnu/packages/dlang.scm (d-tools)[arguments]:
Rewrite as G-expressions.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
( 2022-06-15 19:53:50 +01:00 committed by Tobias Geerinckx-Rice
parent 5f5a78872e
commit 22e289a67a
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -29,6 +29,7 @@ (define-module (gnu packages dlang)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module ((guix build utils) #:hide (delete which))
#:use-module (guix build-system gnu)
@ -62,21 +63,19 @@ (define-public d-tools
"0c8w373rv6iz3xfid94w40ncv2lr2ncxi662qsr4lda4aghczmq7"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'check) ; There is no Makefile, so there's no 'make check'.
(replace
'build
(lambda _
(setenv "CC" ,(cc-for-target))
(setenv "LD" ,(ld-for-target))
(invoke "ldc2" "rdmd.d")))
(replace
'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(install-file "rdmd" bin)))))))
(list #:phases
#~(modify-phases %standard-phases
(delete 'configure)
(delete 'check) ; There is no Makefile, so there's no 'make check'.
(replace 'build
(lambda _
(setenv "CC" #$(cc-for-target))
(setenv "LD" #$(ld-for-target))
(invoke "ldc2" "rdmd.d")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(install-file "rdmd" bin)))))))
(native-inputs
(list ldc
(module-ref (resolve-interface