unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Marius Bakke <marius@gnu.org>, Roel Janssen <roel@gnu.org>,
	44613@debbugs.gnu.org
Subject: [bug#44613] what “guix build -S” should return?
Date: Fri, 13 Nov 2020 16:51:46 +0100	[thread overview]
Message-ID: <86eekxdzl9.fsf@gmail.com> (raw)
In-Reply-To: <87o8k1b8gk.fsf@gnu.org>

Hi Marius,

Thank you for the explanations.


On Fri, 13 Nov 2020 at 16:08, Marius Bakke <marius@gnu.org> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:
>
>> PS:
>> I am always confused if the removal should be done in ’origin’ or in the
>> ’add-after 'unpack’ phase; especially when the bundle is free software.
>> Other said, what should an user expect when fetching with “guix build -S”?
>> Anyway! :-)
>
> Unbundling is always better to do in a snippet.  It leads to less
> bandwidth usage, and users can more easily inspect the (actual) code.

Well, I do not know.  For example, I could do this workflow:

 guix environment bedtools
 tar -xvf $(guix build -S bedtools)
 make

which probably fails because removing the bundles often needs some extra
tweaks.  Concretely, see python-pysam for instance:

--8<---------------cut here---------------start------------->8---
              (snippet '(begin
                          ;; Drop bundled htslib. TODO: Also remove samtools
                          ;; and bcftools.
                          (delete-file-recursively "htslib")
                          #t))))
[...]
       #:phases
       (modify-phases %standard-phases
         (add-before 'build 'set-flags
           (lambda* (#:key inputs #:allow-other-keys)
             (setenv "HTSLIB_MODE" "external")
             (setenv "HTSLIB_LIBRARY_DIR"
                     (string-append (assoc-ref inputs "htslib") "/lib"))
             (setenv "HTSLIB_INCLUDE_DIR"
                     (string-append (assoc-ref inputs "htslib") "/include"))
--8<---------------cut here---------------end--------------->8---

Then, I am not convince that:

  guix build bedtools --with-git-url=http://example.org

works too.  Or ’--with-source=’ as well.  I remember a discussion
initiated by Mark and Maxim about this: snippet vs phases but I am not
able to reach it.


> For other kinds of patching the boundary is less clear.  Generally,
> Guix-specific tweaks should be in a phase, but "universal" bug fixes may
> well be in a snippet.

I agree that non-free and bug fixes should go to snippet.  Then I am
still confused and my feelings are mixed about Guix specific tweaks.


> I sometimes imagine a downstream distribution that use Guix sources, but
> not the build scripts, to draw the line.

It seems a good criteria to draw the line.  And in the case of bedtools
or python-pysam or many others, ’snippet’ removes (free software)
bundles because of an implicit and non-uniform Guix policy that a
downstream distribution could choose differently.

Well, my mind is not clear about this topic. :-)

All the best,
simon




      reply	other threads:[~2020-11-13 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 11:01 [bug#44613] [PATCH] Fix build for bedtools Roel Janssen
2020-11-13 12:39 ` zimoun
2020-11-13 12:55   ` Roel Janssen
2020-11-13 13:34     ` zimoun
2020-11-13 14:00       ` bug#44613: " Roel Janssen
2020-11-13 15:08       ` [bug#44613] " Marius Bakke
2020-11-13 15:51         ` zimoun [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=86eekxdzl9.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=44613@debbugs.gnu.org \
    --cc=marius@gnu.org \
    --cc=roel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).