From patchwork Fri Jun 24 17:56:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 40305 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 248FC27BBEA; Fri, 24 Jun 2022 18:58:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 895B827BBE9 for ; Fri, 24 Jun 2022 18:58:02 +0100 (BST) Received: from localhost ([::1]:58626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4nZ9-0005FS-Kt for patchwork@mira.cbaines.net; Fri, 24 Jun 2022 13:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43780) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4nYE-0005ES-8m for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4nYD-0005fM-Rn for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4nYD-0005ME-Na for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55999] [PATCH v3 1/3] gnu: packages: Replace rdmd with d-tools. References: In-Reply-To: Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jun 2022 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55999@debbugs.gnu.org Cc: "\(" Received: via spool by 55999-submit@debbugs.gnu.org id=B55999.165609340220539 (code B ref 55999); Fri, 24 Jun 2022 17:57:01 +0000 Received: (at 55999) by debbugs.gnu.org; 24 Jun 2022 17:56:42 +0000 Received: from localhost ([127.0.0.1]:43455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nXt-0005LD-Hf for submit@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:41 -0400 Received: from knopi.disroot.org ([178.21.23.139]:53612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nXr-0005Kx-Rj for 55999@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:41 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7DBBF45922; Fri, 24 Jun 2022 19:56:38 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KUNzZG5jCEUi; Fri, 24 Jun 2022 19:56:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1656093396; bh=JeBTX65k0fDAdE5VLARjHF1lWV6DwF7nLNUGm+BpUFw=; h=From:To:Cc:Subject:Date; b=PTB8xbHWZL3n9u2MNzEgOhHdehRxDFynFi0rJS8w3m8Pi/5xqTDqVy/c7jz8tWng0 sPqOzpy4Z8iaY0vfxEKO4HZgcNqzbUbr41NPMJ0PKygC5lq7aXwrHLECzxSQXl/QaY xjU10aXr0wihG6w30eP8UPMQzAKkhm+VBcA+vZ1j4FIRmINSwN7Kz1dzGvxXkFwbqG OLQuByDRqMC9tdael65X6CpNGJHTWrNuX4SqHu7NwikN96Vqs8txjA/VwN9HQAYQUi SnrF6hBJrwKElbxZVCXLZMqj2xztLdlMgJXNR6QQ/2Z9PLaMydBXjXil0BSgicCMwz 7v+51XPYms81Q== Date: Fri, 24 Jun 2022 18:56:26 +0100 Message-Id: <20220624175628.7877-1-paren@disroot.org> Mime-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2022 ( ;;; ;;; 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 From patchwork Fri Jun 24 17:56:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 40306 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8587F27BBEA; Fri, 24 Jun 2022 18:58:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 486D827BBE9 for ; Fri, 24 Jun 2022 18:58:10 +0100 (BST) Received: from localhost ([::1]:58694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4nZJ-0005Hu-2B for patchwork@mira.cbaines.net; Fri, 24 Jun 2022 13:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4nYE-0005Ed-E7 for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4nYE-0005fQ-46 for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4nYE-0005ML-3Y for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55999] [PATCH v3 2/3] gnu: packages: Update dub to v1.23.0. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jun 2022 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55999@debbugs.gnu.org Cc: "\(" Received: via spool by 55999-submit@debbugs.gnu.org id=B55999.165609340520561 (code B ref 55999); Fri, 24 Jun 2022 17:57:02 +0000 Received: (at 55999) by debbugs.gnu.org; 24 Jun 2022 17:56:45 +0000 Received: from localhost ([127.0.0.1]:43459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nXw-0005LZ-TR for submit@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:45 -0400 Received: from knopi.disroot.org ([178.21.23.139]:54518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nXv-0005LL-FQ for 55999@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:44 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id B4FD945994; Fri, 24 Jun 2022 19:56:42 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G0sz8VV8r3vi; Fri, 24 Jun 2022 19:56:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1656093401; bh=CkEtsu0KTMR+DgwgfL2h/6hCGm0pTU9zPfmZV1NmWl8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iTFn3Hv9ZrEDk5yQpoZd8dWHJeo91OMNGUkvkPKUcxpH+3F4objynT+Vz3tkBOD2u WiKhsFUlrYzq0Qm6yADD4cK9CBfpURJDFUH+PCXLtzBaDR+ccwJA3GBCNPIblLEhYy gBXA3XtSXkyic+QTo4Z3wwSfasyEEyK7Fc54rrUltr90BT3VP34AwvddTlcUxy2kSr pbt8DiAG6Zr5R0xT0p/OT/Q017YcojpMZVmzdokGFV6ipSvJJPbG+Svp3m7wU9BRIk zV3VcJV011cLr8kk/46cPHMXj21TC2tREqJ1xYcS0g9FAJb7lAtYU7tICeBSCxfGp/ H/5oUDOK/BiFA== Date: Fri, 24 Jun 2022 18:56:27 +0100 Message-Id: <20220624175628.7877-2-paren@disroot.org> In-Reply-To: <20220624175628.7877-1-paren@disroot.org> References: <20220624175628.7877-1-paren@disroot.org> Mime-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Fri Jun 24 17:56:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\\(" X-Patchwork-Id: 40307 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B5F2027BBEA; Fri, 24 Jun 2022 18:58:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2B7F127BBE9 for ; Fri, 24 Jun 2022 18:58:44 +0100 (BST) Received: from localhost ([::1]:59432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4nZp-00062f-N6 for patchwork@mira.cbaines.net; Fri, 24 Jun 2022 13:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4nYE-0005F2-QT for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4nYE-0005fY-HO for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4nYE-0005MT-H6 for guix-patches@gnu.org; Fri, 24 Jun 2022 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55999] [PATCH v3 3/3] guix: Modernize dub-build-system somewhat. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Jun 2022 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55999 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55999@debbugs.gnu.org Cc: "\(" Received: via spool by 55999-submit@debbugs.gnu.org id=B55999.165609340820572 (code B ref 55999); Fri, 24 Jun 2022 17:57:02 +0000 Received: (at 55999) by debbugs.gnu.org; 24 Jun 2022 17:56:48 +0000 Received: from localhost ([127.0.0.1]:43461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nY0-0005Lk-6R for submit@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:48 -0400 Received: from knopi.disroot.org ([178.21.23.139]:54728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4nXw-0005LN-4s for 55999@debbugs.gnu.org; Fri, 24 Jun 2022 13:56:44 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 67EB145941; Fri, 24 Jun 2022 19:56:43 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZZJL5_bEnfrI; Fri, 24 Jun 2022 19:56:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1656093402; bh=DGTSUPSRruKnNTVsnd59TIVzP7NZmgWnhy3zbTSWMIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Jw0vLWhygNwAqNZrherRLu2W1mIMpYWNa0NO//iZuNgcsGtuxxib7U+qVoOmfnqQ6 LSQWeQCzEAuCG5P0ODQUneadHoTHSqs/2kHEyL0VH+rsHUKoKFeqZ770G/vDmb8ZH5 rNn1q4PdzLugk/kKFLizzlUciaIHX8/NDQ7A95iYzHFinbyLja1u52Sa0aaj/m0+jG zTxrZzaVyXEobRZb2lXjkONIm/O3RdN2by5iQfxbipDAOFlKBpet00Emw5gK8XLMip xLCGE32/HuKmpiDhesTu195372I3aWZY/V0G9XkT7LPJeGU46J3x6xYJGplGgwFE0m dF0Zr/O9HE54Q== Date: Fri, 24 Jun 2022 18:56:28 +0100 Message-Id: <20220624175628.7877-3-paren@disroot.org> In-Reply-To: <20220624175628.7877-1-paren@disroot.org> References: <20220624175628.7877-1-paren@disroot.org> Mime-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" X-Patchwork-Original-From: "\( via Guix-patches" via From: "\\(" X-getmail-retrieved-from-mailbox: Patches * guix/build-system/dub.scm (default-ld-gold-wrapper): New variable. (lower): Add keyed argument ld-gold-wrapper. [bag]: 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