guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What should "guix build --source" produce? (was Re: Dependency cycle


From: Maxim Cournoyer
Subject: Re: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet)
Date: Fri, 11 Sep 2020 14:26:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi Mark,

Mark H Weaver <mhw@netris.org> writes:

> Hi Maxim,
>
> maxim.cournoyer@gmail.com writes:
>
>> While trying to move some of the patching done to qtbase into a snippet,
>> with the goal of having at least the ./configure script runnable in a
>> guix environment without having to manually run patching phases:
>
> [...]
>
>> +              (snippet
>> +               (with-imported-modules '((guix build utils))
>> +                 #~(begin
>> +                     (use-modules (guix build utils))
>> +                     ;; corelib uses bundled harfbuzz, md4, md5, sha3
>> +                     (with-directory-excursion "src/3rdparty"
>> +                       (for-each delete-file-recursively
>> +                                 (list "double-conversion" "freetype" 
>> "harfbuzz-ng"
>> +                                       "libpng" "libjpeg" "pcre2" "sqlite" 
>> "xcb"
>> +                                       "zlib")))
>> +
>> +                     (let ((coreutils #+(canonical-package coreutils)))
>> +                       (substitute* "configure"
>> +                         (("/bin/pwd")
>> +                          (string-append coreutils "/bin/pwd")))
>> +                       (substitute* "src/corelib/global/global.pri"
>> +                         (("/bin/ls")
>> +                          (string-append coreutils "/bin/ls"))))
>> +                     #t)))))
>
> Apart from the technical difficulties with cyclic modules, I'd like to
> raise another issue.
>
> In my opinion, "guix build --source PACKAGE" should produce sources that
> can be used to build the package on any system that the upstream package
> supports, not just on Guix systems.
>
> Alternatively, Guix should at least have *some* command to do this.
>
> Such a command would be especially useful for packages that we clean for
> FSDG compliance.  For example, I've made sure that "guix build --source
> icecat" produces a tarball that's suitable for any system that IceCat
> supports, and incidentally I intend to use Guix to generate the official
> IceCat source tarballs.
>
> Such a command would be useful for 'ungoogled-chromium' as well, and for
> many of our other packages that include snippets to remove
> non-FSDG-compliant code.
>
> The snippet that you proposed above would produce "sources" that can
> only be built on Guix systems, and moreover, only on the same
> architecture and core-updates cycle that produced it.
>
> I think that we ought to think about what "corresponding sources" should
> be, and put some care into making sure that "guix build --source"
> produces something worthy of that name.
>
> What do you think?

Thanks for those insightful remarks about what the source returned by
'guix build --source' should be.  I agree with you, and as Andreas
pointed, your remarks seem useful in drawing the distinction between
when to use snippets vs build phases.

Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]