From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: [PATCH] import: hackage: default to https urls. Date: Tue, 30 Aug 2016 12:31:50 +0000 Message-ID: <87y43eo2tl.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beiCs-0001Co-Et for guix-devel@gnu.org; Tue, 30 Aug 2016 08:31:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beiCp-0000oO-3d for guix-devel@gnu.org; Tue, 30 Aug 2016 08:31:58 -0400 Received: from mithlond.libertad.in-berlin.de ([217.197.83.212]:43171 helo=beleriand.n0.is) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beiCo-0000nw-Nz for guix-devel@gnu.org; Tue, 30 Aug 2016 08:31:55 -0400 Received: by beleriand.n0.is (OpenSMTPD) with ESMTPSA id ce5890da TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO for ; Tue, 30 Aug 2016 12:31:51 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-import-hackage-default-to-https-urls.patch Content-Transfer-Encoding: 8bit >From 07809dea5ea3b2bddad67c8f14f512ab40e42817 Mon Sep 17 00:00:00 2001 From: ng0 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 ;;; Copyright © 2016 Eric Bavier +;;; Coypright © 2016 ng0 ;;; ;;; 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 --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-ghc-adaptive.patch >From f251f54d2c6078426d0fa20e914da7d1a4cada59 Mon Sep 17 00:00:00 2001 From: ng0 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 --=-=-= Content-Type: text/plain -- ng0 For non-prism friendly talk find me on http://www.psyced.org --=-=-=--