all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#55999] [PATCHSET] Various D fixes
@ 2022-06-15 18:52 ( 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
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-15 18:52 UTC (permalink / raw)
  To: 55999

This fixes <https://issues.guix.gnu.org/55953>.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools.
  2022-06-15 18:52 [bug#55999] [PATCHSET] Various D fixes ( via Guix-patches via
@ 2022-06-15 18:53 ` ( 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 17:20 ` [bug#55999] [PATCH v2 " ( via Guix-patches via
  2022-06-24 17:56 ` [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
  2 siblings, 2 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-15 18:53 UTC (permalink / raw)
  To: 55999; +Cc: (

* 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 | 76 +++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 403fcbbd6b..e0ded5c3c8 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,54 @@ (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"))
-      (sha256
-       (base32
-        "0c8w373rv6iz3xfid94w40ncv2lr2ncxi662qsr4lda4aghczmq7"))))
+    (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 "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 _
+                   (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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH 2/2] gnu: packages: Update dub to v1.23.0.
  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   ` ( via Guix-patches via
  2022-06-17  6:16   ` [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools Maxime Devos
  1 sibling, 0 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-15 18:53 UTC (permalink / raw)
  To: 55999; +Cc: (

* gnu/packages/dlang.scm (dub): Update to version 1.23.0.

This also fixes Dub's build, which was previously failing because of how
ancient it was.
---
 gnu/packages/dlang.scm | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index e0ded5c3c8..2341f1769e 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -436,7 +436,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)
@@ -445,26 +445,30 @@ (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)
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)            ; no configure script
-         (replace 'build
-           (lambda _
-             (invoke "./build.sh")))
-         (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))))))
-    (inputs
-     (list curl))
+     (list #:tests? #f ; it would have tested itself by installing some packages (vibe etc)
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure) ; no configure script
+               (replace 'build
+                 (lambda* (#:key native-inputs #:allow-other-keys)
+                   (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)))))))
+    (inputs (list curl))
     (native-inputs
-     (list ldc))
+     (list ldc
+           d-tools
+           (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
-- 
2.36.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools.
  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   ` Maxime Devos
  2022-06-17 15:43     ` ( via Guix-patches via
  1 sibling, 1 reply; 11+ messages in thread
From: Maxime Devos @ 2022-06-17  6:16 UTC (permalink / raw)
  To: (, 55999

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

( via Guix-patches via schreef op wo 15-06-2022 om 19:53 [+0100]:
> +               (replace 'check
> +                 (lambda _
> +                   (invoke "bin/rdmd" "rdmd_test.d" "bin/rdmd"
> +                           "--rdmd-default-compiler" "ldmd2")))

Run "./pre-inst guix lint d-tools", it will have a remark.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH 1/2] gnu: packages: Replace rdmd with d-tools.
  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
  0 siblings, 0 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-17 15:43 UTC (permalink / raw)
  To: Maxime Devos, 55999

On Fri Jun 17, 2022 at 7:16 AM BST, Maxime Devos wrote:
> Run "./pre-inst guix lint d-tools", it will have a remark.

thanks; sending new patch in a moment :)




^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH v2 1/2] gnu: packages: Replace rdmd with d-tools.
  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-17 17:20 ` ( 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 ` [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
  2 siblings, 1 reply; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-17 17:20 UTC (permalink / raw)
  To: 55999; +Cc: (

* 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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH v2 2/2] gnu: packages: Update dub to v1.23.0.
  2022-06-17 17:20 ` [bug#55999] [PATCH v2 " ( via Guix-patches via
@ 2022-06-17 17:20   ` ( via Guix-patches via
  0 siblings, 0 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-17 17:20 UTC (permalink / raw)
  To: 55999; +Cc: (

* gnu/packages/dlang.scm (dub): Update to version 1.23.0.

This also fixes Dub's build, which was previously failing because of how
ancient it was.
---
 gnu/packages/dlang.scm | 52 +++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 7010994d2c..34486f212c 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -437,35 +437,39 @@ (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)
-       (uri (git-reference
-             (url "https://github.com/dlang/dub")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9"))))
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/dlang/dub")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "06a4whsl1m600k096nwif83n7za3vr7pj1xwapncy5fcad1gmady"))))
     (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)            ; no configure script
-         (replace 'build
-           (lambda _
-             (invoke "./build.sh")))
-         (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))))))
-    (inputs
-     (list curl))
+     (list #:tests? #f ; Tests try to install various packages.
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (replace 'build
+                 (lambda _
+                   (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)))))))
+    (inputs (list curl))
     (native-inputs
-     (list ldc))
+     (list ldc
+           d-tools
+           (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
-- 
2.36.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools.
  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-17 17:20 ` [bug#55999] [PATCH v2 " ( via Guix-patches via
@ 2022-06-24 17:56 ` ( via Guix-patches via
  2022-06-24 17:56   ` [bug#55999] [PATCH v3 2/3] gnu: packages: Update dub to v1.23.0 ( 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
  2 siblings, 2 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-24 17:56 UTC (permalink / raw)
  To: 55999; +Cc: (

* 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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH v3 2/3] gnu: packages: Update dub to v1.23.0.
  2022-06-24 17:56 ` [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
@ 2022-06-24 17:56   ` ( 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
  1 sibling, 0 replies; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-24 17:56 UTC (permalink / raw)
  To: 55999; +Cc: (

* gnu/packages/dlang.scm (dub): Update to version 1.23.0.

This also fixes Dub's build, which was previously failing because of how
ancient it was.
---
 gnu/packages/dlang.scm | 52 +++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 7010994d2c..34486f212c 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -437,35 +437,39 @@ (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)
-       (uri (git-reference
-             (url "https://github.com/dlang/dub")
-             (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "073ibvgm1gphcqs1yjrav9ryp677nh3b194nxmvicwgvdc0sb6w9"))))
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/dlang/dub")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "06a4whsl1m600k096nwif83n7za3vr7pj1xwapncy5fcad1gmady"))))
     (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)            ; no configure script
-         (replace 'build
-           (lambda _
-             (invoke "./build.sh")))
-         (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))))))
-    (inputs
-     (list curl))
+     (list #:tests? #f ; Tests try to install various packages.
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (replace 'build
+                 (lambda _
+                   (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)))))))
+    (inputs (list curl))
     (native-inputs
-     (list ldc))
+     (list ldc
+           d-tools
+           (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
-- 
2.36.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#55999] [PATCH v3 3/3] guix: Modernize dub-build-system somewhat.
  2022-06-24 17:56 ` [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
  2022-06-24 17:56   ` [bug#55999] [PATCH v3 2/3] gnu: packages: Update dub to v1.23.0 ( via Guix-patches via
@ 2022-06-24 17:56   ` ( via Guix-patches via
  2022-06-25 21:37     ` bug#55999: " Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 1 reply; 11+ messages in thread
From: ( via Guix-patches via @ 2022-06-24 17:56 UTC (permalink / raw)
  To: 55999; +Cc: (

* guix/build-system/dub.scm (default-ld-gold-wrapper): New variable.
(lower): Add keyed argument ld-gold-wrapper.
[bag]<build-inputs>: Add ld-gold-wrapper.
* guix/build/dub-build-system.scm (configure): Remove trailing #t, and
  fix docstring formatting.
(build): Remove trailing #t, and avoid substituting ".dub/dub.json" as
Dub no longer produces it.
(check): Same as (build).
(install): Remove trailing #t.
---
 guix/build-system/dub.scm       |  8 ++++++++
 guix/build/dub-build-system.scm | 26 ++++++++------------------
 2 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm
index 55ad7decb8..1577f4a0c7 100644
--- a/guix/build-system/dub.scm
+++ b/guix/build-system/dub.scm
@@ -51,6 +51,12 @@ (define (default-pkg-config)
   (let ((pkg-config (resolve-interface '(gnu packages pkg-config))))
     (module-ref pkg-config 'pkg-config)))
 
+;; LDC doesn't work with the bfd linker.
+(define (default-ld-gold-wrapper)
+  "Return the default ld-gold-wrapper package."
+  (let ((commencement (resolve-interface '(gnu packages commencement))))
+    (module-ref commencement 'ld-gold-wrapper)))
+
 (define %dub-build-system-modules
   ;; Build-side modules imported by default.
   `((guix build dub-build-system)
@@ -100,6 +106,7 @@ (define* (lower name
                 (ldc (default-ldc))
                 (dub (default-dub))
                 (pkg-config (default-pkg-config))
+                (ld-gold-wrapper (default (default-ld-gold-wrapper)))
                 #:allow-other-keys
                 #:rest arguments)
   "Return a bag for NAME."
@@ -121,6 +128,7 @@ (define private-keywords
                         ,@(standard-packages)))
          (build-inputs `(("ldc" ,ldc)
                          ("dub" ,dub)
+                         ("ld-gold-wrapper" ,ld-gold-wrapper)
                          ,@native-inputs))
          (outputs outputs)
          (build dub-build)
diff --git a/guix/build/dub-build-system.scm b/guix/build/dub-build-system.scm
index 3ab50733de..9ee0433ffd 100644
--- a/guix/build/dub-build-system.scm
+++ b/guix/build/dub-build-system.scm
@@ -48,10 +48,10 @@ (define (package-name->d-package-name name)
     (_ #f)))
 
 (define* (configure #:key inputs #:allow-other-keys)
-  "Prepare one new directory with all the required dependencies.
-   It's necessary to do this (instead of just using /gnu/store as the
-   directory) because we want to hide the libraries in subdirectories
-   lib/dub/... instead of polluting the user's profile root."
+  "Prepare one new directory with all the required dependencies. It's necessary
+to do this (instead of just using /gnu/store as the directory) because we want
+to hide the libraries in subdirectories lib/dub/... instead of polluting the
+user's profile root."
   (let* ((dir (mkdtemp! "/tmp/dub.XXXXXX"))
          (vendor-dir (string-append dir "/vendor")))
     (setenv "HOME" dir)
@@ -67,8 +67,7 @@ (define* (configure #:key inputs #:allow-other-keys)
                 (symlink (string-append path "/lib/dub/" d-basename)
                          (string-append vendor-dir "/" d-basename))))))))
       inputs)
-    (invoke "dub" "add-path" vendor-dir)
-    #t))
+    (invoke "dub" "add-path" vendor-dir)))
 
 (define (grep string file-name)
   "Find the first occurrence of STRING in the file named FILE-NAME.
@@ -92,19 +91,11 @@ (define* (build #:key (dub-build-flags '())
   (unless (or (grep* "sourceLibrary" "package.json")
               (grep* "sourceLibrary" "dub.sdl") ; note: format is different!
               (grep* "sourceLibrary" "dub.json"))
-    (apply invoke `("dub" "build" ,@dub-build-flags))
-    (substitute* ".dub/dub.json"
-      (("\"lastUpgrade\": \"[^\"]*\"")
-       "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
-  #t)
+    (apply invoke `("dub" "build" ,@dub-build-flags))))
 
 (define* (check #:key tests? #:allow-other-keys)
   (when tests?
-    (invoke "dub" "test")
-    (substitute* ".dub/dub.json"
-      (("\"lastUpgrade\": \"[^\"]*\"")
-       "\"lastUpgrade\": \"1970-01-01T00:00:00.0000000\"")))
-  #t)
+    (invoke "dub" "test")))
 
 (define* (install #:key inputs outputs #:allow-other-keys)
   "Install a given DUB package."
@@ -115,8 +106,7 @@ (define* (install #:key inputs outputs #:allow-other-keys)
     ;; TODO remove "-test-application"
     (copy-recursively "bin" outbin)
     (mkdir-p outlib)
-    (copy-recursively "." (string-append outlib))
-    #t))
+    (copy-recursively "." (string-append outlib))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.36.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#55999: [PATCH v3 3/3] guix: Modernize dub-build-system somewhat.
  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     ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 0 replies; 11+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2022-06-25 21:37 UTC (permalink / raw)
  To: (; +Cc: 55999-done, guix-patches

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

Hi ),

I split these patches up into more atomic parts, made a few minor 
tweaks I deemed fit, and pushed them to master in two stages as 
4c63796545ce2a1f7cd556a831bb92c7b3166358 et al and 
30edb241a9ba50fefbd08438b5ffba25b10c6e61 et al.

Thanks!

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-25 21:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools ( via Guix-patches via
2022-06-24 17:56   ` [bug#55999] [PATCH v3 2/3] gnu: packages: Update dub to v1.23.0 ( 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

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.