all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: guix-devel@gnu.org
Subject: ‘snippet’ in <origin>
Date: Thu, 07 Nov 2013 23:43:24 +0100	[thread overview]
Message-ID: <87a9hfq1df.fsf_-_@gnu.org> (raw)
In-Reply-To: <87eh6tk75p.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 06 Nov 2013 14:10:26 +0100")

ludo@gnu.org (Ludovic Courtès) skribis:

> +                 ;; See <http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01383.html>.
> +                 'configure 'remove-non-free-files
>
> It’s a case where ‘guix build -S’ will return the source including the
> non-free files, which is clearly not what we want (though I gather that
> the next upstream version of LAPACK will be fixed, right?).
>
> Two things we could do: (1) add a ‘snippet’ field in ‘origin’, which is
> where the ‘remove-file’ calls would appear, (2) host a freed version
> under alpha.gnu.org/gnu/guix/mirror.

Commit f9cc897 in master adds a ‘snippet’ field in <origin>, which in
this particular case is used like this (commit 6a99575):

     (origin
      (method url-fetch)
      (uri (string-append "http://www.netlib.org/lapack/lapack-"
                          version ".tgz"))
      (sha256
       (base32
        "1w7sf8888m7fi2kyx1fzgbm22193l8c2d53m8q1ibhvfy6m5v9k0"))
      (snippet
       ;; Remove non-free files.
       ;; See <http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg01383.html>.
       '(for-each (lambda (file)
                    (format #t "removing '~a'~%" file)
                    (delete-file file))
                  '("lapacke/example/example_DGESV_rowmajor.c"
                    "lapacke/example/example_ZGESV_rowmajor.c"
                    "DOCS/psfig.tex"))))

Problem solved.  :-)

This change breaks the ABI; make sure to run ‘make clean-go && make’!

Note that things occur in this order:

  1. The upstream source is unpacked.

  2. We chdir to the first directory created by that step (normally
     there is exactly one.)

  3. Patches are applied.

  4. The snippet is run.

  5. The directory is repacked.

Of course we get less flexibility by having things hardcoded this way,
but the goal is to keep it much simpler than what is done for <package>.

Mark: how well would this scheme apply to the mit-krb5 case?

Comments welcome!

Ludo’.

  parent reply	other threads:[~2013-11-07 22:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23  9:08 LAPACK: tests fail; non-free files Nikita Karetnikov
2013-10-23  9:16 ` Nikita Karetnikov
2013-10-23 11:57 ` Andreas Enge
2013-10-24 19:33   ` Nikita Karetnikov
2013-11-04 19:19   ` [PATCH] gnu: Add LAPACK. (was: LAPACK: tests fail; non-free files) Nikita Karetnikov
2013-11-06 13:10     ` [PATCH] gnu: Add LAPACK Ludovic Courtès
2013-11-07  8:49       ` Nikita Karetnikov
2013-11-07 22:43       ` Ludovic Courtès [this message]
2013-11-08  6:32         ` ‘snippet’ in <origin> Mark H Weaver
2013-11-08 13:02           ` Ludovic Courtès
2013-11-08 15:13             ` Mark H Weaver
2013-11-08 21:15             ` Ludovic Courtès
2013-10-23 22:41 ` [PATCH] gnu: cmake: Bump to 2.8.12 Cyril Roelandt
2013-10-24 19:35   ` Nikita Karetnikov
2013-10-28 23:14   ` Ludovic Courtès
2013-10-29  8:22     ` Andreas Enge
2013-10-29 10:42       ` Ludovic Courtès
2013-10-31 22:42     ` Cyril Roelandt
2013-11-01  8:50       ` Andreas Enge

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=87a9hfq1df.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=nikita@karetnikov.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.