This reverts commit dff01d4eb12016435b8fb8878294b79b25b3bf4a. The #:file
keyword argument was still part of the rest arguments, which lead to custom
file arguments being called as functions due to the `apply compose'.
Change-Id: I91d6b576adb7ebb5af6a584e999248b5cc410f6a
Using the file:// prefix for local packages was always allowed, and since npm
version 11 required in order to properly resolve local dependencies when
installing from tarballs.
* guix/build/node-build-system.scm (index-modules): Add "file://" prefix to
hash table values for local modules.
Change-Id: I9d95a5d6788cc918b94677b4524391617e3a73b4
This function seems way too complex for what it's trying to do.
* guix/build/node-build-system.scm (modify-json): Rewrite procedure
using apply and compose.
Change-Id: I6419bd32eea76031393573a1d6450571d092ec4d
Signed-off-by: Jelle Licht <jlicht@fsfe.org>
* guix/build/node-build-system.scm (delete-dependencies): Use map and
match-lambda to improve readability of the phase.
Change-Id: I6d9275c7eea1514f103988215916d478a68ea466
Signed-off-by: Jelle Licht <jlicht@fsfe.org>
Those functions are most likely not worth the complexity they carry.
They might be a little more efficient (stop at the first encounter
instead of mapping until the end), but is it worth the additional
complexity? I'm unsure.
* guix/build/node-build-system.scm (alist-pop): Remove variable.
(alist-update): Use a more standard map.
Change-Id: I47b91461849d6e6d627e98f67bc6a08f12fa7370
Signed-off-by: Jelle Licht <jlicht@fsfe.org>
This procedure has little added value and is basically equivalent to a
simple composition of assoc-ref and or.
* guix/build/node-build-system.scm (assoc-ref*): Remove procedure.
(patch-dependencies, build, avoid-node-gyp-rebuild): Replace use of
assoc-ref*.
Change-Id: I947a66fe91eaa2b4adc8dc405232a32257f9d061
Signed-off-by: Jelle Licht <jlicht@fsfe.org>
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
* 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>
* 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”)
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>
This reverts commit b6a070d2a3, 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
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.
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>
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>
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>
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>
(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: 392cf48739 ("http-client: Alter http-fetch to return the response.")
Change-Id: Iaccd9d8ed038e5b25a9cae4c1f4c1a6f809d1c6d
Signed-off-by: Christopher Baines <mail@cbaines.net>
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
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>
* 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>
* 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
* 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
Fixesguix/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>
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>
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>
* 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.
Fixesguix/guix#2618.
* 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>