From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: [PATCH] import: hackage: default to https urls. Date: Tue, 30 Aug 2016 13:17:37 +0000 Message-ID: <87shtmflam.fsf@we.make.ritual.n0.is> References: <87y43eo2tl.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beivB-0007Ef-Qe for guix-devel@gnu.org; Tue, 30 Aug 2016 09:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beiv6-0002vT-6E for guix-devel@gnu.org; Tue, 30 Aug 2016 09:17:44 -0400 Received: from mithlond.libertad.in-berlin.de ([217.197.83.212]:43346 helo=beleriand.n0.is) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beiv5-0002vB-RN for guix-devel@gnu.org; Tue, 30 Aug 2016 09:17:40 -0400 Received: by beleriand.n0.is (OpenSMTPD) with ESMTPSA id 4b9bb2d3 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO for ; Tue, 30 Aug 2016 13:17:38 +0000 (UTC) In-Reply-To: <87y43eo2tl.fsf@we.make.ritual.n0.is> 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 ng0 writes: > 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. > > 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. For the commiter, could you be so kind and change "default" to "Default"? thanks. > * 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 > > > 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. > > 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 > > > -- > ng0 > For non-prism friendly talk find me on http://www.psyced.org -- ng0 For non-prism friendly talk find me on http://www.psyced.org