[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What should "guix build --source" produce? (was Re: Dependency cycle iss
Mark H Weaver
What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet)
Tue, 08 Sep 2020 00:07:01 -0400
> 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"
> + "libpng" "libjpeg" "pcre2" "sqlite"
> + "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
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?
- What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet),
Mark H Weaver <=