From: "\( via Guix-patches" via <guix-patches@gnu.org>
To: 55999@debbugs.gnu.org
Cc: "\(" <paren@disroot.org>
Subject: [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools.
Date: Fri, 24 Jun 2022 18:56:26 +0100 [thread overview]
Message-ID: <20220624175628.7877-1-paren@disroot.org> (raw)
In-Reply-To: <CKQXNLQU5Y4S.3V6ML9RF1JF9C@guix-aspire>
* gnu/packages/dlang.scm (rdmd): Remove variable.
* gnu/packages/dlang.scm (d-tools): New variable.
This fixes the build of rdmd and updates it to the latest version, along
with running rdmd_test.d, building dustmite along with rdmd, and
renaming the package to d-tools to reflect that change.
---
gnu/packages/dlang.scm | 75 +++++++++++++++++++++++++-----------------
1 file changed, 45 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 403fcbbd6b..7010994d2c 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 ( <paren@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@ (define-module (gnu packages dlang)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module ((guix build utils) #:hide (delete which))
@@ -48,42 +50,55 @@ (define-module (gnu packages dlang)
#:use-module (gnu packages xorg)
#:use-module (srfi srfi-1))
-(define-public rdmd
+(define-public d-tools
(package
- (name "rdmd")
- (version "2.077.1")
- (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"))
+ (name "d-tools")
+ (version "2.100.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dlang/tools")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0c8w373rv6iz3xfid94w40ncv2lr2ncxi662qsr4lda4aghczmq7"))))
+ (base32 "1jbn0hyskv4ykcckw0iganpyrm0bq2lggswspw21r4hgnxkmjbyw"))))
(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 _
- (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)
+ (replace 'build
+ (lambda _
+ (mkdir-p "bin")
+ (setenv "CC" #$(cc-for-target))
+ (setenv "LD" #$(ld-for-target))
+ (invoke "ldc2" "rdmd.d" "--of" "bin/rdmd")
+ (apply invoke "ldc2" "--of=bin/dustmite"
+ (find-files "DustMite" ".*\\.d"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "bin/rdmd" "rdmd_test.d" "bin/rdmd"
+ "--rdmd-default-compiler" "ldmd2"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (man (string-append out "/man")))
+ (copy-recursively "bin" bin)
+ (copy-recursively "man" man)))))))
(native-inputs
- (list ldc))
- (home-page "https://github.com/D-Programming-Language/tools/")
- (synopsis "Specialized equivalent to 'make' for the D language")
+ (list ldc
+ (module-ref (resolve-interface
+ '(gnu packages commencement))
+ 'ld-gold-wrapper)))
+ (home-page "https://github.com/dlang/tools")
+ (synopsis "Useful D-related tools")
(description
- "rdmd is a companion to the dmd compiler that simplifies the typical
-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.")
+ "@code{d-tools} provides two useful tools for the D language: @code{rdmd},
+which runs D source files as scripts, and @code{dustmite}, which reduces D code
+to a minimal test case.")
(license license:boost1.0)))
;;; The 0.17.6 version is the last release to support being bootstrapped
--
2.36.1
next prev parent reply other threads:[~2022-06-24 17:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 18:52 [bug#55999] [PATCHSET] Various D fixes ( via Guix-patches via
2022-06-15 18:53 ` [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
2022-06-15 18:53 ` [bug#55999] [PATCH 2/2] gnu: packages: Update dub to v1.23.0 ( via Guix-patches via
2022-06-17 6:16 ` [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools Maxime Devos
2022-06-17 15:43 ` ( via Guix-patches via
2022-06-17 17:20 ` [bug#55999] [PATCH v2 " ( via Guix-patches via
2022-06-17 17:20 ` [bug#55999] [PATCH v2 2/2] gnu: packages: Update dub to v1.23.0 ( via Guix-patches via
2022-06-24 17:56 ` ( via Guix-patches via [this message]
2022-06-24 17:56 ` [bug#55999] [PATCH v3 2/3] " ( via Guix-patches via
2022-06-24 17:56 ` [bug#55999] [PATCH v3 3/3] guix: Modernize dub-build-system somewhat ( via Guix-patches via
2022-06-25 21:37 ` bug#55999: " Tobias Geerinckx-Rice via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220624175628.7877-1-paren@disroot.org \
--to=guix-patches@gnu.org \
--cc=55999@debbugs.gnu.org \
--cc=paren@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.