summaryrefslogtreecommitdiff
path: root/guix/build
AgeCommit message (Collapse)Author
2024-03-09download: Honor ‘GUIX_DOWNLOAD_METHODS’ environment variable.Ludovic Courtès
This replaces ‘GUIX_DOWNLOAD_FALLBACK_TEST’ and allows you to test various download methods, like so: GUIX_DOWNLOAD_METHODS=nar guix build guile-gcrypt -S --check GUIX_DOWNLOAD_METHODS=disarchive guix build hello -S --check * guix/build/download.scm (%download-methods): New variable. (download-method-enabled?): New procedure. (url-fetch): Define ‘initial-uris’; honor ‘download-method-enabled?’. Call ‘disarchive-fetch/any’ only when the 'disarchive method is enabled. * guix/build/git.scm (git-fetch-with-fallback): Honor ‘download-method-enabled?’. * guix/download.scm (%download-methods): New variable. (%download-fallback-test): Remove. (built-in-download): Add #:download-methods parameter and honor it. (url-fetch*): Pass #:content-addressed-mirrors and #:disarchive-mirrors unconditionally. * guix/git-download.scm (git-fetch/in-band*): Pass “git url” unconditionally. (git-fetch/built-in): Likewise. Pass “download-methods”. * guix/bzr-download.scm (bzr-fetch)[build]: Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. * guix/cvs-download.scm (cvs-fetch)[build]: Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. * guix/hg-download.scm (hg-fetch): Honor ‘download-method-enabled?’. Pass #:env-vars to ‘gexp->derivation’. * guix/scripts/perform-download.scm (perform-download): Honor “download-methods” from DRV. Parameterize ‘%download-methods’ before calling ‘url-fetch’. (perform-git-download): Likewise. * guix/svn-download.scm (svn-fetch): Honor ‘download-method-enabled?’. Pass ‘GUIX_DOWNLOAD_METHODS’ to #:env-vars. (svn-multi-fetch): Likewise. Change-Id: Ia3402e17f0303dfa964bdc761265efe8a1dd69ab
2024-03-09perform-download: Allow use of ‘download-nar’ for ‘--check’ builds.Ludovic Courtès
Previously, the nar fallback would always fail on ‘--check’ build because the output directory in that case is different from the store file name. This change fixes that. * guix/build/git.scm (git-fetch-with-fallback): Add #:item parameter and pass it to ‘download-nar’. * guix/scripts/perform-download.scm (perform-git-download): Pass #:item to ‘git-fetch-with-fallback’. Change-Id: I30fc948718e99574005150bba5215a51ef153c49
2024-03-09download-nar: Distinguish ‘output’ and ‘item’ parameter.Ludovic Courtès
This is useful when running a ‘--check’ build, where the output file name differs from the store file name we are trying to restore. * guix/build/download-nar.scm (download-nar): Add ‘output’ parameter and distinguish it from ‘item’. Change-Id: I42219b6d4c8fd1ed506720301384efc1aa351561
2024-03-09bzr-download: Implement nar fallback.Ludovic Courtès
* guix/bzr-download.scm (bzr-fetch)[guile-json, guile-lzlib, guile-gnutls]: New variables. [build]: Add ‘with-extensions’ and import more modules. Invoke ‘download-nar’ when ‘bzr-fetch’ returns #f. * guix/build/bzr.scm (bzr-fetch): Actually return #t on success. Change-Id: Id5d4ebd0f9ddc3c44b6456d3b46c0000cc7b9997
2024-03-04gnu: perl6-tap-harness: Update to 0.3.5.Paul A. Patience
* gnu/packages/perl6.scm (perl6-tap-harness): Update to 0.3.5. [source]: Update URL. Reindent. [arguments]: Replace obsolete prove6 script with manual Raku invocation in 'check' phase. [home-page]: Update. [synopsis]: Replace mention of Perl with Raku. * gnu/packages/rakudo-build-system.scm (check): Replace obsolete prove6 script with manual Raku invocation. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2024-03-04gnu: rakudo: Update to 2022.04.Paul A. Patience
* gnu/packages/perl6.scm (rakudo): Update to 2022.04. [source]: Add snippet to delete bundled 3rdparty directory. [arguments]: Add 'remove-calls-to-git', 'fix-paths' and 'disable-failing-tests' phases. Remove 'patch-source-date' phase. Adjust files in 'patch-more-shebangs' phase and sort them. Remove redundant './' from 'configure' phase. Replace Perl extensions and paths with Raku equivalents in 'install-dist-tool' phase. [native-inputs]: Add nqp-configure. [synopsis, description]: Replace mentions of Perl with Raku. * guix/build/rakudo-build-system.scm (install): Replace Perl extension with Raku extension. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2024-03-02build-system/guile: Install .scm files first.Tomas Volf
Until now the .go files were generated first, and only after that the .scm files were installed into the target location. That led to a lot of messages about `source file ... newer than compiled' if the custom 'check phase tried to load the compiled files. Swapping the order of the actions resolves the issue allowing the tests to be written without lot of noise in the build log. For final artifacts it was not a problem, since daemon resets the timestamps. * guix/build/guile-build-system.scm (build): Install .scm before producing .go. Change-Id: I3428d144fcbaa6c904ee662193c3bca82589e344 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-02build-system/guile: Fix indentation.Tomas Volf
The inner (let) was on the same level as the outer one, which was confusing. * guix/build/guile-build-system.scm (build): Fix indentation. Change-Id: I701b61747c270b185eac9377b066748baa2b3d20 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-02build-system/guile: Fix typo in documentation string.Tomas Volf
* guix/build/guile-build-system.scm (install-documentation): Fix typo in documentation string. Change-Id: I8940591fcbf8222c8f8365dabbac0e8300cad84c Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-02-28Merge branch 'rust-team'Efraim Flashner
Change-Id: Iee31c5de29c357c822f60df4fa8ce758779eb349
2024-02-20build: cargo: Add support for x86_64-linux-gnux32.Efraim Flashner
* guix/build/cargo-build-system.scm (configure): Add entry for x86_64-linux-gnux32 in CARGO_BUILD_TARGET. Change-Id: Iae363d4e7962af1ebd4f2ed0f4276663b2245580
2024-02-20syscalls: ‘processes’ really omits kernel threads.Ludovic Courtès
Fixes a bug whereby ‘processes’ would include kernel threads, thereby leading the ‘stop’ method of ‘user-processes’ to wait indefinitely for a kernel thread. Code taken from the Shepherd. Fixes <https://issues.guix.gnu.org/68800>. * guix/build/syscalls.scm (kernel?): Remove. (linux-process-flags, linux-kernel-thread?, pseudo-process?): New procedures. (PF_KTHREAD): New variable. (processes): Use ‘pseudo-process?’ instead of ‘kernel?’. Reported-by: Tomas Volf <~@wolfsden.cz> Change-Id: I8c439cdaf868a8f899de7fe500ce8bf10e5fc290
2024-02-12git-download: Download from SWH by nar hash when possible.Ludovic Courtès
* guix/build/git.scm (git-fetch-with-fallback): Add #:hash and #:hash-algorithm. Try ‘swh-download-directory-by-nar-hash’ before ‘swh-download’ when #:hash is provided. * guix/git-download.scm (git-fetch/in-band*): Pass #:hash and #:hash-algorithm to ‘git-fetch-with-fallback’. * guix/scripts/perform-download.scm (perform-git-download): Likewise. Change-Id: Ic875a7022fd78c9fac32e92ad4f8ce4d81646ec5
2024-01-07build-system/zig: Add cross-compilation support.Ekaitz Zarraga
* guix/build/zig-build-system.scm (zig-cross-build): New function (lower): Add cross-compilation support * guix/build-system/zig.scm (build): Add --target flag with target input (check): Disable with cross compilation Change-Id: I5f42ff897bfe00c92c6576900221a15ef210d669 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-12-18build-system: Add ‘composer-build-system’.Nicolas Graves
* guix/build-system/composer.scm: New file. * guix/build/composer-build-system.scm: New file. * gnu/packages/aux-files/findclass.php: New file. * Makefile.am: Add them. * doc/guix.texi (Build Systems): Document it. Co-authored-by: Julien Lepiller <julien@lepiller.eu> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: Ie6a05b42ff04d3ad774a0a20278a77e4820bb8f6
2023-12-17build-system: Add mix-build-system.Pierre-Henry Fröhring
* guix/build-system/mix.scm: New file. * guix/build/mix-build-system.scm: New file. Change-Id: I8066d00f7ada4a384621bf541e679bc512e93435 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-12-13syscalls: Define riscv64 syscall ID for clone.MarcoFalke
* guix/build/syscalls.scm (clone): Add an entry for riscv64. This allows the use of --container on riscv64. Change-Id: I12b3cb5e2aa248266d006b6e456082f4ddc70e62 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-11-28build: cargo: Use correct config file for cargo config.Efraim Flashner
* guix/build/cargo-build-system.scm (configure): Use .cargo/config as the config file. Add a note. Change-Id: Ice006c11184d4c8e1bdb765c3998b06ad299e55b
2023-11-28build/cargo-build-system: Enable cross-compiling.Efraim Flashner
* guix/build-system/cargo.scm (default-rust): Accept an argument. (default-rust-sysroot, cargo-cross-build): New procedures. (lower): Accept a rust-sysroot. [private-kewords]: Add rust-sysroot. Remove target if cross-compiling. [bag]: Allow cross-compiling. In host-inputs only have inputs when cross-compiling, move crate sources to here, remove standard-packages. In build-inputs add the inputs when not cross-compiling, add the standard-cross-packages when cross-compiling, add the standard-packages to here. Add target-inputs with the standard-cross-packages and rust-sysroot when cross-compiling. * guix/build/cargo-build-system.scm (configure): Accept target argument. When cross-compiling set some environment variables. Adjust the .config/cargo.toml to have configure options for cross-compiling. Change-Id: I388d1e1f48943e45ff01f55af8efc0746f383b4a
2023-11-28build: cargo-build-system: Pack crates reproducibly.Efraim Flashner
This fixes reproducibility in rust crates from the package phase, again, see <https://issues.guix.gnu.org/50015>. Reported by: Christopher Baines (in person). * guix/build/cargo-build-system.scm (package): When repacking the crate tarball use standard reproducibility flags. Change-Id: Ifb1440a023226bf0718e99ce9f95ef981e510cbc
2023-11-25syscalls: Add fallback case for ‘terminal-string-width’.Ludovic Courtès
This makes ‘terminal-string-width’ synonymous with ‘string-length’ when running one a statically-linked Guile, as is the case in some unit tests, instead of throwing ENOSYS. * guix/build/syscalls.scm (terminal-string-width): Use ‘dynamic-func’ and ‘pointer->procedure’ instead of ‘syscall->procedure’. Return ‘string-length’ when one of the ‘dynamic-func’ calls fails. Change-Id: Icf55c9e7c34b46fac91b665fb4a2ecb02160f22e
2023-11-15build-system/guile: Add target-guile-scm+go procedure.Tomas Volf
The paths to .scm and .go files can be constructed given a guile version and a base directory. However it is few lines of code that needs to be copy&pasted. This new procedure returns both of them reducing the maintenance cost. * guix/build/guile-build-system.scm (target-guile-scm+go): New procedure. Change-Id: I58615f2cfe0ec1e58d3fbb47b738ed5dce1bb252 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-11-11guix: syscalls: Add terminal-string-width.Julien Lepiller
* guix/build/syscalls.scm (terminal-width): New procedure. * tests/syscalls.scm: Add tests. Change-Id: I6c2caa9fbaffb1e8f4b8933103399be970d5a8f3
2023-11-11build: minetest-build-system: Match name more strictly.Tristan Cottam
Some Minetest mods, such as the hitherto unpackaged minetest-ambience, have trailing garbage space (e.g. carriage returns) in their name line, that would otherwise end up as part of the mod's directory name. * guix/build/minetest-build-system.scm (name-regexp): Only match graphical characters in the name sub-match. Change-Id: I95f4c201724991a10efba5c859bfef99779ea495 Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-11-09guix: ant: Optionally build with java modules.Julien Lepiller
Modules were introduced in Java 9 and are not supported by the default icedtea compiler, so this feature is disabled by default. * guix/build-system/ant.scm (ant-build): Add use-java-modules? parameter. * guix/build/ant-build-system.scm (default-build.xml) (configure): Use it. Change-Id: I3b99238e4cd262332fa5c818be1af5477c7374fd
2023-11-08build-system: Add vim-build-system.Jonathan Scoresby
* guix/build-system/vim.scm, * guix/build/vim-build-system.scm: New modules. * Makefile.am (MODULES): Register new files. * doc/guix.texi: Document it. Co-authored-by: Efraim Flashner <efraim@flashner.co.il> Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-11-07git-download: Add support for Git Large File Storage (LFS).Maxim Cournoyer
* guix/build/git.scm (git-fetch) [lfs?]: New argument, doc and setup code. (git-fetch-with-fallback) [lfs?]: New argument. Pass it to git-fetch. * guix/git-download.scm (git-lfs-package): New procedure. (git-fetch/in-band*): New procedure, made of the logic of git-fetch/in-band, with new git-lfs specifics, with the following changes: New #:git-lfs argument. <inputs>: Remove labels. Conditionally add git-lfs. <build>: Read "git lfs?" environment variable and pass its value to the #:lfs? argument of git-fetch-with-fallback. Use INPUTS directly; update comment. <gexp->derivation>: Add "git lfs?" to #:env-vars. (git-fetch/in-band): Express in terms of git-fetch/in-band*. (git-fetch/lfs): New procedure. * doc/guix.texi (origin Reference): Document it. Change-Id: I5b233b8642a7bdb8737b9d9b740e7254a89ccb25 Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-10-23syscalls: Consistently use existing linux? definition.Sören Tempel
Instead of duplicating this existing logic across the source file. This will make it easier to add additional linux targets (e.g. linux-musl) in the future. * guix/build/syscalls.scm (readdir*, write-socket-address!) (read-socket-address): Use linux? constant. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I833c1d1630dcb8319584de1ea918cb22696f0058
2023-10-23syscalls: Add support for musl libc.Sören Tempel
This commit allows using Guix on a foreign distro which uses musl libc, for example, Alpine Linux. Usage of musl libc is detected via a new musl-libc? variable using the Guile %host-type. Using the new musl-libc? variable, we can now implement musl-specific quirks. The two compatibility problems I encountered in this regard are that musl dose not export a readdir64 and statfs64 symbol. On musl, these two functions are implemented as CPP macros that expand to readdir/statfs. To workaround that, a case-distinction was added. The existing linux? variable has been modified to return true if the %host-system contains "linux-" in order to ensure it is true for both linux-gnu as well as linux-musl host systems. The patch has been tested on Alpine Linux and is already used for the downstream Guix package shipped in Alpine Linux's package repository. * guix/build/syscalls.scm (musl-libc?): New variable. (linux?): Truth value on any linux system. (statfs, readdir-procedure): Support musl libc. Signed-off-by: Sören Tempel <soeren@soeren-tempel.net> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: Icc4101a062381240f977f4550344bde696513c52
2023-10-21Merge remote-tracking branch 'origin/rust-team'Efraim Flashner
2023-10-21build-system: Add zig-build-system.Ekaitz Zarraga
* guix/build-system/zig.scm: New file. * guix/build/zig-build-system.scm: New file. * Makefile.am: Add them. * doc/guix.texi: Document it. * etc/snippets/yas/scheme-mode/guix-package (build-system): Add zig-build-system. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-10-18build: cargo-build-system: Find more pregenerated files.Efraim Flashner
* guix/build/cargo-build-system.scm (check-for-pregenerated-files): Also search for MacOS dynamic libraries.
2023-10-18build: cargo-build-system: Strip enough prefix in package.Efraim Flashner
* guix/build/cargo-build-system.scm (package): When using the source as the packaged crate also strip the 'rust-' prefix.
2023-10-18build: cargo-build-system: Reset timestamps in crates.Efraim Flashner
This fixes reproducibility in rust crates from the package phase, see <https://issues.guix.gnu.org/50015>. * guix/build/cargo-build-system.scm (package): After running 'cargo package' on the source unpack the tarball, reset the timestamps and repack it.
2023-10-18build: cargo-build-system: Check for pregenerated files.Efraim Flashner
* guix/build/cargo-build-system.scm (check-for-pregenerated-files): New procedure. (%standard-phases): Add 'check-for-pregenerated-files phase between 'unpack and 'unpack-rust-crates.
2023-10-06build-system/minify: Use esbuild.Ricardo Wurmus
* guix/build-system/minify.scm (default-uglify-js): Replace this procedure... (default-esbuild): ...with this new procedure. (lower): Use it, and add "esbuild" to build inputs. * guix/build/minify-build-system.scm (minify): Invoke esbuild instead of setting up a pipe to uglifyjs. * gnu/packages/cran.scm (r-shiny)[native-inputs]: Replace node-uglify-js with esbuild. * gnu/packages/statistics.scm (r-dt)[native-inputs]: Same.
2023-10-04guix: meson-configuration: Fix boolean assigment.Jean-Pierre De Jesus DIAZ
* guix/build/meson-configuration.scm (write-assigment): Print true for #t and false for #f. Previously it was inverting the values. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-09-26git-download: Move fallback code to (guix build git).Ludovic Courtès
* guix/build/git.scm (git-fetch-with-fallback): New procedure, with code taken from… * guix/git-download.scm (git-fetch): … here. [modules]: Remove modules that are no longer directly used in ‘build’. [build]: Use ‘git-fetch-with-fallback’.
2023-09-07build: emacs-utils: Adjust ‘emacs-compile-directory’ for Emacs 29.Hilton Chain
* guix/build/emacs-utils.scm (emacs-compile-directory): After native compilation, write the bytecode file with ‘comp-write-bytecode-file’. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-08-26Merge branch 'master' into emacs-teamLiliana Marie Prikler
2023-08-19guix: emacs-utils: Add ert-number-tests.Liliana Marie Prikler
* guix/build/utils.scm (ert-number-tests): New variable.
2023-08-02build: qt-utils: Wrap QML2_IMPORT_PATH with 'prefix' location.Zheng Junjie
Some qml files have optional or circular dependencies, use 'prefix' instead of '=' to get those dependencies from environment/profile. * guix/build/qt-utils.scm (variables-for-wrapping): Use 'prefix' for QML2_IMPORT_PATH. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-07-28download-nar: Improve output.Christopher Baines
Report errors that occur, output the "Downloading from " line before starting to report progress and end the output with a newline.
2023-07-18pack: Move common build code to (guix build pack).Maxim Cournoyer
The rationale is to reduce the number of derivations built per pack to ideally one, to minimize storage requirements. The number of derivations had gone up with 68380db4 ("pack: Extract populate-profile-root from self-contained-tarball/builder.") as a side effect to improving code reuse. * guix/scripts/pack.scm (guix): Add commentary comment. (populate-profile-root, self-contained-tarball/builder): Extract to... * guix/build/pack.scm (populate-profile-root): ... this, and... (build-self-contained-tarball): ... that, adjusting for use on the build side. (assert-utf8-locale): New procedure. (self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly. Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-07-18guix: texlive-build-system: Add #:link-scripts argument.Nicolas Goaziou
* doc/guix.texi (Build Systems): Document argument. * guix/build-system/texlive.scm (texlive-build): Add #:LINK-SCRIPTS argument. * guix/build/texlive-build-system.scm (link-scripts): (patch-shell-scripts): New function. (%standard-phases): Add new functions as phases.
2023-07-18guix: texlive-build-system: Generate TeX formats.Nicolas Goaziou
* guix/build-system/texlive.scm (texlive-build): Add #:CREATE-FORMATS argument. * doc/guix.texi (Build Systems): Document it. * guix/build/texlive-build-system.scm (texlive-input?): New function. (generate-font-metrics): Use new function above. (create-formats): New function. (%standard-phases): Add function above to phases.
2023-07-18guix: texlive-build-system: Handle doc-only packages gracefully.Nicolas Goaziou
* guix/build/texlive-build-system.scm (install): Always create #$output, even if it is empty.
2023-07-18guix: texlive-build-system: Generate font metrics.Nicolas Goaziou
* guix/build/texlive-build-system.scm (install-as-runfiles): (generate-font-metrics): New function. (build): Use INSTALL-AS-RUNFILES. (%standard-phases): Add new phase.
2023-07-18guix: texlive-build-system: Improvements on non-trivial packages.Nicolas Goaziou
* guix/build/texlive-build-system.scm (build): Ignore temporary build files when moving runfiles around. Remove ".drv" source files prior to compiling files. Remove need for #:TEX-DIRECTORY keyword. Handle ".ins" and ".dtx" files in different directories. (install): Install docfiles in "doc" output when available. * guix/build-system/texlive.scm (texlive-build): Remove #:TEX-DIRECTORY. * doc/guix.texi (Build Systems): Remove reference to #:TEX-DIRECTORY in TEXLIVE-BUILD-SYSTEM documentation. Also mention it now tries to compile ".dtx" files when there is no ".ins" file.
2023-07-05guix: git: Set initial branch name for git-fetch.Efraim Flashner
This removes the 'hint' about choosing a branch name when creating a new git repository. * guix/build/git.scm (git-fetch): When running 'git init' add an initial branch name.