unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add rdmd.
@ 2016-02-22 11:27 Roel Janssen
  2016-02-22 13:02 ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-02-22 11:27 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-rdmd.patch --]
[-- Type: text/x-patch, Size: 2618 bytes --]

From b1de0922ef8add641256027a8cd0dfb1de57406a Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Mon, 22 Feb 2016 12:23:53 +0100
Subject: [PATCH] gnu: Add rdmd.

* gnu/packages/ldc.scm (rdmd): New variable.
---
 gnu/packages/ldc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 1981bc1..4799b10 100644
--- a/gnu/packages/ldc.scm
+++ b/gnu/packages/ldc.scm
@@ -22,6 +22,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages libedit)
@@ -29,6 +30,48 @@
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages zip))
 
+(define-public rdmd
+  (let ((commit "4dba6877c"))
+    (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'.
+           (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"))))))))
+      (native-inputs
+       `(("ldc" ,ldc)))
+      (home-page "https://github.com/D-Programming-Language/tools/")
+      (synopsis "Tool for the D language which is used for compiling")
+      (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


[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

Dear list,

I would like to add rdmd.  Since it's a tool for the D programming
language, I think the best place to put it is ldc.scm.

Kind regards,
Roel Janssen

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

* Re: [PATCH] Add rdmd.
  2016-02-22 11:27 [PATCH] Add rdmd Roel Janssen
@ 2016-02-22 13:02 ` Roel Janssen
  2016-02-22 17:46   ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-02-22 13:02 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-rdmd-v2.patch --]
[-- Type: text/x-patch, Size: 2668 bytes --]

From 67222c11f6bb8d07b798b1f50eae6e23d8e77b2b Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Mon, 22 Feb 2016 14:00:53 +0100
Subject: [PATCH] gnu: Add rdmd.

* gnu/packages/ldc.scm (rdmd): New variable.
---
 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"))
+    (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'.
+           (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"))))))))
+      (native-inputs
+       `(("ldc" ,ldc)))
+      (home-page "https://github.com/D-Programming-Language/tools/")
+      (synopsis "Tool for the D language which is used for compiling")
+      (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


[-- Attachment #2: Type: text/plain, Size: 321 bytes --]

Dear list,

I forgot to add git-download to the modules.  Please use the patch
attached here.

Kind regards,
Roel Janssen


Roel Janssen writes:

> Dear list,
>
> I would like to add rdmd.  Since it's a tool for the D programming
> language, I think the best place to put it is ldc.scm.
>
> Kind regards,
> Roel Janssen


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

* Re: [PATCH] Add rdmd.
  2016-02-22 13:02 ` Roel Janssen
@ 2016-02-22 17:46   ` Leo Famulari
  2016-02-22 18:57     ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-02-22 17:46 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

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 <roel@gnu.org>
> 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`.

> +    (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?

> +           (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 :)

> +      (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.

> +      (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
> 

> Dear list,
> 
> I forgot to add git-download to the modules.  Please use the patch
> attached here.
> 
> Kind regards,
> Roel Janssen
> 
> 
> Roel Janssen writes:
> 
> > Dear list,
> >
> > I would like to add rdmd.  Since it's a tool for the D programming
> > language, I think the best place to put it is ldc.scm.
> >
> > Kind regards,
> > Roel Janssen
> 

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

* Re: [PATCH] Add rdmd.
  2016-02-22 17:46   ` Leo Famulari
@ 2016-02-22 18:57     ` Roel Janssen
  2016-02-22 19:46       ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-02-22 18:57 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-rdmd-v3.patch --]
[-- Type: text/x-patch, Size: 2662 bytes --]

From beec39d6bdc2489fb4b0eb17e59e44d848178436 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Mon, 22 Feb 2016 19:49:24 +0100
Subject: [PATCH] gnu: Add rdmd.

* gnu/packages/ldc.scm (rdmd): New variable.
---
 gnu/packages/ldc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 1981bc1..55dc0e9 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,47 @@
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages zip))
 
+(define-public rdmd
+  (let ((commit "4dba6877c481c1a911a7d50714da8fbd80022f0e"))
+    (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 "-" (string-take commit 7)))
+        (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'.
+           (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")))
+                (install-file "rdmd" bin)))))))
+      (native-inputs
+       `(("ldc" ,ldc)))
+      (home-page "https://github.com/D-Programming-Language/tools/")
+      (synopsis "Specialized equivalent to 'make' for the D language")
+      (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


[-- Attachment #2: Type: text/plain, Size: 4028 bytes --]


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 <roel@gnu.org>
>> 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
>> 
>

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

* Re: [PATCH] Add rdmd.
  2016-02-22 18:57     ` Roel Janssen
@ 2016-02-22 19:46       ` Leo Famulari
  2016-02-22 21:01         ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-02-22 19:46 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

On Mon, Feb 22, 2016 at 07:57:24PM +0100, Roel Janssen wrote:
> From beec39d6bdc2489fb4b0eb17e59e44d848178436 Mon Sep 17 00:00:00 2001
> From: Roel Janssen <roel@gnu.org>
> Date: Mon, 22 Feb 2016 19:49:24 +0100
> Subject: [PATCH] gnu: Add rdmd.
> 
> * gnu/packages/ldc.scm (rdmd): New variable.
> ---
>  gnu/packages/ldc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
> index 1981bc1..55dc0e9 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,47 @@
>    #:use-module (gnu packages textutils)
>    #:use-module (gnu packages zip))
>  
> +(define-public rdmd
> +  (let ((commit "4dba6877c481c1a911a7d50714da8fbd80022f0e"))
> +    (package
> +      (name "rdmd")
> +      (version "20160217")

How about this:
(version (string-append "0.0.0-1." (string-take commit 7)))

"0.0.0" indicates no upstream release, and "1" indicates the first
revision of the Guix package. This is what's specified in the manual,
section 7.6.3.

Although, I notice that upstream *has* released, so instead of "0.0.0",
we should use whatever version the desired commit is building on.

Does that make sense?

> +      (source (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://github.com/D-Programming-Language/tools.git")
> +              (commit commit)))
> +        (file-name (string-append name "-" (string-take commit 7)))

And then:
(file-name (string-append name "-" version "-checkout"))

Looks good with this change!

> +        (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'.
> +           (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")))
> +                (install-file "rdmd" bin)))))))
> +      (native-inputs
> +       `(("ldc" ,ldc)))
> +      (home-page "https://github.com/D-Programming-Language/tools/")
> +      (synopsis "Specialized equivalent to 'make' for the D language")
> +      (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
> 

> 
> 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 <roel@gnu.org>
> >> 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
> >> 
> >

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

* Re: [PATCH] Add rdmd.
  2016-02-22 19:46       ` Leo Famulari
@ 2016-02-22 21:01         ` Roel Janssen
  2016-02-23  6:36           ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Roel Janssen @ 2016-02-22 21:01 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-rdmd-v4.patch --]
[-- Type: text/x-patch, Size: 2699 bytes --]

From d6a457ed3dfceb65e1333ef943ed09d88b8385d2 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Mon, 22 Feb 2016 21:51:43 +0100
Subject: [PATCH] gnu: Add rdmd.

* gnu/packages/ldc.scm (rdmd): New variable.
---
 gnu/packages/ldc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
index 1981bc1..379bb8d 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,47 @@
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages zip))
 
+(define-public rdmd
+  (let ((commit "da0a2e0a379b08294015eec9d531f1e5dd4226f0"))
+    (package
+      (name "rdmd")
+      (version (string-append "v2.070.0-" (string-take commit 7)))
+      (source (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/D-Programming-Language/tools.git")
+              (commit commit)))
+        (file-name (string-append name "-" version "-checkout"))
+        (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'.
+           (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")))
+                (install-file "rdmd" bin)))))))
+      (native-inputs
+       `(("ldc" ,ldc)))
+      (home-page "https://github.com/D-Programming-Language/tools/")
+      (synopsis "Specialized equivalent to 'make' for the D language")
+      (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


[-- Attachment #2: Type: text/plain, Size: 8182 bytes --]


Leo Famulari writes:

> On Mon, Feb 22, 2016 at 07:57:24PM +0100, Roel Janssen wrote:
>> From beec39d6bdc2489fb4b0eb17e59e44d848178436 Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <roel@gnu.org>
>> Date: Mon, 22 Feb 2016 19:49:24 +0100
>> Subject: [PATCH] gnu: Add rdmd.
>> 
>> * gnu/packages/ldc.scm (rdmd): New variable.
>> ---
>>  gnu/packages/ldc.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 43 insertions(+)
>> 
>> diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm
>> index 1981bc1..55dc0e9 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,47 @@
>>    #:use-module (gnu packages textutils)
>>    #:use-module (gnu packages zip))
>>  
>> +(define-public rdmd
>> +  (let ((commit "4dba6877c481c1a911a7d50714da8fbd80022f0e"))
>> +    (package
>> +      (name "rdmd")
>> +      (version "20160217")
>
> How about this:
> (version (string-append "0.0.0-1." (string-take commit 7)))
>
> "0.0.0" indicates no upstream release, and "1" indicates the first
> revision of the Guix package. This is what's specified in the manual,
> section 7.6.3.
>
> Although, I notice that upstream *has* released, so instead of "0.0.0",
> we should use whatever version the desired commit is building on.
>
> Does that make sense?

Well, when running 'rdmd --version', it outputs:
rdmd build 20160222

The latest git tag says version says 'v2.070.0'.

So I've made it:
   (version (string-append "v2.070.0-" (string-take commit 7)))
   ...
   (file-name (string-append name "-" version "-checkout"))

>> +      (source (origin
>> +        (method git-fetch)
>> +        (uri (git-reference
>> +              (url "https://github.com/D-Programming-Language/tools.git")
>> +              (commit commit)))
>> +        (file-name (string-append name "-" (string-take commit 7)))
>
> And then:
> (file-name (string-append name "-" version "-checkout"))
>
> Looks good with this change!

I adopted this change. Thanks :)

>> +        (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'.
>> +           (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")))
>> +                (install-file "rdmd" bin)))))))
>> +      (native-inputs
>> +       `(("ldc" ,ldc)))
>> +      (home-page "https://github.com/D-Programming-Language/tools/")
>> +      (synopsis "Specialized equivalent to 'make' for the D language")
>> +      (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
>> 
>
>> 
>> 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 <roel@gnu.org>
>> >> 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
>> >> 
>> >


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

* Re: [PATCH] Add rdmd.
  2016-02-22 21:01         ` Roel Janssen
@ 2016-02-23  6:36           ` Leo Famulari
  2016-02-23  7:16             ` Roel Janssen
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-02-23  6:36 UTC (permalink / raw)
  To: Roel Janssen; +Cc: guix-devel

On Mon, Feb 22, 2016 at 10:01:39PM +0100, Roel Janssen wrote:
> * gnu/packages/ldc.scm (rdmd): New variable.

Thanks!

I updated your copyright line for the new year, made a minor adjustment
to the version string (specificying the Guix revision), and pushed!

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

* Re: [PATCH] Add rdmd.
  2016-02-23  6:36           ` Leo Famulari
@ 2016-02-23  7:16             ` Roel Janssen
  0 siblings, 0 replies; 8+ messages in thread
From: Roel Janssen @ 2016-02-23  7:16 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari writes:

> On Mon, Feb 22, 2016 at 10:01:39PM +0100, Roel Janssen wrote:
>> * gnu/packages/ldc.scm (rdmd): New variable.
>
> Thanks!
>
> I updated your copyright line for the new year, made a minor adjustment
> to the version string (specificying the Guix revision), and pushed!

Thanks!

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

end of thread, other threads:[~2016-02-23  7:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 11:27 [PATCH] Add rdmd Roel Janssen
2016-02-22 13:02 ` Roel Janssen
2016-02-22 17:46   ` Leo Famulari
2016-02-22 18:57     ` Roel Janssen
2016-02-22 19:46       ` Leo Famulari
2016-02-22 21:01         ` Roel Janssen
2016-02-23  6:36           ` Leo Famulari
2016-02-23  7:16             ` Roel Janssen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).