;;; Copyright © 2015, 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2015 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2017 Frederick Muriithi <fredmanglis@gmail.com>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages gdb)
#:use-module (gnu packages libedit)
#:use-module (gnu packages llvm)
#:use-module (gnu packages python)
- #:use-module (gnu packages textutils)
- #:use-module (gnu packages zip))
+ #:use-module (gnu packages textutils))
(define-public rdmd
(package
(license license:boost1.0)))
(define-public ldc-bootstrap
- (package
- (name "ldc")
- (version "0.17.3")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/ldc-developers/ldc/archive/v"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "135rgwwk82ccqp4n3fhqz4696jmvip90fg5ql2kccq5h1r71gb82"))))
- (build-system cmake-build-system)
- (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-submodule-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((unpack (lambda (source target)
- (with-directory-excursion target
- (zero? (system* "tar" "xvf"
- (assoc-ref inputs source)
- "--strip-components=1"))))))
- (and (unpack "phobos-src" "runtime/phobos")
- (unpack "druntime-src" "runtime/druntime")
- (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))))
- (add-after 'unpack-submodule-sources 'patch-dmd2
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "dmd2/root/port.c"
- ((" ::isnan") " isnan")
- ((" ::isinf") " isinf")
- (("#undef isnan") "")
- (("#undef isinf") ""))
- #t))
- (add-after 'unpack-submodule-sources 'patch-phobos
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "runtime/phobos/std/process.d"
- (("/bin/sh") (which "sh"))
- (("echo") (which "echo")))
- (substitute* "runtime/phobos/std/datetime.d"
- (("/usr/share/zoneinfo/")
- (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
- (substitute* "tests/d2/dmd-testsuite/Makefile"
- (("/bin/bash") (which "bash")))
- #t)))))
- (inputs
- `(("libconfig" ,libconfig)
- ("libedit" ,libedit)
- ("tzdata" ,tzdata)
- ("zlib" ,zlib)))
- (native-inputs
- `(("llvm" ,llvm)
- ("clang" ,clang)
- ("python-lit" ,python-lit)
- ("python-wrapper" ,python-wrapper)
- ("unzip" ,unzip)
- ("phobos-src"
- ,(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/ldc-developers/phobos/archive/ldc-v"
- version ".tar.gz"))
- (sha256
- (base32
- "0qywnvnp019mmmr74aw90ir9f03iz0hc7cgzna609agsar0b27jl"))
- (patches (search-patches "ldc-disable-tests.patch"))))
- ("druntime-src"
- ,(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/ldc-developers/druntime/archive/ldc-v"
- version ".tar.gz"))
- (sha256
- (base32
- "0z418n6x2fxac07sxpi4rl69069qiym4w6r9sjppn91q58qh8hjs"))))
- ("dmd-testsuite-src"
- ,(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v"
- version ".tar.gz"))
- (sha256
- (base32
- "196mkfax5y3yqm3gz7jhqhnkjwrvr2m4a8nc9k41l0511ldzsk9x"))))))
- (home-page "http://wiki.dlang.org/LDC")
- (synopsis "LLVM compiler for the D programming language")
- (description
- "LDC is a compiler for the D programming language. It is based on the
+ (let ((runtime-version "0.17.3"))
+ (package
+ (name "ldc")
+ (version "0.17.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ldc-developers/ldc/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1kw0j378k6bh0k66dvx99bjq8ilp8bb24w3jrmibn8rhmqv0d5q8"))))
+ (build-system cmake-build-system)
+ (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-submodule-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((unpack (lambda (source target)
+ (with-directory-excursion target
+ (zero? (system* "tar" "xvf"
+ (assoc-ref inputs source)
+ "--strip-components=1"))))))
+ (and (unpack "phobos-src" "runtime/phobos")
+ (unpack "druntime-src" "runtime/druntime")
+ (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")))))
+ (add-after 'unpack-submodule-sources 'patch-dmd2
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "dmd2/root/port.c"
+ ((" ::isnan") " isnan")
+ ((" ::isinf") " isinf")
+ (("#undef isnan") "")
+ (("#undef isinf") ""))
+ #t))
+ (add-after 'unpack-submodule-sources 'patch-phobos
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "runtime/phobos/std/process.d"
+ (("/bin/sh") (which "sh"))
+ (("echo") (which "echo")))
+ (substitute* "runtime/phobos/std/datetime.d"
+ (("/usr/share/zoneinfo/")
+ (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
+ (substitute* "tests/d2/dmd-testsuite/Makefile"
+ (("/bin/bash") (which "bash")))
+ ;; FIXME: this test cannot be linked.
+ (delete-file "tests/d2/dmd-testsuite/runnable/cppa.d")
+ #t)))))
+ (inputs
+ `(("libconfig" ,libconfig)
+ ("libedit" ,libedit)
+ ("tzdata" ,tzdata)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("llvm" ,llvm)
+ ("clang" ,clang)
+ ("python-lit" ,python-lit)
+ ("python-wrapper" ,python-wrapper)
+ ("unzip" ,unzip)
+ ("phobos-src"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ldc-developers/phobos/archive/ldc-v"
+ runtime-version ".tar.gz"))
+ (sha256
+ (base32
+ "0qywnvnp019mmmr74aw90ir9f03iz0hc7cgzna609agsar0b27jl"))
+ (patches (search-patches "ldc-disable-tests.patch"))))
+ ("druntime-src"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ldc-developers/druntime/archive/ldc-v"
+ runtime-version ".tar.gz"))
+ (sha256
+ (base32
+ "0z418n6x2fxac07sxpi4rl69069qiym4w6r9sjppn91q58qh8hjs"))))
+ ("dmd-testsuite-src"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v"
+ runtime-version ".tar.gz"))
+ (sha256
+ (base32
+ "196mkfax5y3yqm3gz7jhqhnkjwrvr2m4a8nc9k41l0511ldzsk9x"))))))
+ (home-page "http://wiki.dlang.org/LDC")
+ (synopsis "LLVM compiler for the D programming language")
+ (description
+ "LDC is a compiler for the D programming language. It is based on the
latest DMD frontend and uses LLVM as backend.")
- ;; Most of the code is released under BSD-3, except for code originally
- ;; written for GDC, which is released under GPLv2+, and the DMD frontend,
- ;; which is released under the "Boost Software License version 1.0".
- (license (list license:bsd-3
- license:gpl2+
- license:boost1.0))))
-
+ ;; Most of the code is released under BSD-3, except for code originally
+ ;; written for GDC, which is released under GPLv2+, and the DMD frontend,
+ ;; which is released under the "Boost Software License version 1.0".
+ (license (list license:bsd-3
+ license:gpl2+
+ license:boost1.0)))))
(define-public ldc
;; The phobos, druntime and dmd-testsuite dependencies do not have a newer
(define-public dub
(package
(name "dub")
- (version "1.2.0")
+ (version "1.5.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/dlang/dub/archive/"
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1sd8i1rvxc7y7kk0y6km5zyvaladc5zh56r6afj74ndd63dssv43"))))
+ "1p9pmzjsmd7v3jpilv0z0c8ar1ykvri6nn5fv95f8d2vriczj29m"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; it would have tested itself by installing some packages (vibe etc)
#:phases
(modify-phases %standard-phases
- (delete 'configure)
+ (delete 'configure) ; no configure script
(replace 'build
(lambda _
(zero? (system* "./build.sh"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (outbin (string-append out "/bin")))
- (mkdir-p outbin)
- (install-file "bin/dub" outbin)
+ (bin (string-append out "/bin")))
+ (install-file "bin/dub" bin)
#t))))))
(inputs
`(("curl" ,curl)))
(native-inputs
`(("ldc" ,ldc)))
(home-page "https://code.dlang.org/getting_started")
- (synopsis "DUB package manager")
- (description "This package provides the D package manager.")
+ (synopsis "Package and build manager for D projects")
+ (description
+ "DUB is a package and build manager for applications and libraries written
+in the D programming language. It can automatically retrieve a project's
+dependencies and integrate them in the build process.
+
+The design emphasis is on maximum simplicity for simple projects, while
+providing the opportunity to customize things when needed. ")
(license license:expat)))