all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ng0 <ng0@we.make.ritual.n0.is>
To: guix-devel@gnu.org
Subject: Re: [PATCH] import: hackage: default to https urls.
Date: Tue, 30 Aug 2016 13:17:37 +0000	[thread overview]
Message-ID: <87shtmflam.fsf@we.make.ritual.n0.is> (raw)
In-Reply-To: <87y43eo2tl.fsf@we.make.ritual.n0.is>

ng0 <ng0@we.make.ritual.n0.is> 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 <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.

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

  reply	other threads:[~2016-08-30 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 12:31 [PATCH] import: hackage: default to https urls ng0
2016-08-30 13:17 ` ng0 [this message]
2016-08-30 19:39   ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shtmflam.fsf@we.make.ritual.n0.is \
    --to=ng0@we.make.ritual.n0.is \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.