[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#44613] what “guix build -S” should return?
From: |
zimoun |
Subject: |
[bug#44613] what “guix build -S” should return? |
Date: |
Fri, 13 Nov 2020 16:51:46 +0100 |
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