[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add rdmd.
From: |
Roel Janssen |
Subject: |
Re: [PATCH] Add rdmd. |
Date: |
Mon, 22 Feb 2016 19:57:24 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.1.50.2 |
0001-gnu-Add-rdmd-v3.patch
Description: Text Data
Thank you for your quick review. I've learnt a couple of things again
from this. :)
I attached a new version of the patch addressing your comments.
Leo Famulari writes:
> On Mon, Feb 22, 2016 at 02:02:27PM +0100, Roel Janssen wrote:
>> From 67222c11f6bb8d07b798b1f50eae6e23d8e77b2b Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <address@hidden>
>> Date: Mon, 22 Feb 2016 14:00:53 +0100
>> Subject: [PATCH] gnu: Add rdmd.
>>
>> * gnu/packages/ldc.scm (rdmd): New variable.
>
> Thanks for the patch!
>
>> ---
>> gnu/packages/ldc.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 44 insertions(+)
>>
>> diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
>> index 1981bc1..c00e0dc 100644
>> --- a/gnu/packages/ldc.scm
>> +++ b/gnu/packages/ldc.scm
>> @@ -21,6 +21,8 @@
>> #:use-module ((guix licenses) #:prefix license:)
>> #:use-module (guix packages)
>> #:use-module (guix download)
>> + #:use-module (guix git-download)
>> + #:use-module (guix build-system gnu)
>> #:use-module (guix build-system cmake)
>> #:use-module (gnu packages)
>> #:use-module (gnu packages base)
>> @@ -29,6 +31,48 @@
>> #:use-module (gnu packages textutils)
>> #:use-module (gnu packages zip))
>>
>> +(define-public rdmd
>> + (let ((commit "4dba6877c"))
>
> Please use the full hash here.
>
> You can see commit 423eef362b for an example of how to construct a
> pleasant version string, and section 7.6.3 of the current manual (in
> git) for the specification of that version string.
>
> If desired, you can generate an HTML version of the manual with
> `make doc/guix.html`.
Things like this make submitting packages rewarding. You learn new
Scheme functions too.
>> + (package
>> + (name "rdmd")
>> + (version "20160217")
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/D-Programming-Language/tools.git")
>> + (commit commit)))
>> + (file-name (string-append name "-" commit))
>> + (sha256
>> + (base32
>> + "1pcx5lyqzrip86f4vv60x292rpvnwsq2hvl1znm9x9rn68f34m45"))))
>> + (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'.
>
> Is there a test suite that is meant to be invoked some other way?
Not that I'm aware of.
>> + (replace
>> + 'build
>> + (lambda _
>> + (zero? (system* "ldc2" "rdmd.d"))))
>> + (replace
>> + 'install
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
>> + (mkdir-p bin)
>> + (copy-file "rdmd" (string-append bin "/rdmd"))))))))
>
> mkdir-p and copy-file can be shortened into install-file :)
That's cool. I hope I've correctly modified it.
>> + (native-inputs
>> + `(("ldc" ,ldc)))
>> + (home-page "https://github.com/D-Programming-Language/tools/")
>> + (synopsis "Tool for the D language which is used for compiling")
>
> This makes it sounds like a compiler, but it sounds more like a dmd
> version of Make? Is that correct?
>
> Looks good with these changes and a clarified synopsis.
It's more a 'make' with dependency handling. I changed the synopsis. :)
>> + (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.")
>> + (license license:boost1.0))))
>> +
>> (define-public ldc
>> (package
>> (name "ldc")
>> --
>> 2.5.0
>>
>