gnu: dub: Update to 1.23.0.

This also fixes Dub's build, which was previously failing because of how
ancient it was.

* gnu/packages/dlang.scm (dub): Update to 1.23.0.
[arguments]: Set target CC & LD environment variables.
Invoke build.d.  Don't explicitly return #t from phases.
[native-inputs]: Add d-tools and ld-gold-wrapper.

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 f3c5074373
commit b438836833
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -442,7 +442,7 @@ (define (gnu-triplet->clang-arch system)
(define-public dub
(package
(name "dub")
(version "1.7.2")
(version "1.23.0")
(source
(origin
(method git-fetch)
@ -451,7 +451,7 @@ (define-public dub
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9"))))
(base32 "06a4whsl1m600k096nwif83n7za3vr7pj1xwapncy5fcad1gmady"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; it would have tested itself by installing some packages (vibe etc)
@ -460,17 +460,22 @@ (define-public dub
(delete 'configure) ; no configure script
(replace 'build
(lambda _
(invoke "./build.sh")))
(setenv "CC" ,(cc-for-target))
(setenv "LD" ,(ld-for-target))
(invoke "./build.d")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "bin/dub" bin)
#t))))))
(install-file "bin/dub" bin)))))))
(inputs
(list curl))
(native-inputs
(list ldc))
(list d-tools
ldc
(module-ref (resolve-interface
'(gnu packages commencement))
'ld-gold-wrapper)))
(home-page "https://code.dlang.org/getting_started")
(synopsis "Package and build manager for D projects")
(description