unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] import: hackage: default to https urls.
@ 2016-08-30 12:31 ng0
  2016-08-30 13:17 ` ng0
  0 siblings, 1 reply; 3+ messages in thread
From: ng0 @ 2016-08-30 12:31 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

This patch updates the hackage importer so that `guix import hackage
name' writes out a package definition which includes
https://hackage.haskell.org by default. The home-page field was not
fixed, but this is less important than the download.
I know that tls/ssl itself has a problem, but some people can't just use
tor, so the default should be to use tls when available at the source.


[-- Attachment #2: 0001-import-hackage-default-to-https-urls.patch --]
[-- Type: text/x-patch, Size: 1771 bytes --]

From 07809dea5ea3b2bddad67c8f14f512ab40e42817 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 30 Aug 2016 12:08:21 +0000
Subject: [PATCH 1/2] import: hackage: default to https urls.

* guix/import/hackage.scm (hackage-source-url, hackage-cabal-url): Use https for
hackage.haskell.org.
---
 guix/import/hackage.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index f07f453..9af78ea 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,7 +75,7 @@
 (define (hackage-source-url name version)
   "Given a Hackage package NAME and VERSION, return a url to the source
 tarball."
-  (string-append "http://hackage.haskell.org/package/" name
+  (string-append "https://hackage.haskell.org/package/" name
                  "/" name "-" version ".tar.gz"))
 
 (define* (hackage-cabal-url name #:optional version)
@@ -82,9 +83,9 @@ tarball."
 .cabal file on Hackage.  If VERSION is #f or missing, the url for the latest
 version is returned."
   (if version
-      (string-append "http://hackage.haskell.org/package/"
+      (string-append "https://hackage.haskell.org/package/"
                      name "-" version "/" name ".cabal")
-      (string-append "http://hackage.haskell.org/package/"
+      (string-append "https://hackage.haskell.org/package/"
                      name "/" name ".cabal")))
 
 (define (hackage-name->package-name name)
-- 
2.9.3


[-- Attachment #3: Type: text/plain, Size: 372 bytes --]


Imported Adaptive with this from hackage. It is a broken build (fails
with errors which are in the build process, not within the package
definition), the download succeeds. I have no idea about haskell, this
is just to proof that it works, the hello-world kind of package.
If someone wants to fix this package or tell me how this can be fixed,
you are welcome to do so.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-gnu-Add-ghc-adaptive.patch --]
[-- Type: text/x-patch, Size: 1534 bytes --]

From f251f54d2c6078426d0fa20e914da7d1a4cada59 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Tue, 30 Aug 2016 12:22:51 +0000
Subject: [PATCH 2/2] gnu: Add ghc-adaptive.

* gnu/packages/haskell.scm (ghc-adaptive): New variable.
---
 gnu/packages/haskell.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 87628b5..d7dccc5 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6432,4 +6432,26 @@ can be specified precisely in the type.  The language is closely related to
 Epigram and Agda.")
     (license license:bsd-3)))
 
+(define-public ghc-adaptive
+  (package
+    (name "ghc-adaptive")
+    (version "0.23")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://hackage.haskell.org/package/"
+                           "Adaptive/Adaptive-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0n27d8dvk0qq68zp4l5bsj5y9xqmrk9d25psrrf29mmw1f43wp8c"))))
+    (build-system haskell-build-system)
+    (home-page "http://hackage.haskell.org/package/Adaptive")
+    (synopsis "Library for incremental computing.")
+    (description
+     "This is a Haskell (plus some extensions) implementation of a library for
+incremental computing.  It closely follows the implementation in the nice
+POPL 2002 paper \"Adaptive Functional Programming\", by Umut Acar,
+Guy Blelloch and Bob Harper.")
+    (license license:bsd-3)))
+
 ;;; haskell.scm ends here
-- 
2.9.3


[-- Attachment #5: Type: text/plain, Size: 70 bytes --]


-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org

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

end of thread, other threads:[~2016-08-30 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-30 12:31 [PATCH] import: hackage: default to https urls ng0
2016-08-30 13:17 ` ng0
2016-08-30 19:39   ` Efraim Flashner

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).