>From e7d84066efe5857581c1d03be5dfda95c1541462 Mon Sep 17 00:00:00 2001
From: Roel Janssen <r...@gnu.org>
Date: Fri, 22 Apr 2016 09:35:47 +0200
Subject: [PATCH] gnu: Add multichoose.

* gnu/packages/bioinformatics.scm (multichoose): New variable.
---
 gnu/packages/bioinformatics.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index d3895fd..41493ca 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5108,3 +5108,38 @@ group or two ChIP groups run under different conditions.")
    (description "This is a C++ wrapper around the Tabix project which abstracts
 some of the details of opening and jumping in Tabix-indexed files.")
    (license license:expat)))
+
+(define-public multichoose
+  (package
+    (name "multichoose")
+    (version "1.0.3")
+    (source (origin
+      (method url-fetch)
+      (uri (string-append "https://github.com/ekg/multichoose/archive/v";
+                          version ".tar.gz"))
+      (file-name (string-append name "-" version ".tar.gz"))
+      (sha256
+       (base32 "0xy86vvr3qrs4l81qis7ia1q2hnqv0xcb4a1n60smxbhqqis5w3l"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; There are no tests to run.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; There is no configure phase.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (install-file "multichoose" bin)
+               (install-file "multipermute" bin)))))))
+    (native-inputs
+     `(("python" ,python-2)
+       ("node" ,node)))
+    (home-page "https://github.com/ekg/multichoose";)
+    (synopsis "Library for a loopless multiset combination generation
+algorithm")
+    (description "This package provides a library implementing an efficient
+loopless multiset combination generation algorithm which is (approximately)
+described in \"Loopless algorithms for generating permutations, combinations,
+and other combinatorial configurations.\" G Ehrlich - Journal of the ACM (JACM),
+1973. (Algorithm 7.)")
+    (license license:expat)))
-- 
2.5.5

Ricardo Wurmus writes:

> Roel Janssen <r...@gnu.org> writes:
>
>> From edcf3132dca6c3e86439710892870285377adbb2 Mon Sep 17 00:00:00 2001
>> From: Roel Janssen <r...@gnu.org>
>> Date: Tue, 22 Mar 2016 15:07:47 +0100
>> Subject: [PATCH 3/8] gnu: Add multichoose.
>
>> * gnu/packages/bioinformatics.scm (multichoose): New variable.
>> ---
>>  gnu/packages/bioinformatics.scm | 35 +++++++++++++++++++++++++++++++++++
>>  1 file changed, 35 insertions(+)
>
>> diff --git a/gnu/packages/bioinformatics.scm 
>> b/gnu/packages/bioinformatics.scm
>> index fa7ba24..9465d56 100644
>> --- a/gnu/packages/bioinformatics.scm
>> +++ b/gnu/packages/bioinformatics.scm
>> @@ -4861,3 +4861,38 @@ algorithm.")
>>        ;; this program is a submodule, is licensed MIT, which is the same as
>>        ;; the Expat license.
>>        (license (list license:gpl2 license:expat)))))
>> +
>> +(define-public multichoose
>> +  (package
>> +    (name "multichoose")
>> +    (version "1.0.3")
>> +    (source (origin
>> +      (method url-fetch)
>> +      (uri (string-append "https://github.com/ekg/multichoose/archive/v";
>> +                          version ".tar.gz"))
>> +      (file-name (string-append name "-" version ".tar.gz"))
>> +      (sha256
>> +       (base32 "0xy86vvr3qrs4l81qis7ia1q2hnqv0xcb4a1n60smxbhqqis5w3l"))))
>> +    (build-system gnu-build-system)
>> +    (native-inputs
>> +     `(("python" ,python-2)
>> +       ("node" ,node)))
>> +    (arguments
>> +     `(#:tests? #f ; There are no tests to run.
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure) ; There is no configure phase.
>> +         (replace 'install
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
>> +               (install-file "multichoose" bin)
>> +               (install-file "multipermute" bin)))))))
>
> Nitpick: normally, we place the arguments right below the
> “build-system”.  The “native-inputs” then follow after “arguments”.

Ok.  I fixed this in the new patch.

>> +    (home-page "https://github.com/ekg/multichoose";)
>> +    (synopsis "Library for efficient loopless multiset combination 
>> generation
>> +algorithm")
>
> This synopsis is a bit long.  Maybe drop “efficient”?  (Most projects
> include “efficient” or “fast” in their descriptions, so it isn’t very
> useful in a synopsis.)

I dropped efficient.  A bit sad it doesn't keep the synopsis on a single
line.  I cannot think of a shorter way to describe this library.

>> +    (description "A library implements an efficient loopless multiset
>> +combination generation algorithm which is (approximately) described in
>> +\"Loopless algorithms for generating permutations, combinations, and other
>> +combinatorial configurations.\" G Ehrlich - Journal of the ACM (JACM),
>> +1973. (Algorithm 7.)")
>
> “A library”?  How about “This package provides a library implementing...”

Yes, that's better.  That reminds me to double-check descriptions for
complete sentences.  Thanks for catching this.


I attached a new patch.

Reply via email to