2016-01-05 14:43:50 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2016-02-22 21:01:39 +00:00
|
|
|
;;; Copyright © 2015, 2016 Roel Janssen <roel@gnu.org>
|
2018-09-09 15:57:42 +00:00
|
|
|
;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
|
2017-01-06 14:51:18 +00:00
|
|
|
;;; Copyright © 2017 Frederick Muriithi <fredmanglis@gmail.com>
|
2017-04-06 12:32:06 +00:00
|
|
|
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
|
2019-04-08 21:12:45 +00:00
|
|
|
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
2016-01-05 14:43:50 +00:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2018-09-10 15:46:58 +00:00
|
|
|
(define-module (gnu packages dlang)
|
2016-01-05 14:43:50 +00:00
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix download)
|
2016-02-22 21:01:39 +00:00
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module (guix build-system gnu)
|
2016-01-05 14:43:50 +00:00
|
|
|
#:use-module (guix build-system cmake)
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages base)
|
gnu: Move testing packages from python.scm to check.scm.
* gnu/packages/python.scm (python-behave-web-api, python2-behave-web-api,
python-mock, python2-mock, python-mock-2, python-nose, python2-nose,
python-nose2, python2-nose2, python-unittest2, python2-unittest2,
python-pytest, python2-pytest, python-pytest-3.0, python2-pytest-3.0,
python-pytest-cov, python2-pytest-cov, python-pytest-runner,
python2-pytest-runner, python-pytest-mock, python2-pytest-mock,
python-pytest-xdist, python2-pytest-xdist, python-scripttest,
python2-scripttest, python-testtools, python2-testtools, python-testscenarios,
python2-testscenarios, python-testresources, python2-testresources,
python-subunit, python2-subunit, python-fixtures, python2-fixtures,
python-testrepository, python2-testrepository, python-coverage,
python2-coverage, python-cov-core, python2-cov-core, python-testpath,
python2-testpath, python-testlib, python2-testlib, python-pytest-cache,
python2-pytest-cache, python-pytest-localserver, python-pytest-xprocess,
python-pytest-subtesthack, python2-pytest-subtesthack, python-hypothesis,
python2-hypothesis, python-lit, python2-lit, python-pytest-pep8,
python2-pytest-pep8, python-pytest-flakes, python2-pytest-flakes,
python2-coverage-test-runner, python-pylint, python2-pylint,
python-paramunittest, python2-python-paramunittest, python-pytest-warnings,
python2-pytest-warnings, python-pytest-capturelog, python2-pytest-capturelog,
python-pytest-catchlog, python2-pytest-catchlog, python-nosexcover,
python2-nosexcover, python-discover, python2-discover, behave, python-rednose,
python2-rednose, python-nose-randomly, python2-nose-randomly,
python-nose-timer, python2-nose-timer): Move from here...
* gnu/packages/check.scm: ...to here.
* gnu/packages/admin.scm,
gnu/packages/android.scm,
gnu/packages/backup.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/calendar.scm,
gnu/packages/dav.scm,
gnu/packages/django.scm,
gnu/packages/freedesktop.scm,
gnu/packages/haskell.scm,
gnu/packages/image.scm,
gnu/packages/irc.scm,
gnu/packages/jrnl.scm,
gnu/packages/ldc.scm,
gnu/packages/libffi.scm,
gnu/packages/mail.scm,
gnu/packages/mpd.scm,
gnu/packages/openstack.scm,
gnu/packages/package-management.scm,
gnu/packages/password-utils.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/rdf.scm,
gnu/packages/statistics.scm,
gnu/packages/storage.scm,
gnu/packages/time.scm,
gnu/packages/tls.scm,
gnu/packages/tor.scm,
gnu/packages/tryton.scm: Adjust accordingly.
2017-11-17 20:42:23 +00:00
|
|
|
#:use-module (gnu packages check)
|
2016-09-13 10:30:41 +00:00
|
|
|
#:use-module (gnu packages compression)
|
2017-01-29 22:46:33 +00:00
|
|
|
#:use-module (gnu packages curl)
|
2017-01-06 14:51:18 +00:00
|
|
|
#:use-module (gnu packages gdb)
|
2016-01-05 14:43:50 +00:00
|
|
|
#:use-module (gnu packages libedit)
|
|
|
|
#:use-module (gnu packages llvm)
|
2016-11-26 04:17:30 +00:00
|
|
|
#:use-module (gnu packages python)
|
gnu: Separate Python core packages from the rest.
* gnu/packages/python.scm: Move hundreds of package definitions from here...
* gnu/packages/python-xyz.scm: ...to this new module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/ada.scm,
gnu/packages/admin.scm,
gnu/packages/android.scm,
gnu/packages/audio.scm,
gnu/packages/backup.scm,
gnu/packages/benchmark.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/bittorrent.scm,
gnu/packages/calendar.scm,
gnu/packages/check.scm,
gnu/packages/chemistry.scm,
gnu/packages/cluster.scm,
gnu/packages/compression.scm,
gnu/packages/connman.scm,
gnu/packages/crypto.scm,
gnu/packages/cups.scm,
gnu/packages/databases.scm,
gnu/packages/dav.scm,
gnu/packages/direct-connect.scm,
gnu/packages/disk.scm,
gnu/packages/django.scm,
gnu/packages/dlang.scm,
gnu/packages/docker.scm,
gnu/packages/ebook.scm,
gnu/packages/elf.scm,
gnu/packages/emacs.scm,
gnu/packages/emulators.scm,
gnu/packages/engineering.scm,
gnu/packages/enlightenment.scm,
gnu/packages/finance.scm,
gnu/packages/fltk.scm,
gnu/packages/fontutils.scm,
gnu/packages/freedesktop.scm,
gnu/packages/game-development.scm,
gnu/packages/games.scm,
gnu/packages/geo.scm,
gnu/packages/gl.scm,
gnu/packages/glib.scm,
gnu/packages/gnome.scm,
gnu/packages/gnupg.scm,
gnu/packages/gnuzilla.scm,
gnu/packages/graph.scm,
gnu/packages/graphics.scm,
gnu/packages/graphviz.scm,
gnu/packages/gtk.scm,
gnu/packages/ham-radio.scm,
gnu/packages/image-processing.scm,
gnu/packages/image-viewers.scm,
gnu/packages/image.scm,
gnu/packages/irc.scm,
gnu/packages/jrnl.scm,
gnu/packages/julia.scm,
gnu/packages/kde-frameworks.scm,
gnu/packages/key-mon.scm,
gnu/packages/libffi.scm,
gnu/packages/libreoffice.scm,
gnu/packages/libusb.scm,
gnu/packages/lirc.scm,
gnu/packages/logging.scm,
gnu/packages/machine-learning.scm,
gnu/packages/mail.scm,
gnu/packages/mate.scm,
gnu/packages/maths.scm,
gnu/packages/medical.scm,
gnu/packages/messaging.scm,
gnu/packages/monitoring.scm,
gnu/packages/mp3.scm,
gnu/packages/mpd.scm,
gnu/packages/music.scm,
gnu/packages/networking.scm,
gnu/packages/nutrition.scm,
gnu/packages/openldap.scm,
gnu/packages/openstack.scm,
gnu/packages/package-management.scm,
gnu/packages/password-utils.scm,
gnu/packages/patchutils.scm,
gnu/packages/pdf.scm,
gnu/packages/photo.scm,
gnu/packages/polkit.scm,
gnu/packages/protobuf.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/qt.scm,
gnu/packages/rdf.scm,
gnu/packages/ruby.scm,
gnu/packages/search.scm,
gnu/packages/selinux.scm,
gnu/packages/serialization.scm,
gnu/packages/shells.scm,
gnu/packages/simulation.scm,
gnu/packages/ssh.scm,
gnu/packages/statistics.scm,
gnu/packages/storage.scm,
gnu/packages/sync.scm,
gnu/packages/terminals.scm,
gnu/packages/textutils.scm,
gnu/packages/time.scm,
gnu/packages/tls.scm,
gnu/packages/tor.scm,
gnu/packages/tryton.scm,
gnu/packages/version-control.scm,
gnu/packages/video.scm,
gnu/packages/virtualization.scm,
gnu/packages/vpn.scm,
gnu/packages/web-browsers.scm,
gnu/packages/web.scm,
gnu/packages/wicd.scm,
gnu/packages/xdisorg.scm,
gnu/packages/xorg.scm: Update module references.
2019-01-15 13:21:30 +00:00
|
|
|
#:use-module (gnu packages python-xyz)
|
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-12 18:40:01 +00:00
|
|
|
#:use-module (gnu packages textutils))
|
2016-01-05 14:43:50 +00:00
|
|
|
|
2016-02-22 21:01:39 +00:00
|
|
|
(define-public rdmd
|
2017-02-10 11:19:07 +00:00
|
|
|
(package
|
|
|
|
(name "rdmd")
|
2018-02-18 06:09:44 +00:00
|
|
|
(version "2.077.1")
|
2017-02-10 11:19:07 +00:00
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "https://github.com/dlang/tools/archive/v" version ".tar.gz"))
|
|
|
|
(file-name (string-append name "-" version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2018-02-18 06:09:44 +00:00
|
|
|
"0c8w373rv6iz3xfid94w40ncv2lr2ncxi662qsr4lda4aghczmq7"))))
|
2017-02-10 11:19:07 +00:00
|
|
|
(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 _
|
2018-02-21 01:51:13 +00:00
|
|
|
(invoke "ldc2" "rdmd.d")))
|
2017-02-10 11:19:07 +00:00
|
|
|
(replace
|
|
|
|
'install
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
|
|
|
|
(install-file "rdmd" bin)))))))
|
|
|
|
(native-inputs
|
|
|
|
`(("ldc" ,ldc)))
|
|
|
|
(home-page "https://github.com/D-Programming-Language/tools/")
|
|
|
|
(synopsis "Specialized equivalent to 'make' for the D language")
|
|
|
|
(description
|
|
|
|
"rdmd is a companion to the dmd compiler that simplifies the typical
|
2016-02-22 21:01:39 +00:00
|
|
|
edit-compile-link-run or edit-make-run cycle to a rapid edit-run cycle. Like
|
|
|
|
make and other tools, rdmd uses the relative dates of the files involved to
|
|
|
|
minimize the amount of work necessary. Unlike make, rdmd tracks dependencies
|
|
|
|
and freshness without requiring additional information from the user.")
|
2017-02-10 11:19:07 +00:00
|
|
|
(license license:boost1.0)))
|
2016-02-22 21:01:39 +00:00
|
|
|
|
2017-02-01 09:51:31 +00:00
|
|
|
(define-public ldc-bootstrap
|
2017-06-10 23:48:35 +00:00
|
|
|
(package
|
|
|
|
(name "ldc")
|
|
|
|
(version "0.17.4")
|
2019-04-08 21:12:45 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/ldc.git")
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0nnrjavfmpfp7bib04isqlxvyzh6mlvsdan0gxysdz96hlg4hcq8"))))
|
2017-06-10 23:48:35 +00:00
|
|
|
(build-system cmake-build-system)
|
|
|
|
(supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
|
2018-02-18 06:09:44 +00:00
|
|
|
(properties
|
|
|
|
;; Some of the tests take a very long time on ARMv7. See
|
|
|
|
;; <https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00312.html>.
|
|
|
|
`((max-silent-time . ,(* 3600 3))))
|
2017-06-10 23:48:35 +00:00
|
|
|
(arguments
|
|
|
|
`(#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'unpack-submodule-sources
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
2019-04-08 21:12:45 +00:00
|
|
|
(let ((unpack (lambda (input target)
|
|
|
|
(let ((source (assoc-ref inputs input)))
|
|
|
|
;; Git checkouts are directories as long as
|
|
|
|
;; there are no patches; tarballs otherwise.
|
|
|
|
(if (file-is-directory? source)
|
|
|
|
(copy-recursively source target)
|
|
|
|
(with-directory-excursion target
|
|
|
|
(invoke "tar" "xvf" source
|
|
|
|
"--strip-components=1")))))))
|
2019-03-26 20:31:07 +00:00
|
|
|
(unpack "phobos-src" "runtime/phobos")
|
|
|
|
(unpack "druntime-src" "runtime/druntime")
|
|
|
|
(unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")
|
|
|
|
#t)))
|
2017-06-10 23:48:35 +00:00
|
|
|
(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/")
|
2018-02-18 06:09:44 +00:00
|
|
|
(string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
|
|
|
|
(("tzName == \"[+]VERSION\"")
|
|
|
|
"(tzName == \"+VERSION\" || std.algorithm.endsWith(tzName, \"/leapseconds\"))"))
|
2017-06-10 23:48:35 +00:00
|
|
|
(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")
|
2018-02-18 06:09:44 +00:00
|
|
|
;; the following two tests fail on i686
|
|
|
|
(for-each delete-file '("tests/ir/attributes.d" "tests/ir/align.d")))))))
|
2017-06-10 23:48:35 +00:00
|
|
|
(inputs
|
|
|
|
`(("libconfig" ,libconfig)
|
|
|
|
("libedit" ,libedit)
|
|
|
|
("tzdata" ,tzdata)
|
|
|
|
("zlib" ,zlib)))
|
|
|
|
(native-inputs
|
2018-04-05 17:18:41 +00:00
|
|
|
`(("llvm" ,llvm-3.8)
|
|
|
|
("clang" ,clang-3.8)
|
2017-06-10 23:48:35 +00:00
|
|
|
("python-lit" ,python-lit)
|
|
|
|
("python-wrapper" ,python-wrapper)
|
|
|
|
("unzip" ,unzip)
|
|
|
|
("phobos-src"
|
|
|
|
,(origin
|
2019-04-08 21:12:45 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/phobos.git")
|
|
|
|
(commit (string-append "ldc-v" version))))
|
|
|
|
(file-name (git-file-name "phobos" version))
|
2017-06-10 23:48:35 +00:00
|
|
|
(sha256
|
2019-04-08 21:12:45 +00:00
|
|
|
(base32 "0i7gh99w4mi0hdv16261jcdiqyv1nkjdcwy9prw32s0lvplx8fdy"))
|
2018-02-18 06:09:44 +00:00
|
|
|
(patches (search-patches "ldc-bootstrap-disable-tests.patch"))))
|
2017-06-10 23:48:35 +00:00
|
|
|
("druntime-src"
|
|
|
|
,(origin
|
2019-04-08 21:12:45 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/druntime.git")
|
|
|
|
(commit (string-append "ldc-v" version))))
|
|
|
|
(file-name (git-file-name "druntime" version))
|
2017-06-10 23:48:35 +00:00
|
|
|
(sha256
|
2019-04-08 21:12:45 +00:00
|
|
|
(base32 "0alabm3bbvs94msvxz5psiwk4f51cw9h82z1p5hhsnf8ja6d0am7"))))
|
2017-06-10 23:48:35 +00:00
|
|
|
("dmd-testsuite-src"
|
|
|
|
,(origin
|
2019-04-08 21:12:45 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/dmd-testsuite.git")
|
|
|
|
(commit (string-append "ldc-v" version))))
|
|
|
|
(file-name (git-file-name "dmd-testsuite" version))
|
2017-06-10 23:48:35 +00:00
|
|
|
(sha256
|
2019-04-08 21:12:45 +00:00
|
|
|
(base32 "05qr4cgb4scfqzbw1l5pk72kil074mvj9d55b165ljyr51sgwgbl"))))))
|
2017-06-10 23:48:35 +00:00
|
|
|
(home-page "http://wiki.dlang.org/LDC")
|
2018-09-09 15:57:42 +00:00
|
|
|
(synopsis "LLVM-based compiler for the D programming language")
|
2017-06-10 23:48:35 +00:00
|
|
|
(description
|
2018-09-09 15:57:42 +00:00
|
|
|
"LDC is an LLVM compiler for the D programming language. It is based on
|
2018-02-18 06:09:44 +00:00
|
|
|
the latest DMD compiler that was written in C and is used for
|
|
|
|
bootstrapping more recent compilers written in D.")
|
2017-06-10 23:48:35 +00:00
|
|
|
;; 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+
|
2018-02-18 06:09:44 +00:00
|
|
|
license:boost1.0))))
|
2017-01-06 14:51:18 +00:00
|
|
|
|
2017-02-01 09:51:32 +00:00
|
|
|
(define-public ldc
|
2018-02-18 06:09:44 +00:00
|
|
|
;; Phobos, druntime and dmd-testsuite library dependencies do
|
|
|
|
;; not always have a newer release than the compiler, hence we
|
|
|
|
;; retain this variable.
|
2018-09-09 15:57:42 +00:00
|
|
|
(let ((older-version "1.10.0")) ;; retain this because sometimes the libs are older
|
2017-01-06 14:51:18 +00:00
|
|
|
(package
|
2017-02-01 09:51:31 +00:00
|
|
|
(inherit ldc-bootstrap)
|
2017-01-06 14:51:18 +00:00
|
|
|
(name "ldc")
|
2018-09-09 15:57:42 +00:00
|
|
|
(version "1.10.0")
|
2019-04-08 21:15:22 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/ldc.git")
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32 "0qcb2rn01wql7y8qp31blbv3hwmnh3zjgzi2n7k168cxr6rrdhlp"))))
|
2017-01-06 14:51:18 +00:00
|
|
|
(arguments
|
|
|
|
`(#:phases
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'unpack-submodule-sources
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
2019-04-08 21:15:22 +00:00
|
|
|
(let ((unpack (lambda (input target)
|
|
|
|
(let ((source (assoc-ref inputs input)))
|
|
|
|
;; Git checkouts are directories as long as
|
|
|
|
;; there are no patches; tarballs otherwise.
|
|
|
|
(if (file-is-directory? source)
|
|
|
|
(copy-recursively source target)
|
|
|
|
(with-directory-excursion target
|
|
|
|
(invoke "tar" "xvf" source
|
|
|
|
"--strip-components=1")))))))
|
2019-03-26 20:35:46 +00:00
|
|
|
(unpack "phobos-src" "runtime/phobos")
|
|
|
|
(unpack "druntime-src" "runtime/druntime")
|
2019-04-08 21:15:22 +00:00
|
|
|
(unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite")
|
|
|
|
#t)))
|
2017-01-06 14:51:18 +00:00
|
|
|
(add-after 'unpack-submodule-sources 'patch-phobos
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
2018-02-18 06:09:44 +00:00
|
|
|
(substitute* '("runtime/phobos/std/process.d"
|
|
|
|
"tests/linking/linker_switches.d")
|
2017-01-06 14:51:18 +00:00
|
|
|
(("/bin/sh") (which "sh"))
|
|
|
|
(("echo") (which "echo")))
|
|
|
|
(substitute* "tests/d2/dmd-testsuite/Makefile"
|
2019-04-08 21:15:22 +00:00
|
|
|
(("/bin/bash") (which "bash")))
|
2018-02-18 06:09:44 +00:00
|
|
|
;; disable unittests in the following files. We are discussing with
|
|
|
|
;; upstream
|
|
|
|
(substitute* '("runtime/phobos/std/net/curl.d"
|
|
|
|
"runtime/phobos/std/datetime/systime.d"
|
|
|
|
"runtime/phobos/std/datetime/timezone.d"
|
|
|
|
)
|
|
|
|
(("version(unittest)") "version(skipunittest)")
|
|
|
|
((" unittest") " version(skipunittest) unittest"))
|
|
|
|
;; the following tests require a more recent LLVM
|
|
|
|
(delete-file "tests/compilable/ctfe_math.d")
|
|
|
|
(delete-file "tests/debuginfo/nested_gdb.d")
|
|
|
|
(delete-file "tests/debuginfo/classtypes_gdb.d")
|
2018-09-09 15:57:42 +00:00
|
|
|
;; the following tests plugins we don't have.
|
|
|
|
(delete-file "tests/plugins/addFuncEntryCall/testPlugin.d")
|
2018-02-21 11:07:13 +00:00
|
|
|
;; the following tests requires AVX instruction set in the CPU.
|
2018-02-18 06:09:44 +00:00
|
|
|
(substitute* "tests/d2/dmd-testsuite/runnable/test_cdvecfill.d"
|
2019-04-08 21:15:22 +00:00
|
|
|
(("^// DISABLED: ") "^// DISABLED: linux64 "))
|
2018-02-18 06:09:44 +00:00
|
|
|
#t))
|
|
|
|
(replace 'check
|
2019-04-08 21:15:22 +00:00
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
;; some tests call into gdb binary which needs SHELL and CC set
|
|
|
|
(setenv "SHELL" (which "sh"))
|
|
|
|
(setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
|
|
|
|
(invoke "make" "test" "-j" (number->string (parallel-job-count))))))))
|
2017-01-06 14:51:18 +00:00
|
|
|
(native-inputs
|
2019-02-15 10:28:14 +00:00
|
|
|
`(("llvm" ,llvm-6)
|
|
|
|
("clang" ,clang-6)
|
2017-02-01 09:51:31 +00:00
|
|
|
("ldc" ,ldc-bootstrap)
|
2017-01-06 14:51:18 +00:00
|
|
|
("python-lit" ,python-lit)
|
|
|
|
("python-wrapper" ,python-wrapper)
|
|
|
|
("unzip" ,unzip)
|
|
|
|
("gdb" ,gdb)
|
|
|
|
("phobos-src"
|
|
|
|
,(origin
|
2019-04-08 21:15:22 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/phobos.git")
|
|
|
|
(commit (string-append "ldc-v" older-version))))
|
|
|
|
(file-name (git-file-name "phobos" older-version))
|
2017-01-06 14:51:18 +00:00
|
|
|
(sha256
|
2019-04-08 21:15:22 +00:00
|
|
|
(base32 "1gmlwnjdcf6s5aahadxsif9l5nyaj0rrn379g6fmhcvdk64kf509"))
|
2017-01-06 14:51:18 +00:00
|
|
|
;; This patch deactivates some tests that depend on network access
|
|
|
|
;; to pass. It also deactivates some tests that have some reliance
|
|
|
|
;; on timezone.
|
|
|
|
;;
|
|
|
|
;; For the network tests, there's an effort to get a version flag
|
|
|
|
;; added to deactivate these tests for distribution packagers
|
|
|
|
;; that is being pursued at
|
|
|
|
;; <https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org>.
|
|
|
|
;; It also deactivates a test that requires /root
|
2018-09-09 15:57:42 +00:00
|
|
|
(patches (search-patches "ldc-disable-phobos-tests.patch"))))
|
2017-01-06 14:51:18 +00:00
|
|
|
("druntime-src"
|
|
|
|
,(origin
|
2019-04-08 21:15:22 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/druntime.git")
|
|
|
|
(commit (string-append "ldc-v" older-version))))
|
|
|
|
(file-name (git-file-name "druntime" older-version))
|
2017-01-06 14:51:18 +00:00
|
|
|
(sha256
|
2019-04-08 21:15:22 +00:00
|
|
|
(base32 "0a3yyjcnpvm5fbdczf76fx08kl154w17w06hlxf0j3p1p4jc85aj"))))
|
2017-01-06 14:51:18 +00:00
|
|
|
("dmd-testsuite-src"
|
|
|
|
,(origin
|
2019-04-08 21:15:22 +00:00
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/ldc-developers/dmd-testsuite.git")
|
|
|
|
(commit (string-append "ldc-v" older-version))))
|
|
|
|
(file-name (git-file-name "dmd-testsuite" older-version))
|
2017-01-06 14:51:18 +00:00
|
|
|
(sha256
|
2019-04-08 21:15:22 +00:00
|
|
|
(base32 "0mm3rliki1nqiqfaha7ssvm156aa398vpvf4v6895m7nn1mz7rss")))))))))
|
2017-01-29 22:46:33 +00:00
|
|
|
|
|
|
|
(define-public dub
|
|
|
|
(package
|
|
|
|
(name "dub")
|
2018-02-18 06:09:44 +00:00
|
|
|
(version "1.7.2")
|
2019-04-08 21:16:17 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/dlang/dub.git")
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32 "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9"))))
|
|
|
|
(build-system gnu-build-system)
|
2017-01-29 22:46:33 +00:00
|
|
|
(arguments
|
|
|
|
`(#:tests? #f ; it would have tested itself by installing some packages (vibe etc)
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
2017-04-11 04:34:17 +00:00
|
|
|
(delete 'configure) ; no configure script
|
2017-01-29 22:46:33 +00:00
|
|
|
(replace 'build
|
|
|
|
(lambda _
|
2018-02-21 01:52:01 +00:00
|
|
|
(invoke "./build.sh")))
|
2017-01-29 22:46:33 +00:00
|
|
|
(replace 'install
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
2017-04-11 04:34:17 +00:00
|
|
|
(bin (string-append out "/bin")))
|
|
|
|
(install-file "bin/dub" bin)
|
2017-01-29 22:46:33 +00:00
|
|
|
#t))))))
|
|
|
|
(inputs
|
|
|
|
`(("curl" ,curl)))
|
|
|
|
(native-inputs
|
|
|
|
`(("ldc" ,ldc)))
|
|
|
|
(home-page "https://code.dlang.org/getting_started")
|
2017-04-12 16:55:55 +00:00
|
|
|
(synopsis "Package and build manager for D projects")
|
|
|
|
(description
|
2018-02-18 06:09:44 +00:00
|
|
|
"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.
|
2017-04-12 16:55:55 +00:00
|
|
|
|
2018-02-18 06:09:44 +00:00
|
|
|
The design emphasis is on maximum simplicity for simple projects,
|
|
|
|
while providing the opportunity to customize things when
|
|
|
|
needed.")
|
2017-01-29 22:46:33 +00:00
|
|
|
(license license:expat)))
|