diff options
| author | Jonas Meeuws <jonas.meeuws@gmail.com> | 2026-07-18 18:11:34 +0200 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-08-22 16:49:14 +0200 |
| commit | 63bc0bfea29726a282c5ac61cd7360cab3003db2 (patch) | |
| tree | a6ebe3c2ac876764ca5d42a2637b21c6ffae8911 /gnu/packages/dlang.scm | |
| parent | a56b050d4badafa09790236f66ca588f9b797274 (diff) | |
gnu: dmd: Outline ‘phase-in-sub-dir’.
* gnu/packages/dlang.scm (dmd-bootstrap)[phases]: Replace ‘phase-in-sub-dir’
with ‘wrap-in-directory-excursion’.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/dlang.scm')
| -rw-r--r-- | gnu/packages/dlang.scm | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm index edf24a1a952..59be8959453 100644 --- a/gnu/packages/dlang.scm +++ b/gnu/packages/dlang.scm | |||
| @@ -381,16 +381,16 @@ integration tests...\n") | |||
| 381 | (srfi srfi-1) | 381 | (srfi srfi-1) |
| 382 | (srfi srfi-26)) | 382 | (srfi srfi-26)) |
| 383 | #:phases | 383 | #:phases |
| 384 | #~(let* ((phase-in-sub-dir (lambda (phase sub-dir) | 384 | (let* ((wrap-in-directory-excursion |
| 385 | (lambda args | 385 | (lambda (sub-dir phase . extra-args) |
| 386 | (with-directory-excursion sub-dir | 386 | #~(lambda args |
| 387 | (apply | 387 | (with-directory-excursion #$sub-dir |
| 388 | (assoc-ref %standard-phases phase) | 388 | (apply (assoc-ref %standard-phases '#$phase) |
| 389 | args))))) | 389 | (append args '#$extra-args)))))) |
| 390 | (target-bin-sh (string-append | 390 | (target-file (lambda (pkg-name path) |
| 391 | #$(this-package-input "bash-minimal") | 391 | (file-append (this-package-input pkg-name) path))) |
| 392 | "/bin/sh"))) | 392 | (target-bin-sh (target-file "bash-minimal" "/bin/sh"))) |
| 393 | (modify-phases %standard-phases | 393 | #~(modify-phases %standard-phases |
| 394 | (replace 'unpack | 394 | (replace 'unpack |
| 395 | (lambda* (#:key source #:allow-other-keys) | 395 | (lambda* (#:key source #:allow-other-keys) |
| 396 | (let ((dmd-source source) | 396 | (let ((dmd-source source) |
| @@ -426,9 +426,9 @@ integration tests...\n") | |||
| 426 | ;; (format #f "~s" target-lib-curl))) | 426 | ;; (format #f "~s" target-lib-curl))) |
| 427 | (substitute* "std/process.d" | 427 | (substitute* "std/process.d" |
| 428 | (("return \"/bin/sh\";") | 428 | (("return \"/bin/sh\";") |
| 429 | (format #f "return ~s;" target-bin-sh)) | 429 | (format #f "return ~s;" #$target-bin-sh)) |
| 430 | (("#!/bin/sh") | 430 | (("#!/bin/sh") |
| 431 | (string-append "#!" target-bin-sh)))))) | 431 | (string-append "#!" #$target-bin-sh)))))) |
| 432 | (add-after 'unpack 'patch-tests | 432 | (add-after 'unpack 'patch-tests |
| 433 | (lambda _ | 433 | (lambda _ |
| 434 | ;; Since the implementation of SOURCE_DATE_EPOCH support in | 434 | ;; Since the implementation of SOURCE_DATE_EPOCH support in |
| @@ -442,7 +442,7 @@ integration tests...\n") | |||
| 442 | 442 | ||
| 443 | ;; This test creates a shell script and runs it. | 443 | ;; This test creates a shell script and runs it. |
| 444 | (substitute* "dmd/compiler/test/dshell/test6952.d" | 444 | (substitute* "dmd/compiler/test/dshell/test6952.d" |
| 445 | (("/usr/bin/env bash") target-bin-sh)) | 445 | (("/usr/bin/env bash") #$target-bin-sh)) |
| 446 | 446 | ||
| 447 | ;; In the sarif json output, the compiler version string ends | 447 | ;; In the sarif json output, the compiler version string ends |
| 448 | ;; with a raw newline for some reason, causing these tests to | 448 | ;; with a raw newline for some reason, causing these tests to |
| @@ -476,9 +476,9 @@ integration tests...\n") | |||
| 476 | (delete 'bootstrap) | 476 | (delete 'bootstrap) |
| 477 | (delete 'configure) | 477 | (delete 'configure) |
| 478 | (replace 'build | 478 | (replace 'build |
| 479 | (phase-in-sub-dir 'build "dmd")) | 479 | #$(wrap-in-directory-excursion "dmd" 'build)) |
| 480 | (add-after 'build 'build-phobos | 480 | (add-after 'build 'build-phobos |
| 481 | (phase-in-sub-dir 'build "phobos")) | 481 | #$(wrap-in-directory-excursion "phobos" 'build)) |
| 482 | (add-after 'build-phobos 'build-man | 482 | (add-after 'build-phobos 'build-man |
| 483 | (lambda* (#:key make-flags #:allow-other-keys) | 483 | (lambda* (#:key make-flags #:allow-other-keys) |
| 484 | (with-directory-excursion "dmd/compiler/docs" | 484 | (with-directory-excursion "dmd/compiler/docs" |
| @@ -489,9 +489,9 @@ integration tests...\n") | |||
| 489 | (string-append "DMD=" dmd) | 489 | (string-append "DMD=" dmd) |
| 490 | make-flags)))))) | 490 | make-flags)))))) |
| 491 | (replace 'check | 491 | (replace 'check |
| 492 | (phase-in-sub-dir 'check "dmd")) | 492 | #$(wrap-in-directory-excursion "dmd" 'check)) |
| 493 | (add-after 'check 'check-phobos | 493 | (add-after 'check 'check-phobos |
| 494 | (phase-in-sub-dir 'check "phobos")) | 494 | #$(wrap-in-directory-excursion "phobos" 'check)) |
| 495 | (replace 'install | 495 | (replace 'install |
| 496 | (lambda* (#:key outputs #:allow-other-keys) | 496 | (lambda* (#:key outputs #:allow-other-keys) |
| 497 | (let* ((platform (cond (#$(target-linux?) "linux"))) | 497 | (let* ((platform (cond (#$(target-linux?) "linux"))) |
| @@ -534,7 +534,7 @@ integration tests...\n") | |||
| 534 | (format #t "\n")))))) | 534 | (format #t "\n")))))) |
| 535 | (replace 'install-license-files | 535 | (replace 'install-license-files |
| 536 | ;; Phobos license is identical. | 536 | ;; Phobos license is identical. |
| 537 | (phase-in-sub-dir 'install-license-files "dmd")))))) | 537 | #$(wrap-in-directory-excursion "dmd" 'install-license-files)))))) |
| 538 | (inputs | 538 | (inputs |
| 539 | (list bash-minimal)) | 539 | (list bash-minimal)) |
| 540 | (native-inputs | 540 | (native-inputs |
