There is currently no convenient way to inject our sanity-check.py
script in the inputs of a project that extends another build-system
with pyproject components. Thus we usually don't run sanity-check for
such cases (it's only python build and install).
This patch improves a bit this issue by exposing our script. Since it
doesn't change derivations, this doesn't lead to rebuilds and can be
merged in master.
* guix/build-system/pyproject.scm
(sanity-check.py): Replace variable by...
(default-sanity-check.py): Add exported procedure replacing and
extending former sanity-check.py.
(lower)[sanity-check.py]: Add and use argument.
Change-Id: I422d3d2d53b59548099d381feae9b956f5e2e07a
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/build-system/r.scm (bioconductor-uri): Update version in URI to 3.21.
* guix/import/cran.scm (%bioconductor-version): Update to 3.21.
Change-Id: I216576d42d013a00310cc2230e89567ffb1487a2
Like in other build-systems, make proper procedures to resolve the
build-system build-inputs bindings.
* guix/build-system/android-ndk.scm (default-android-build,
default-android-googletest): Add procedures.
(lower): Use them.
Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix/build-system/ruby.scm
(ruby-cross-build): Use with-imported-modules around the
ruby-cross-build builder gexp.
Change-Id: I1051124f034f2082ccef531e9bcf37913d5a9449
Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix/build-system/waf.scm
(waf-build): Use with-imported-modules around the waf-build builder gexp.
Change-Id: Id242046eb4bfef90dba60d7c3b1b68597ddf502e
Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-cross-build): Use with-imported-modules around the
glib-or-gtk-cross-build builder gexp.
Change-Id: I8eaa032ffc0a3f8dbf02c96a4ecee85475c32111
Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix/build-system/gnu.scm
(gnu-cross-build): Use with-imported-modules around the
gnu-cross-build builder gexp.
Change-Id: I47246571b1d84a82a67a8c289fd5ad4b5a3b5aeb
Signed-off-by: Christopher Baines <mail@cbaines.net>
Since these options were added for normal builds, those packages that used
these options couldn't be cross built. Supporting these options in
go-cross-build restores this functionality.
* guix/build-system/go.scm (go-cross-build): Support the #:parallel-build? and
#:parallel-tests? keyword arguments.
Change-Id: I9768c9562246b61c2ea875a3d5a42809924f3a7d
If the new-name matches the original name, just use the original package.
This avoids situations where there are several packages matching the name and
the behaviour will be inconsistent, occasionally picking different packages.
Since there are multiple glibc packages currently, I'm seeing this behaviour
with cl-posix-mqueue and ecl-cl-posix-mqueue, occasionally they'll use the
hurd glibc variant.
* guix/build-system/asdf.scm (package-with-build-system): Use the original
input packages unless the new-name differs.
Change-Id: I08a1f3ad1290689b5497d31950ada4dc0bfa3a3a
The list of modules used by default was not public, so users of this build
system had to pick between copy&pasting the list, or using
%glib-or-gtk-build-system-modules. The former is sub-optimal, since it is
hard to keep it in sync. The latter is just wrong and leads to basically
fall-backing to gnu-build-system.
The solution is to export the default list giving the users option to use it
directly.
* guix/build-system/glib-or-gtk.scm
(%glib-or-gtk-build-system-default-modules): Renamed from %default-modules.
(define-module): Export it.
(glib-or-gtk-build), (glib-or-gtk-cross-build): Use it.
Change-Id: I331b2a3f0bdc3ce14eb9f2f80605e7873369168d
Signed-off-by: Andreas Enge <andreas@enge.fr>
Following discussions in bug #74204.
* guix/build-system/guile.scm (guile-build): Add a #:parallel-build? flag,
defaulting to #f for now.
(guile-cross-build): Likewise.
* guix/build/guile-build-system.scm (build): Honor it.
Change-Id: Ibf12ac098e9dcea83da7b9685796e501df606c6c
Golang project's root may miss any .go files which makes build phase to
fail with error similar to:
no Go files in /tmp/<...>/src/golang.org/x/mod
This change implements a SKIP-BUILD? key parameter which is, by default,
set to #f to invoke build procedure. It is taken from cargo-build-system
* guix/build-system/go.scm (go-build, go-cross-build): Add "skip-build?"
key parameter.
* guix/build/go-build-system.scm (build): Add "skip-build?" key
parameter and implement logic.
Change-Id: I3f41414868a7329cbe99324106427cdae4884d94
Golang projects may contain subdirectories with test files, which can't
be reached by providing just IMPORT-PATH to the test runner. This
change implements a TEST-SUBDIRS key parameter which is by default set
to "import-path/..." to run all available tests in the project, and may
be limited to particular subdirs list.
* guix/build-system/go.scm (go-build, go-cross-build): Add "test-subdirs"
key parameter.
* guix/build/go-build-system.scm (check): Add "test-subdirs" key
parameter and adjust test invokation accordingly.
Change-Id: Ibc107deea060f0d71e6f4e1e37c81d3b7c9992f5
Move the extra configure flags for cross building out from the build side code and instead
prepend them to the configure-flags.
Use new procedure cmake-system-name-for-target to add support for hurd and
bare-metal targets.
* guix/build/cmake-build-system.scm (configure): Move cross build flags from
here ...
* guix/build-system/cmake.scm (cmake-cross-build): ... to here.
(cmake-system-name-for-target): New procedure.
Change-Id: Ic68acc246e543491ed147e53d47cec5de46b82cb
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
The default behavior for 'cargo test' is to build in debug mode, and many test
suites expect support for things provided in this mode such as debug
assertions (see for example:
<https://github.com/google/zerocopy/issues/2143>).
* guix/build-system/cargo.scm (cargo-build): Remove '--release' from
#:cargo-test-flags.
* guix/build/cargo-build-system.scm (check): Likewise.
Change-Id: I8a659c25bd33bc1bdfd88e440bd00bad09a5fc01
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* guix/build-system/cargo.scm (cargo-triplet): New procedure.
(cargo-build, cargo-cross-build): Add cargo-target.
(lower): Add cargo-target as private keyword.
* guix/build/cargo-build-system.scm (configure): Use cargo-target to set
CARGO_BUILD_TARGET.
Change-Id: I476fa195dce0e9d20d59dda7dd15f050a56a15cb
* guix/build-system/zig.scm (#:parallel-build?,#:parallel-tests?):
New arguments.
* guix/build/zig-build-system.scm (zig-arguments): New procedure.
(bulid): Use it and honor #:parallel-build?.
(check): Use it and honor #:parallel-tests?.
* gnu/packages/zig.scm (zig): Define as zig-0.13.
* gnu/packages/ncdu.scm (ncdu)[arguments]<#:zig>: Unset.
<#:zig-release-type>: Set to "safe".
<#:zig-build-flags>: Add "-Dpie".
* gnu/packages/zig-xyz.scm (river)[arguments]<#:zig>: Use zig-0.10.
(zig-zls)[arguments]<#:zig>: Use zig-0.10.
<#:zig-release-type>: Set to "safe".
Change-Id: I1f0087ff39ea9fecb2ad911019d0525f1e6285f6
PEP 517 specifies it should be a dictionary and thus meson-python cannot
handle an empty list.
Fixes: <https://issues.guix.gnu.org/62781>
* guix/build-system/pyproject.scm (lower): Change default of configure-flags.
* gnu/packages/build-tools.scm (meson-python)[arguments]: Remove #:build-backend,
which was a workaround for this bug.
[native-inputs]: Remove python-p~a-build and python-wheel, which are
not required when using the default build system.
Change-Id: I240ced5c88cf55cbee0d6005d7657bfb6b653b12
More reliable than regular expressions.
* guix/build-system/pyproject.scm (%pyproject-build-system-modules): Add (guix build toml).
(pyproject-build): Add argument #:backend-path.
* guix/build/pyproject-build-system.scm (build): Add support for
auto-detected and override backend-path.
* gnu/packages/python-build.scm (python-tomli)[arguments]: Remove
'add-self-to-path, because it is not necessary any more.
(python-poetry-core): Same.
(python-hatchling): Same.
(python-pdm-backend): Same.
Also adds python-setuptools and python-wheel to relevant packages,
either to native-inputs or to propagated inputs if the pkg_resources
Python module is loaded at runtime.
* guix/build-system/pyproject.scm (default-python): Default to
python-sans-pip-wrapper.
Change-Id: I2d986c2225114f54459dd6bb360913106e52cdf4
* guix/build-system/r.scm (r-build): Accept optional TEST-TYPES argument and
pass it to the build phases.
* guix/build/r-build-system.scm (check): Exit R with the return value of
tools:::testInstalledPackage; stop the test suite on the first error; respect
TEST-TYPES argument; dump logs on test failure.
Change-Id: Ia83407ceb2ef2a92cfa02f3a3d661f54cf8c8b40
* guix/build-system/meson.scm (meson-build) <#:parallel-tests?>: Set default
value of argument to #t.
Fixes: https://issues.guix.gnu.org/73135
Change-Id: I0d2c00c610778534a4558c446bf71955581697a1
* guix/build-system/go.scm: Add missing copyright record to the header
for Christina O'Donnell <cdo@mutix.org>.
* guix/import/go.scm: Likewise.
Change-Id: If8b6b5dd31126b9209da5b6c0ad1d479c653bbe6
This implements logic to handle cases where Go can have multiple modules
at different versions within a single repository. It distinguishes their
releases by using tags along with their subdirectories. See
https://go.dev/ref/mod#vcs-version.
* guix/build-system/go.scm (go-version->git-ref): Add <#:subdir> keyword
parameter and extend condition checks.
Change-Id: I68bc9e785e49877bb0b756de8458308549f4c957
Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
By allowing the use of test flags, we can more precisely skip failing tests
(for go version >=1.20), disable the vetting stage or select a subset of tests
(e.g. if an upstream flag is provided to skip tests which require a network
connection). At the moment, the only way around these test failures is to
remove the test file completely or patch the code ourselves.
* guix/build-system/go.scm (go-build): Add test-flags variable.
(go-cross-build): Add test-flags variable.
* guix/build/go-build-system.scm (check): Pass the additional test flags to the invoke call.
* doc/guix.texi (go-build-system): Document <#:test-flags> parameter.
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Change-Id: I4015870fbbc15503cb405fe9ef6032953a5ff17f
The Minetest engine and the "Minetest Game" have been decoupled upstream
in Minetest 5.9.0:
https://dev.minetest.net/Changelog#Minetest_Game
* gnu/packages/minetest.scm (minetest): Update to 5.9.0.
[arguments]: Adjust #:configure-flags and #:phases to account for the
removal of the Minetest Game from the Minetest codebase.
[native-search-paths, synopsis, description]: Likewise.
[inputs]: Remove IRRLICHT-FOR-MINETEST.
(minetest-data): Update to 0.0.0-0.88ecab3. Rename to MINETEST-GAME and
deprecate MINETEST-DATA.
[synopsis, description]: Adjust to account for the decoupling of the game from
the engine.
* gnu/packages/games.scm (irrlicht-for-minetest): Remove variable.
* guix/build-system/minetest.scm (default-minetest-game): New variable.
(%default-modules): Use it.
Change-Id: I0117bd33a2ce5eb1c79fdb29878682081f61dd4e
Signed-off-by: Leo Famulari <leo@famulari.name>
Meson currently supports only out-of-source builds. Add the argument
out-of-source? with default to #t such that the install-license-files phase
searches for the license files in the source directory.
* guix/build-system/meson.scm (meson-build): Add out-of-source? argument.
(meson-cross-build): Likewise.
Change-Id: Ib59d9d93b34fd567f05f5f9a10293f6ab924e399
Signed-off-by: Christopher Baines <mail@cbaines.net>