summaryrefslogtreecommitdiff
path: root/guix/build
AgeCommit message (Collapse)Author
2026-05-18tests: builders: Switch to pyproject-build-system.Nicolas Graves
* guix/build/pyproject-build-system.scm (set-version): Ensure source is not #f before using it. * tests/builders.scm (make-python-dummy)[build-system]: Switch to pyproject-build-system. [native-inputs]: Add python-setuptools. (python-dummy-no-setuptools): Drop it. (check-build-success, check-build-failure): Refresh tests. (check-build-failure): Drop python-dummy-no-setuptools. Change-Id: I892b45c34b506ff27634e2ef706009dc81e831ec Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-05-18build-system: pyproject: Fix 'install phase for purelib/platlib.Nicolas Graves
* guix/build/pyproject-build-system.scm (install): [install-path, fix-scripts, distribution-name]: New helper procedures. [expand-data-directory]: Refactor and build upon install-path to handle purelib and platlib on top of just scripts and data. Change-Id: I64f5453676e6881ae1cbce3170ed854f7035982a Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-05-18build-system: pyproject: Add arguments to pytest_guix plugin.Nicolas Graves
* guix/build/pyproject-build-system.scm (keywords->alist, guile->python-keywords): Add procedures. (check): Convert keyword alist before writing it. * guix/build-system/pyproject.scm (%default-pytest-guix-options): Add some python kwargs in a guile format. * gnu/packages/aux-files/python/pytest_guix.py (pytest_addoption): Handle python kwargs when some are provided. Change-Id: Ie35e9b300acda830f35b6b754e8ccc07ad730faa Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-05-18build-system: pyproject: Add pytest-guix-options.Nicolas Graves
* guix/build/pyproject-build-system.scm (check): Pass pytest-guix-options to python through a hidden json file. * guix/build-system/pyproject.scm (%default-pytest-guix-options): Add variable. (pyproject-build): Use it. * gnu/packages/aux-files/python/pytest_guix.py: Import pytest-guix-options from guile through a hidden json file. Change-Id: Ice2ea72452c335b900bc354a04bd9657dc03d7d4 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-05-18build-system/pyproject: Ignore selected pytest inputs.Nicolas Graves
This commit includes squashed changes from https://codeberg.org/guix/guix/pulls/7220 and https://codeberg.org/guix/guix/pulls/7338. * gnu/packages/aux-files/python/pytest_guix.py: New file. * Makefile.am: Record it. * guix/build/pyproject-build-system.scm (check): Preload pytest_guix plugin when available. * guix/build-system/pyproject.scm (default-pytest-guix-plugin): New package, generated from pytest_guix.py. (lower): Add python-pytest-guix argument, and inject it if python-pytest is in the native-inputs. Change-Id: I13263b461e9962aad340347657b9c9685db63927 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-05-18build: pyproject: set-version: Support more backends.Nguyễn Gia Phong
hatch-vcs also uses the SETUPTOOLS_SCM_PRETEND_VERSION environment variable, while poetry-dynamic-versioning uses POETRY_DYNAMIC_VERSIONING_BYPASS. versioneer, on the other hand, read from the Python package's ._version.get_versions(). The version scheme for Python packaging is not the same as (nor compatible with) that of semantic version, hence stop mentioning the latter in the docstring and comments. When no relevant Python build backend is detected, regardless if the source has been obtained from a VCS checkout, it is confusing to mention any of the backends as unnecessary as a native input. Moreover, unlike the hatch-vcs, poetry-dynamic-versioning and setuptools-scm that works transparently with the build backend, pbr and versioneer are required for building. The output of the set-version phase has been adjusted accordingly. * guix/build/pyproject-build-system.scm (set-version): Add support for python-hatch-vcs. Clarify docstring. Log the explicit reason for noop cases. References: https://github.com/ofek/hatch-vcs#version-source-environment-variables References: https://github.com/mtkennerly/poetry-dynamic-versioning#environment-variables References: https://github.com/python-versioneer/python-versioneer References: https://docs.openstack.org/pbr/latest/user/packagers.html#versioning References: https://packaging.python.org/en/latest/specifications/version-specifiers Change-Id: I8f499856cb6b026539c96fb828e450a40ba10b79 Reviewed-by: Nicolas Graves <ngraves@ngraves.fr> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-04-15guix: Implement fossil-download.Nguyễn Gia Phong
* guix/fossil-download.scm: New file. * guix/build/fossil.scm: New file. * Makefile.am (MODULES): Add them. * etc/teams.scm (core)[#:scope]: Add "guix/fossil-download.scm". (vcs)[#:scope]: Add "guix/build/fossil.scm". * CODEOWNERS: Regenerate file. * doc/guix.texi (origin Reference): Document fossil-fetch and fossil-reference. * NEWS: Add entry about fossil-fetch. Change-Id: Ia252bcbbb417159a842d5092a937e2aad55a1656 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2026-04-12guix: texlive build system: Relax Metafont requirement.Nicolas Goaziou
* guix/build/texlive-build-system.scm (generate-font-metrics): Cater for texlive-metafont both as a native input and as an argument from texlive-local-tree. Change-Id: I32dd86d49ebcb49efd2a253c0491926e0333d3f4
2026-04-02build-system/r: Make test directory configurable.Ricardo Wurmus
Previously we would accept the #:test-directory argument but ignore the value. * guix/build-system/r.scm (r-build): Set default value for TEST-DIRECTORY field. * guix/build/r-build-system.scm (patch-tests): Use value of TEST-DIRECTORY argument. Change-Id: If435577bc0e90ede360ee281ee5bc27fa1b0b3f0
2026-03-30build: cargo: Separate the phases more distinctly.Efraim Flashner
* guix/build/cargo-build-system.scm (prepare-rust-crates): New phase. (unpack-rust-crates): Move old functionality to prepare-rust-crates. Take unpacking functionality from the configure phase. (%standard-phases): Add prepare-rust-crates between unpack and unpack-rust-crates. Change-Id: Ibc61a6d1de1eab269b021f977440aa3c631ffcf6 Signed-off-by: John Kehayias <john@guixotic.coop>
2026-03-26build-system: renpy: Drop reliance on python-build-system.Liliana Marie Prikler
* guix/build/renpy-build-system.scm (enable-bytecode-determinism): New variable. (%standard-phases): Replace python:enable-bytecode-determinism with own variant. * guix/build-system/renpy.scm (%renpy-build-system-modules): Drop (guix build python-build-system). Fixes: guix/guix#7426 (“Migrate `renpy-build-system' to pyproject”)
2026-03-18guix: clojure-utils: Drop unused @@* macro.Nicolas Graves
* guix/build/clojure-utils.scm (@@*): Drop macro. Change-Id: I7ca721f73d8333fb24b8f6b5354e4401bb05042d Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2026-03-18guix: clojure-utils: Drop duplicate @* macro.Nicolas Graves
This macro is now defined in (guix build-system) which is also imported where (guix build clojure-utils) is used. * guix/build/clojure-utils.scm (@*): Remove variable. Change-Id: Ifca0e772597ca8978f2281c455c9b9fba64299a1 Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2026-03-07build-system/r: Add build phase to skip tests.Ricardo Wurmus
* guix/build-system/r.scm (r-build): Pass TEST-DIRECTORY and SKIPPED-TESTS. * guix/build/r-build-system.scm (patch-tests): New procedure. (%standard-phases): Add it. Change-Id: I7abcd25260f5f55a342899371f4276306c911abe
2026-03-06build-system: glib-or-gtk: Also wrap binaries in sbin directories.Giacomo Leidi
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Also search “${directory}/sbin” for wrappable binaries. Change-Id: I970195bf53b00e0d87a01649581791ab72b7b91a Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2026-02-26build: Patch the git-lfs hooks shebangs in `git-fetch'.Maxim Cournoyer
This reverts commit b6a070d2a3c059c1a574dc4048fb8f942e008799, which patched git-lfs so its hooks would refer to a 'sh' from the store, but this reference was at risk of going stale since the hooks are installed and preserved outside the store. The shebangs are now patched in the `git-fetch' procedure directly. * guix/scripts/perform-download.scm (perform-git-download): Expand comment. * guix/git-download.scm (bash-package): New variable. (git-fetch/in-band*): Add #:bash argument. (git-fetch-builder): Add it to `inputs', so that it gets added to PATH. * guix/build/git.scm (git-fetch): Substitute /bin/bash in the post-checkout git-lfs hook shebang. Fixes: https://codeberg.org/guix/guix/issues/5616 Reported-by: Simon Josefsson <simon@josefsson.org> Change-Id: Ife81737705bef5d0a1edad307ed77a479af4609e
2026-02-22guix: Remove (guix build json) module.Nicolas Graves
This fixes guix/guix#4365. Merges guix/guix!6609 * guix/build/json.scm: Delete file. * Makefile.am: Unregister file. Change-Id: Iea07523afc8fe6752cecee15892d349cba299476 Signed-off-by: Cayetano Santos <csantosb@inventati.org>
2026-02-11build-system: mix: Set deterministic compiler option.Igorj Gorjaĉev
* guix/build/mix-build-system.scm (set-mix-env): Set deterministic compiler option. Merges: https://codeberg.org/guix/guix/pulls/5550 Change-Id: Id9d353bf9747d79ec6e86603f9fb899a0c607cbb Signed-off-by: Giacomo Leidi <therewasa@fishinthecalculator.me>
2026-02-07build-system/pyproject: Add phase 'set-version.Nicolas Graves
Rationale: When gradually moving sources to git-fetch, a lot of 'set-version phases have been added within the python packages. To support moving to git source even more, add a 'set-version phase that does this work automatically. * guix/build/pyproject-build-system.scm (set-version): New variable. (%standard-phases): Record 'set-version phase.
2026-02-07build-system: pyproject: Improve entry-point parser.Nicolas Graves
* guix/build/pyproject-build-system.scm (create-entrypoints): Add procedures parse-entry-points and parse-line. Change-Id: Ifd208df6a912431f8d996c5dab2b39987dcc3532 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system: pyproject: Fix entry points handling.Nicolas Graves
* guix/build/pyproject-build-system.scm (create-entrypoints): Correct the auto-generated script. Fixes: guix/guix#4509 Change-Id: I0689e99311ff29f58d93ce9a4cca03941ec74419 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system/pyproject: Improve style.Nicolas Graves
* guix/build/pyproject-build-system.scm (ensure-no-cythonized-files): Remove extra spaces in Python snippet. Change-Id: I1453e8707093e640e588d7221a8e71abf846c89f Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system/cargo: Using autoload for (json) module.Nicolas Graves
This allows to avoid the `with-extensions` everywhere. * guix/build/cargo-build-system.scm: Using autoload for (json) module. Change-Id: Iecf4ba8cfeed4b838a815288a59d35416b41553e Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system/pyproject: Using autoload for (json) module.Nicolas Graves
This allows to avoid the `with-extensions` everywhere. * guix/build/pyproject-build-system.scm: Using autoload for (json) module. Change-Id: Ie31579b377df34688a2cd4959f517b734eff5ffa Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system/pyproject: ensure-no-mtimes-pre-1980: Fix ftw use.Nguyễn Gia Phong
In (ftw startname proc), proc should return #t to continue, or any other value to stop. * guix/build/pyproject-build-system.scm (ensure-no-mtimes-pre-1980): Mirror the implementation in guix/build/pyproject-build-system.scm. References: https://www.gnu.org/software/guile/manual/html_node/File-Tree-Walk.html#index-ftw Change-Id: Ifb5d4ab35dfac0c164ea1ac7cf2a1fdf043d1d22 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-07build-system/pyproject: Decouple from python-build-system.Nicolas Graves
This is a step in the progressive deprecation of the python-build-system. It will later allow to deprecate and drop the build-system without needing a world rebuild. * guix/build/pyproject-build-system.scm (python-version, python-output, site-packages) (add-installed-pythonpath, add-install-to-pythonpath) (add-install-to-path, ensure-no-times-pre-1980) (enable-bytecode-determinism, ensure-no-cythonized-files) (check): Dropped unused argument. (wrap, sanity-check, rename-pth-file): Raw copy from guix/build/python-build-system.scm. Drop the import. Run the sanity-check phase before the check phase. Change-Id: I2d259ab464e4e188c3a8430caef271cbcd33eb36 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2026-02-02build: Revert misadaptation to http-client's http-fetch.Nguyễn Gia Phong
(guix build download) defines its own http-fetch and does not use (guix http-client). (guix build download-nar) also uses http-fetch from the former module. * guix/build/download.scm (url-fetch): Revert usage of http-fetch to that of the procedure defined in the module. * guix/build/download-nar.scm (download-nar): Revert usage of http-fetch to the one in (guix build download-nar). Fixes: 392cf48739f0 ("http-client: Alter http-fetch to return the response.") Change-Id: Iaccd9d8ed038e5b25a9cae4c1f4c1a6f809d1c6d Signed-off-by: Christopher Baines <mail@cbaines.net>
2026-01-28http-client: Alter http-fetch to return the response.Christopher Baines
Rather than just the port and response-content-length. I'm looking at using the response headers within the substitute script to work out when to close the connection. * guix/http-client.scm (http-fetch): Return the response as the second value, rather than the response-content-length. * guix/build/download-nar.scm (download-nar): Adapt accordingly. * guix/build/download.scm (url-fetch): Adapt accordingly. * guix/scripts/substitute.scm (process-substitution): Adapt accordingly. * guix/scripts/challenge.scm (call-with-nar): Adapt accordingly. Change-Id: I490ecf7cef1f5ebbf1e6ed026f6a8fc9dacc56be
2026-01-25gnu: texlive build system: Install info files and man pages.Nicolas Goaziou
Fixes: bug#54422 * guix/build/texlive-build-system.scm (install): Install info files and man pages at their expected location. Change-Id: Id4b6bc4d0f7b20b8cb0c98b24d8e66835aac5fb0 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2026-01-25gnu: Fix reproducibility for some TeX Live packages.Nicolas Goaziou
* guix/build/texlive-build-system.scm (configure-texmf): * gnu/packages/tex.scm (texlive-xindy-bin): Set TEXMFVAR to "/tmp" instead of the current build directory as the latter's contents may leak into the package output. For example, without this change LuaLaTeX, cache files were installed in the output in every package relying on "lualatex" format. Change-Id: I7d762b33a50e77af6b4eb1fb17d75dcc5eac950c Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-07build: renpy: Add check command.Liliana Marie Prikler
* guix/build/renpy-build-system.scm (start-xorg-server, check): New variables. (%standard-phases): Adjust accordingly. * guix/build-system/renpy.scm (renpy-build): Support #:tests? and #:test-flags.
2025-12-05build/syscalls: Smooth failure mode of (thread-count).Maxim Cournoyer
* guix/build/syscalls.scm (thread-count): Use 1 as a fallback when /proc/self/task could not be read, and return a count value (rather than a list). (unshare): Adjust accordingly. Fixes: #4231 Change-Id: Idcd59a4d2c211df3f2b832e912199f6a7f15e684
2025-12-03Update Giacomo's email address.Giacomo Leidi
The change was automated via: git grep -l goodoldpaul@autistici.org | xargs sed -i 's/goodoldpaul@autistici.org/therewasa@fishinthecalculator.me/g' * .mailmap: New entry. Change-Id: I1629388334695d221647afe6a14faf61af5fe0d6 Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-11-28gnu: cmake-build: Prevent stalls initiating tests.Greg Hogan
* guix/build/cmake-build-system.scm (check): Set minimum bound for test-load so that system tasks do not prevent low-core machines from starting execution of the test suite. Change-Id: I8751bb5b42c2a66f160117729fcb5648a635341c
2025-11-20build-system: cargo: Pass features to manifest-targets.Nicolas Graves
* guix/build/cargo-build-system.scm (manifest-targets): Pass features to manifest-targets. Change-Id: Id1a11d75d16389b92124fc49d2102d6aec935f64 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: cargo: Migrate to `cargo metadata`.Nicolas Graves
cargo read-manifest complains about its deprecation. The replacement is cargo metadata --no-deps --format-version 1, see https://github.com/rust-lang/cargo/issues/13629#cargo-read-manifest * guix/build/cargo-build-system.scm (manifest-targets): Refresh using `cargo metadata`. (has-executable-target?): Refresh accordingly. Change-Id: I4cd4881d37523a7ac1f70e68df457ceb9075c1c3 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: cargo: Migrate to (json).Efraim Flashner
Fixes guix/guix#2620. * guix/build-system/cargo.scm (%cargo-build-system-modules): Remove (guix build json). (cargo-guile-json): New procedure. (cargo-build, cargo-cross-build): Add guile-json extension. * guix/build/cargo-build-system.scm (manifest-targets): Adjust to using (json). Change-Id: I832a5555e63520241d3a4c4ccd2dcf860573dbab Change-Id: I545f72b00f17e88ad19fe33870785367cac63ac4 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: pyproject: Migrate to (json).Nicolas Graves
Since (json) is imported in Guix, we remove gradually the old (guix build json) module. * guix/build-system/pyproject.scm (%pyproject-build-system-modules): Remove (guix build json). (pyproject-guile-json): New procedure. (pyproject-build): Add guile-json extension, fix configure-flags argument. * guix/build/pyproject-build-system.scm (build): Refresh procedure replacing (guix build json) procedures with (json) ones. Change-Id: I3aede51f971b27104340816b60cf53174a9bd332 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: pyproject: Handle multiprocessing in the entry point.Nicolas Graves
Fixes guix/guix#1089. According to the multiprocessing documentation, the entry point should be protected by using `if __name__ == '__main__':`, see https://docs.python.org/3/library/multiprocessing.html#multiprocessing-programming Note that this is not the standard implementation highlighted in https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts but it will fix scripts using the standard lib multiprocessing and it should not harm any other script. guix/build/pyproject-build-system (create-entrypoints) [create-script]: Wrap execution line with `if __name__ == '__main__':` Change-Id: I450eb380cc4f613468395afd4b4eb52673d2ab1a Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: pyproject: Add -sP flags for entry-point wrapper.Nicolas Graves
Fixes guix/guix#1118. -P: prevents adding current working directory or script's directory to the search path for modules. -s: Prevent USER site-packages directory (~/.local/lib/pythonX.Y[t]/site-packages) from being included in the search path for modules. * guix/build/pyproject-build-system (create-entrypoints) [create-script]: Add -sP flags, improve pythonic style. Change-Id: Iabc7bb59bf08be1e0c662a069a30ae17a53c7fd5 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20build-system: pyproject: Normalize entry point import.Nicolas Graves
The standard is using from instead of import and it indeed allows to avoid some side-effects in some cases, see https://packaging.python.org/en/latest/specifications/entry-points/#use-for-scripts * guix/build/pyproject-build-system (create-entrypoints) [create-script]: Add -sP flags, improve pythonic style. * gnu/packages/video.scm (python-yewtube)[arguments]<#:phases>: Remove phase 'patch-script. Change-Id: I995454c774666ed474b2418c18ec36c4f53bf015 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-20guix: toml: Fix keys with embedded escape codes.Lars-Dominik Braun
Quoted keys are treated by the specification like ordinary strings, so escape codes must be handled as well. * guix/build/toml.scm (eval-value): Move string escape handling… (eval-value): …here. (eval-toml-file): Un-escape quoted keys. * tests/toml.scm ("parse-toml: Quoted keys with escapes"): New testcase. Fixes: guix/guix#2414 Change-Id: I612e415cc93207bbdd18b6ec8279255fee16670a Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-11-15build-system: renpy: Migrate to (json).Liliana Marie Prikler
* guix/build/renpy-build-system.scm: Use (json) rather than (guix build json). (install, install-desktop-file): Replace ‘read-json’ with ‘json->scm’. * guix/build-system/renpy.scm (default-guile-json): New variable. (%renpy-build-system-modules): Adjust accordingly. (renpy-build): Add guile-json argument and use it as extension. Fixes guix/guix#2618.
2025-11-15build-system: elm: Migrate to (json).Nicolas Graves
Fixes guix/guix#2617. * guix/build-system/elm.scm (%elm-build-system-modules) (%elm-default-modules): Remove (guix build json). (default-guile-json): New procedure. (elm-build): Add guile-json extension. * guix/build/elm-build-system.scm (stage, make-offline-registry-file) (read-offline-registry, find-indirect-dependencies) (patch-application-dependencies, configure): Refresh procedures replacing (guix build json) procedures with (json) ones. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2025-11-11guix: asdf-build-system: Only copy .asd for the package's systems.charje
* guix/build/asdf-build-system.scm (copy-files-to-output, install): New asd-systems input parameter integrated into build system. If the source code includes .asd files that are not meant to be loaded in a package, those .asd should not be installed. Since ASDF requires .asd file names to be unique, extraneous .asd files can cause conflicts if there is more than one .asd file with the same name that should not be loaded. This can happen if a project has example or template systems that are not meant to be loaded. Change-Id: Ib5772feab9d482c6327c31ead21330f49b257273 Signed-off-by: jgart <jgart@dismail.de>
2025-10-31guix: build-system: Add hare-build-system.Lilah Tascheter
* guix/build-system/hare.scm: New file. * guix/build/hare-build-system.scm: New file. * Makefile.am (MODULES): Add above new files. Change-Id: I5b760410f6cd2ede28b84e8d2db363ff968f16f6 Signed-off-by: jgart <jgart@dismail.de>
2025-10-30Revert "build/gnu: Do not attempt to strip Guile byte-compiled files."Maxim Cournoyer
This reverts commit 2ac2a4877d76e6ca4f4300e042050f7857fb2130.
2025-10-30Revert "build/gnu: Add a compress-debug-info phase."Maxim Cournoyer
This reverts commit 0688d2717416579cb455cac389e541f74be00a85.
2025-10-30Revert "syscalls: Add mmap support."Maxim Cournoyer
This reverts commit e1994a021437b3fd73089c08d7e8db876fad698d.
2025-10-30Revert "Use mmap for the elf parser, reducing memory usage."Maxim Cournoyer
This reverts commit 2c1fe0df11ae0f66392b8abb6f62430d79305538.