David Craven <da...@craven.ch> skribis:

> * gnu/packages/linux-libre.scm (make-linux-libre-source): New variable.
>   (linux-libre, linux-libre-4.4, linux-libre-4.1): Use
>   make-linux-libre-source.
>   (linux-libre-urls): Remove.

[...]

> -(define (linux-libre-urls version)
> -  "Return a list of URLs for Linux-Libre VERSION."

I would keep it…

> +(define-public (make-linux-libre-source version hash)
> +  (origin
> +    (method url-fetch)
> +    (uri (list (string-append
> +                "http://linux-libre.fsfla.org/pub/linux-libre/releases/";
> +                version "-gnu/linux-libre-" version "-gnu.tar.xz")
> +
> +               ;; XXX: Work around <http://bugs.gnu.org/14851>.
> +               (string-append
> +                "ftp://alpha.gnu.org/gnu/guix/mirror/linux-libre-";
> +                version "-gnu.tar.xz")
> +
> +               ;; Maybe this URL will become valid eventually.
> +               (string-append
> +                "mirror://gnu/linux-libre/" version "-gnu/linux-libre-"
> +                version "-gnu.tar.xz")))
> +    (sha256 (base32 hash))
> +    (patches (origin-patches %boot-logo-patch))))

… and make it a macro instead (and drop ‘make-’):

  (define-syntax-rule (linux-libre-source version hash)
    (origin
      ;; …
      (sha256 (base32 hash))))

Since it’s a macro, we’d still have the compile-time behavior of
‘base32’ that we discussed earlier.

WDYT?

Ludo’.

Reply via email to