Patchwork [42/42] gnu: Add darcs.

login
register
mail settings
Submitter non such
Date Sept. 18, 2016, 4:10 p.m.
Message ID <20160918161022.26135-42-ng0@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/15744/
State New
Headers show

Comments

non such - Sept. 18, 2016, 4:10 p.m.
* gnu/packages/version-control.scm (darcs): New variable.
---
 gnu/packages/version-control.scm | 95 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)
Leo Famulari - Sept. 21, 2016, 1:44 a.m.
On Sun, Sep 18, 2016 at 04:10:22PM +0000, ng0 wrote:
> * gnu/packages/version-control.scm (darcs): New variable.

> +;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
> +;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
> +;; and results of search engines will show that if the protocol is http, https
> +;; is never mentioned.
> +(define-public darcs
> +  (package
> +    (name "darcs")
> +    (version "2.12.4")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://hackage.haskell.org/package/darcs/"
> +                                  "darcs-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +                "0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"))))
> +    (build-system haskell-build-system)
> +    (arguments
> +     `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
> +                           "-fnetwork-uri" "-fhttp" "--flag=executable"
> +                           "--flag=library")
> +       #:tests? #f)) ; 20 failing shell tests out of over 400

When the test suite fails, it provides a path to the log of the test
suite. I built with --keep-failed to inspect the log, but the file does
not exist.

Since the test suite is not passing, and there is no log of the tests,
it's hard to decide what to do :)

Does this darcs package work for your use case? Does anyone have advice?
non such - Sept. 21, 2016, 8:27 a.m.
Leo Famulari <leo@famulari.name> writes:

> On Sun, Sep 18, 2016 at 04:10:22PM +0000, ng0 wrote:
>> * gnu/packages/version-control.scm (darcs): New variable.
>
>> +;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
>> +;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
>> +;; and results of search engines will show that if the protocol is http, https
>> +;; is never mentioned.
>> +(define-public darcs
>> +  (package
>> +    (name "darcs")
>> +    (version "2.12.4")
>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append "https://hackage.haskell.org/package/darcs/"
>> +                                  "darcs-" version ".tar.gz"))
>> +              (sha256
>> +               (base32
>> +                "0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"))))
>> +    (build-system haskell-build-system)
>> +    (arguments
>> +     `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
>> +                           "-fnetwork-uri" "-fhttp" "--flag=executable"
>> +                           "--flag=library")
>> +       #:tests? #f)) ; 20 failing shell tests out of over 400
>
> When the test suite fails, it provides a path to the log of the test
> suite. I built with --keep-failed to inspect the log, but the file does
> not exist.
>
> Since the test suite is not passing, and there is no log of the tests,
> it's hard to decide what to do :)

Strange. Can you add a comment for this in the package, so we can fix it
eventually?

> Does this darcs package work for your use case? Does anyone have advice?
>

Additionally: Should the complete commented inputs go? They are parts of
base of ghc, but then again they display what ghc needs.

So far I was able to "darcs get http://pijul.org", I have not signed up
at a darcs hosting to push, I thought someone will report a bug when a
feature of darcs is broken. My use case worked.

For all the other packages: The changes are okay for me.

For @ version: The error message Guix throws should be extended. I am
doing "-" versions, but I've also seen "@" versions in the code and was
confused by the message guix gave me so I switched them to @.

Thanks for reviewing this huge bundle!
Leo Famulari - Sept. 23, 2016, 12:12 a.m.
On Tue, Sep 20, 2016 at 09:44:49PM -0400, Leo Famulari wrote:
> On Sun, Sep 18, 2016 at 04:10:22PM +0000, ng0 wrote:
> > * gnu/packages/version-control.scm (darcs): New variable.

I just pushed most of the patches in this series, except for darcs, with
the changes I suggested.

I did not push the darcs patch itself yet. I will look into that later
today.

I also did not push ghc-directory@1.2.2.0 because it is unused.
ng0 - Sept. 23, 2016, 9:12 a.m.
Leo Famulari <leo@famulari.name> writes:

> On Tue, Sep 20, 2016 at 09:44:49PM -0400, Leo Famulari wrote:
>> On Sun, Sep 18, 2016 at 04:10:22PM +0000, ng0 wrote:
>> > * gnu/packages/version-control.scm (darcs): New variable.
>
> I just pushed most of the patches in this series, except for darcs, with
> the changes I suggested.

Many thanks!

> I did not push the darcs patch itself yet. I will look into that later
> today.
>
> I also did not push ghc-directory@1.2.2.0 because it is unused.
>

Okay.

I think in darcs the configure flags can be shortened to 2 lines if the
-f instead of --flag is used, as explained on the hackage page, but this
is just cosmetic.
I also think for reference we should keep the versions of packages it
needs as they are so many. On the other hand hackage keeps the list of
dependencies and versions of those, so... should I send a patch removing
these comments?
Leo Famulari - Sept. 23, 2016, 1:48 p.m.
On Fri, Sep 23, 2016 at 09:12:33AM +0000, ng0 wrote:
> I also think for reference we should keep the versions of packages it
> needs as they are so many. On the other hand hackage keeps the list of
> dependencies and versions of those, so... should I send a patch removing
> these comments?

I think it's better to say how to learn that information. What's there
now will become obsolete sooner or later, and it's not clear to me how I
could update the information.
ng0 - Sept. 23, 2016, 8:08 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Fri, Sep 23, 2016 at 09:12:33AM +0000, ng0 wrote:
>> I also think for reference we should keep the versions of packages it
>> needs as they are so many. On the other hand hackage keeps the list of
>> dependencies and versions of those, so... should I send a patch removing
>> these comments?
>
> I think it's better to say how to learn that information. What's there
> now will become obsolete sooner or later, and it's not clear to me how I
> could update the information.
>

That's just taken directly from hackage and/or the initial error output
and/or the haskell setup file.

Should I adjust it? For me the source is 'normal' you find this
information when you look for the application:
https://hackage.haskell.org/package/darcs-2.12.4
Leo Famulari - Sept. 24, 2016, 2:26 a.m.
On Fri, Sep 23, 2016 at 08:08:37PM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Fri, Sep 23, 2016 at 09:12:33AM +0000, ng0 wrote:
> >> I also think for reference we should keep the versions of packages it
> >> needs as they are so many. On the other hand hackage keeps the list of
> >> dependencies and versions of those, so... should I send a patch removing
> >> these comments?
> >
> > I think it's better to say how to learn that information. What's there
> > now will become obsolete sooner or later, and it's not clear to me how I
> > could update the information.
> >
> 
> That's just taken directly from hackage and/or the initial error output
> and/or the haskell setup file.
> 
> Should I adjust it? For me the source is 'normal' you find this
> information when you look for the application:
> https://hackage.haskell.org/package/darcs-2.12.4

It looks like hackage provides that version information for many of
their packages. So, I don't think we need to include it in our Darcs
package.
Leo Famulari - Sept. 26, 2016, 9:04 p.m.
On Fri, Sep 23, 2016 at 02:27:28AM -0400, Leo Famulari wrote:
> On Wed, Sep 21, 2016 at 08:27:47AM +0000, ng0 wrote:
> > ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
> 
> Based on that link to the Darcs manual, my understanding is that users
> must provide Darcs with a set of URL handlers in the form of shell
> invocations in environment variables.

I was wrong; those variables are no longer used by Darcs. HTTPS should
"just work".

Here I am using Darcs from Debian Stretch:
$ darcs clone --debug-http https://dev.seek-together.space/s/fr33domlover/r/vervis
*   Trying 188.120.157.6...
* Connected to dev.seek-together.space (188.120.157.6) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 692 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: dev.seek-together.space (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: CN=dev.seek-together.space
* 	 start date: Tue, 09 Aug 2016 12:20:00 GMT
* 	 expire date: Mon, 07 Nov 2016 12:20:00 GMT
* 	 issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
* 	 compression: NULL
* ALPN, server did not agree to a protocol
> GET /s/fr33domlover/r/vervis/_darcs/prefs/motd HTTP/1.1
Host: dev.seek-together.space
User-Agent: darcs/2.12.0 libcurl/7.47.0
Accept: */*
Cache-Control: max-age=600

[... et cetera ...]

But, with the WIP Guix package, our libcurl does not find the
certificate store:

$ darcs clone --debug-http https://dev.seek-together.space/s/fr33domlover/r/vervis
*   Trying 188.120.157.6...
* TCP_NODELAY set
* Connected to dev.seek-together.space (188.120.157.6) port 443 (#0)
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification failed. CAfile: none CRLfile: none
* Curl_http_done: called premature == 1
* Closing connection 0
* Hostname dev.seek-together.space was found in DNS cache
*   Trying 188.120.157.6...
* TCP_NODELAY set
* Connected to dev.seek-together.space (188.120.157.6) port 443 (#1)
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification failed. CAfile: none CRLfile: none
* Curl_http_done: called premature == 1
* Closing connection 1
* Hostname dev.seek-together.space was found in DNS cache
*   Trying 188.120.157.6...
* TCP_NODELAY set
* Connected to dev.seek-together.space (188.120.157.6) port 443 (#2)
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification failed. CAfile: none CRLfile: none
* Curl_http_done: called premature == 1
* Closing connection 2

darcs failed:  Not a repository: https://dev.seek-together.space/s/fr33domlover/r/vervis (Peer certificate cannot be authenticated with given CA certificates)

HINT: Do you have the right URI for the repository?

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 29559bd..ae3728d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -35,6 +35,7 @@ 
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system haskell)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages apr)
@@ -50,6 +51,7 @@ 
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages haskell)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages nano)
   #:use-module (gnu packages ncurses)
@@ -1249,3 +1251,96 @@  a built-in wiki, built-in file browsing, built-in tickets system, etc.")
     (description "Stagit creates static pages for git repositories, the results can
 be served with a HTTP file server of your choice.")
     (license license:expat)))
+
+;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
+;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
+;; and results of search engines will show that if the protocol is http, https
+;; is never mentioned.
+(define-public darcs
+  (package
+    (name "darcs")
+    (version "2.12.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://hackage.haskell.org/package/darcs/"
+                                  "darcs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"))))
+    (build-system haskell-build-system)
+    (arguments
+     `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
+                           "-fnetwork-uri" "-fhttp" "--flag=executable"
+                           "--flag=library")
+       #:tests? #f)) ; 20 failing shell tests out of over 400
+    (inputs
+     `(("ghc-cmdargs" ,ghc-cmdargs) ; cmdargs ==0.10.*,
+       ("ghc-split" ,ghc-split) ; split >=0.2.2 && <0.3,
+       ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2) ; ==0.3.*
+       ("ghc-test-framework-hunit" ,ghc-test-framework-hunit) ; >=0.2.2 && <0.4,
+       ("ghc-test-framework" ,ghc-test-framework) ; test-framework >=0.4.0 && <0.9,
+       ("ghc-quickcheck" ,ghc-quickcheck) ; QuickCheck >=2.6 && <2.9,
+       ("ghc-findbin" ,ghc-findbin) ; FindBin ==0.0.*,
+       ("ghc-hunit" ,ghc-hunit) ; HUnit >=1.2.5.2 && <1.4,
+       ("ghc-array" ,ghc-array) ; (>=0.4.0.1 && <0.6)
+       ("ghc-async" ,ghc-async) ; (>=2.0.1.4 && <2.2)
+       ("ghc-attoparsec" ,ghc-attoparsec) ; (>=0.11 && <0.14)
+       ;; base (>=4.6 && <4.10)
+       ("ghc-base16-bytestring" ,ghc-base16-bytestring) ; (==0.1.*)
+       ("ghc-binary" ,ghc-binary) ; (>=0.5 && <0.9)
+       ("ghc-bytestring-builder" ,ghc-bytestring-builder) ; (>=0.10.0.2 && <0.11)
+       ;; containers (==0.5.*)
+       ("ghc-cryptohash" ,ghc-cryptohash) ; (>=0.4 && <0.12)
+       ("ghc-data-ordlist" ,ghc-data-ordlist) ; (==0.4.*)
+       ("ghc-directory" ,ghc-directory) ; (>=1.2.0.1 && <1.3.0.0)
+       ("ghc-fgl" ,ghc-fgl) ; (>=5.5.0.1 && <5.6)
+       ("ghc-system-filepath" ,ghc-system-filepath) ; (>=1.3.0.1 && <1.5.0.0)
+       ("ghc-graphviz" ,ghc-graphviz) ; (>=2999.17.0.1 && <2999.19)
+       ("ghc-hashable" ,ghc-hashable) ; (>=1.1.2.5 && <1.3)
+       ("ghc-haskeline" ,ghc-haskeline) ; (>=0.6.3 && <0.8)
+       ("ghc-html" ,ghc-html) ; (>=1.0.1.2 && <1.1)
+       ("ghc-mmap" ,ghc-mmap) ; (==0.5.*)
+       ("ghc-mtl" ,ghc-mtl) ; (>=2.1.2 && <2.3)
+       ("ghc-old-time" ,ghc-old-time) ; (==1.1.*)
+       ("ghc-parsec" ,ghc-parsec) ; (==3.1.*)
+       ("ghc-process" ,ghc-process) ; (>=1.1.0.2 && <1.5.0.0)
+       ("ghc-random" ,ghc-random) ; (>=1.0.1.1 && <1.2)
+       ("ghc-regex-applicative" ,ghc-regex-applicative) ; (>=0.2 && <0.4)
+       ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa) ; (>=0.95.1 && <0.96)
+       ("ghc-sandi" ,ghc-sandi) ; (>=0.2 && <0.4)
+       ("ghc-shelly" ,ghc-shelly) ; shelly >=1.6.2 && <1.7,
+       ("ghc-tar" ,ghc-tar) ; (>=0.4 && <0.6)
+       ;;("ghc-transformers" ,ghc-transformers) ; (>=0.3 && <0.4.0.0 || >0.4.0.0 && <0.6)
+       ("ghc-transformers-compat" ,ghc-transformers-compat) ; (>=0.4 && <0.6)
+       ("ghc-unix-compat" ,ghc-unix-compat) ; (>=0.1.2 && <0.5)
+       ("ghc-utf8-string" ,ghc-utf8-string) ; (>=0.3.6 && <1.1)
+       ("ghc-vector" ,ghc-vector) ; (>=0.10.0.1 && <0.12)
+       ("ghc-zip-archive" ,ghc-zip-archive) ; (>=0.2.3 && <0.4)
+       ("ghc-zlib" ,ghc-zlib) ; (>=0.5.4.1 && <0.7.0.0)
+       ("ghc-http" ,ghc-http) ; HTTP >=4000.2.8 && <4000.4
+       ("curl" ,curl)
+       ("ghc" ,ghc) ; >= 7.10.2
+       ("ncurses" ,ncurses)
+       ("perl" ,perl)
+       ("libiconv" ,libiconv)
+       ("ghc-network" ,ghc-network)
+       ("ghc-network-uri" ,ghc-network-uri)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (home-page "http://darcs.net")
+    (synopsis "Distributed Revision Control System")
+    (description
+     "Darcs is a revision control system.  It is:
+
+@enumerate
+@item Distributed: Every user has access to the full command set, removing boundaries
+between server and client or committer and non-committers.
+@item Interactive: Darcs is easy to learn and efficient to use because it asks you
+questions in response to simple commands, giving you choices in your work flow.
+You can choose to record one change in a file, while ignoring another.  As you update
+from upstream, you can review each patch name, even the full diff for interesting
+patches.
+@item Smart: Originally developed by physicist David Roundy, darcs is based on a
+unique algebra of patches.
+@end enumerate")
+    (license license:gpl2)))