1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-08 12:54:04 +02:00

Compare commits

...

203 Commits

Author SHA1 Message Date
Efraim Flashner 516fbe663b gnu: gnu-make-mesboot0: Downgrade to 3.80.
* gnu/packages/commencement.scm (gnu-make-mesboot0): Downgrade to 3.80.

Change-Id: I00b1f6ac934b573bf7845d78e8d4ac78dcd1d0f6
2026-03-02 09:29:46 +02:00
Efraim Flashner 85c7c4e3ca WIP: use musl path to build hello-mesboot
Change-Id: I1588fadc238bb3b506c589d1c96f5cd5a2bee0df
2026-02-16 10:22:51 +02:00
Efraim Flashner 7402a65742 gnu: binutils-muslboot0: Fix building on i686-linux.
* gnu/packages/commencement.scm (binutils-muslboot0)[native-inputs]:
When building on i686-linux add binutils-mesboot0.
[arguments]: When building on i686-linux use ranlib.

Change-Id: I0a550a0a65d9923f9ae20cc0f0717a918a433968
2026-02-16 10:20:39 +02:00
Efraim Flashner ea66d41f06 gnu: musl-boot0: Use correct per-architecture CFLAGS.
* gnu/packages/commencement.scm (musl-boot0)[arguments]: Adjust the
make-flags to be correct per-architecture.

Change-Id: I4d85acb1324472614132dfaa7930a60afffde941
2026-02-16 10:17:51 +02:00
Efraim Flashner 6b14aa7b21 fixup gcc-muslboot0
Change-Id: I7589eedf46ef69a3826c4e4b21c4cae1758a4954
2026-02-16 10:16:41 +02:00
Janneke Nieuwenhuizen cec8b0b505 Revert "gnu: stage0-posix: Update to 1.9.1."
1.9.1 introduces the wait4 initialization problem that causes

    mescc: failed: M1 --little-endian --architecture riscv64 -f ../lib/riscv64-mes/riscv64.M1 -f lib-mes-fdungetc.s -o lib-mes-fdungetc.o

which will be fixed in Mes
    461b48f35f49126f5831aa1af3a89f42286ec70f
    lib: linux: Fix uninitialized variable in wait4.

This reverts commit cc33694264.

Change-Id: I5a93e79f348eb24d52c833254266cdedfbd8851b
2026-02-16 09:08:43 +01:00
Efraim Flashner 47c51690c3 gnu: oksh-muslboot0: Update to 7.8.
* gnu/packages/commencement.scm (oksh-muslboot0): Update to 7.8.
[arguments]: Install the license file.

Change-Id: I41de9e9f149d3367fd2962f93c474a81642f8cdb
2026-02-05 17:23:44 +02:00
Efraim Flashner d94894407b gnu: musl-boot0: Only install the headers in /include.
* gnu/packages/commencement.scm (musl-boot0)[arguments]: Adjust the
'install phase.

Change-Id: I1cd8f0fa517a9b6097abbb417bafe59cdde4bfe8
2026-02-05 17:22:37 +02:00
Efraim Flashner 69acaf4ad6 gnu: mes-boot: Update to 0.27.1.
* gnu/packages/commencement.scm (mes-boot): Update to 0.27.1.

Change-Id: I57553939370c50153803dbe4d55503e7bc05e2c9
2026-02-05 17:22:10 +02:00
Efraim Flashner cc33694264 gnu: stage0-posix: Update to 1.9.1.
* gnu/packages/commencement.scm (stage0-posix): Update to 1.9.1.
[arguments]: Don't rename the executables while building.

Change-Id: I49d5f8f82926b93686b05982df73f6feab014f31
2026-02-05 17:21:06 +02:00
Efraim Flashner 178a0a84ab gnu: %boot-gash-inputs: Fix package references.
* gnu/packages/commencement.scm (%boot-gash-inputs): Fix spacing.

Change-Id: I8a55a42f48c876b8a81fdadf6ae2a1e3354f8231
2026-02-05 17:20:33 +02:00
Efraim Flashner 7b47559809 gnu: m4-boot0: Update to 1.4.20.
* gnu/packages/commencement.scm (m4-boot0): Update to 1.4.20.
[source]: Don't inherit from m4.
[arguments]: Don't inherit from m4.  Don't skip tests on armhf, aarch64.
Skip the tests on riscv64.

Change-Id: I2d53727133ce849e0cac7629063892487f072dd3
2026-02-03 16:27:34 +02:00
Efraim Flashner 50172326b8 gnu: findutils-boot0: Don't inherit arguments from findutils.
* gnu/packages/commencement.scm (findutils-boot0)[arguments]: Rewrite
without inheritance from findutils.

Change-Id: I2677c92f98da94b3482c7e34c4fae298665254e9
2026-02-03 14:12:09 +02:00
Efraim Flashner e293184b80 gnu: findutils-boot0: Update configure flags.
* gnu/packages/commencement.scm (findutils-boot0)[arguments]: Adjust the
'configure-flags.

Change-Id: I20bbc732dbd5d2a14e0448b94f745794c2b77414
2026-02-03 13:41:25 +02:00
Efraim Flashner 17e9a52938 gnu: findutils-boot0: Downgrade to 4.9.0.
* gnu/packages/commencement.scm (findutils-boot0)[source]: Don't inherit
from findutils.
[arguments]: Adjust the test workarounds.

Change-Id: I7a9ce6ece1546b4913afc614c7c6050f87f60933
2026-02-03 13:37:30 +02:00
Efraim Flashner 5373343601 gnu: byacc-boot0: Update to 20241231.
* gnu/packages/commencement.scm (byacc-boot0): Update to 20241231.
[source]: Add snippet to remove generated files.

Change-Id: I5dc6979580ded324d9e38b3470e57277cc354467
2026-01-28 21:47:42 +01:00
Efraim Flashner 4eb84635bc gnu: byacc-mesboot: Update to 20241231.
* gnu/packages/commencement.scm (byacc-mesboot): Update to 20241231.

Change-Id: I6f119e761626f5effad15589e05bd807919ce22b
2026-01-28 21:47:41 +01:00
Efraim Flashner ec2ba23a39 WIP: maybe add gcc-musl-boot0
Change-Id: I23378f4d2be678874b3e4a1c0e7c088644c4b208
2026-01-28 21:47:41 +01:00
Efraim Flashner 108b89f8eb WIP: maybe add gcc-mesboot-10.
Change-Id: I60f650c1d212fd831fae7d8a9fb20f2c1144fb05
2026-01-28 21:47:41 +01:00
Efraim Flashner eace31d89a gnu: Add musl-boot-static.
* gnu/packages/commencement.scm (musl-boot-static): New variable.

Change-Id: Ia1b9758c5e525c6fd25ea00539357d2ec9fbd8cc
2026-01-28 21:47:41 +01:00
Efraim Flashner be2ef1c562 gnu: Add mpc-boot1.
* gnu/packages/commencement.scm (mpc-boot1): New variable.

Change-Id: I1d002867fa99a78f853c15c4b554f9ab8fa31a77
2026-01-28 21:47:41 +01:00
Efraim Flashner 1ea57ea17d gnu: Add mpfr-boot1.
* gnu/packages/commencement.scm (mpfr-boot1): New variable.

Change-Id: Ibae291199d0a3c4307026be906754bda552fc667
2026-01-28 21:47:41 +01:00
Efraim Flashner 81a02aefcc gnu: Add gmp-boot1.
* gnu/packages/commencement.scm (gmp-boot1): New variable.

Change-Id: I09688324d35f3caa8ea07de588cd673a557d50f6
2026-01-28 21:47:41 +01:00
Efraim Flashner e71a93b4bf Revert "gnu: gcc-muslboot: Apply patches in the package source."
This reverts commit 2512d006e2d5201257cae5c3d47476110dacc882.

The package fails to unpack in the 'unpack phase
2026-01-28 21:47:41 +01:00
Efraim Flashner 54ed70bb65 Revert "gnu: gcc-muslboot0: Apply patches in the package source."
This reverts commit 75ccc3586a93d9ee9f458b05eca9d3a08d6f09ab.

The source fails to unpack in the 'unpack phase
2026-01-28 21:47:41 +01:00
Efraim Flashner 461d71bd9e Revert "gnu: m4-boot0: Downgrade to 1.4.18."
This reverts commit 9cdb5e7f8fa0bcfc311db4b1274666ddfe271d46.

This version FTBFS on powerpc64le-linux.
2026-01-28 21:47:41 +01:00
Efraim Flashner f4256280ee gnu: gcc-muslboot0: Apply patches in the package source.
* gnu/packages/commencement.scm (gcc-muslboot0)[source]: Add patch.
[arguments]: Remove custom phase applying patch.
(gcc-muslboot): Adjust accordingly.

Change-Id: Ie502ac2db65b8928b84ddbcb65e82151156f08e7
2026-01-28 21:47:41 +01:00
Efraim Flashner 9fb7d5aeb6 gnu: gcc-muslboot: Apply patches in the package source.
* gnu/packages/commencement.scm (gcc-muslboot)[source]: Add patches.
[arguments]: Remove custom phases applying patches.

Change-Id: I01b9af67189c0213fd60d2822dca7975ddf4a2a8
2026-01-28 21:47:41 +01:00
Efraim Flashner 1edae6eb8a gnu: gcc-muslboot: Backport c++ builtin values.
* gnu/packages/commencement.scm (gcc-muslboot)[arguments]: Add a custom
phase backporting the correct definitions for __cplusplus.

Change-Id: I64a77dc4d4cb5936e650d37585145f171adc8572
2026-01-28 21:47:41 +01:00
Efraim Flashner 157f037e44 gnu: gcc-muslboot: Use full gcc sources.
* gnu/packages/commencement.scm (gcc-muslboot)[source]: Use the full gcc
sources, not gcc-core.
[native-inputs]: Remove the gcc-g++ sources.
[arguments]: Remove custom phase unpacking the gcc-g++ sources.

Change-Id: Ib574db2e2c92db693b0fd8d90d6d248976b0fa19
2026-01-28 21:47:41 +01:00
Efraim Flashner 2f4adbcea0 gnu: gcc-mesboot1: Backport c++ builtin values.
* gnu/packages/commencement.scm (gcc-mesboot1)[arguments]: Add a custom
phase backporting the correct definitions for __cplusplus.

Change-Id: Ia594fd8ae983c7cfe025fd606f66261e03574f7f
2026-01-28 21:47:41 +01:00
Efraim Flashner 34ca98c036 gnu: gcc-mesboot1: Use full gcc sources.
* gnu/packages/commencement.scm (gcc-mesboot1)[source]: Use the full gcc
sources, not gcc-core.
[native-inputs]: Remove the gcc-g++ sources.
[arguments]: Remove custom phase unpacking the gcc-g++ sources.

Change-Id: I4822bbf0385fc0bfb673ec834cc253d9465b0813
2026-01-28 21:47:40 +01:00
Efraim Flashner 02f640046f gnu: m4-boot0: Downgrade to 1.4.18.
* gnu/packages/commencement.scm (m4-boot0): Downgrade to 1.4.18.
[arguments]: Don't inherit from m4.  Add a phase to patch shell
invocations in the tests.  Add a phase when building for riscv64-linux
to skip a few tests.

Change-Id: Ide87b1dceec6a6a95a750e4cd561d7be166ffee2
2026-01-28 21:47:40 +01:00
Efraim Flashner fab6abe7ed gnu: binutils-muslboot0: Don't compress the documentation.
* gnu/packages/commencement.scm (binutils-muslboot0)[arguments]: Delete
the 'compress-documentation phase.

Change-Id: Id6545a2c7481023d7e2f1b62c91acb40a1b5278f
2026-01-28 21:47:40 +01:00
Efraim Flashner 6eb25997f5 gnu: binutils-muslboot0: Correct package inputs.
* gnu/packages/commencement.scm (binutils-muslboot0)[native-inputs]:
Inherit from tcc-musl's native-inputs.

Change-Id: I6390e85c740da85fe14359e193015710c10dd5c2
2026-01-28 21:47:40 +01:00
Efraim Flashner b4ca74731e gnu: musl-boot0: Upgrade to 1.2.5.
* gnu/packages/commencement.scm (musl-boot0): Upgrade to 1.2.5.

Change-Id: Iacfb6024d768ebf883ade8559bbe465181f2b8bb
2026-01-28 21:47:40 +01:00
Efraim Flashner 7a97fcd5ef gnu: musl-boot0: Fix building on riscv64-linux.
* gnu/packages/commencement.scm (musl-boot0)[arguments]: Add a phase to
remove a file which tcc can't compile.

Change-Id: Iacf5d2dc6250a312b2181c8bfe749ca68de7f55a
2026-01-28 21:47:40 +01:00
Efraim Flashner 1743097ca4 gnu: musl-boot0: Fix installation order of headers.
* gnu/packages/commencement.scm (musl-boot0)[arguments]: Reverse the
order of the headers to be installed.

Change-Id: Icfbf2e1e7e737192899d4074a9183b6267fad5f9
2026-01-28 21:47:40 +01:00
Efraim Flashner ec0a298de4 gnu: tcc-musl: Update build flags for multiple architectures.
* gnu/packages/commencement.scm (tcc-musl)[arguments]: Adjust the custom
'build phase to provide necessary architecture specific flags.

Change-Id: I1e506cceae26f8a24336d36f94211d9a8923c491
2026-01-28 21:47:40 +01:00
Efraim Flashner 37461278d1 gnu: musl-boot0: Improve the install phase.
* gnu/packages/commencement.scm (musl-boot0)[arguments]: Adjust the
custom 'install phase to support more architectures.

Change-Id: I86759eb5813441fa3ebff1222de2fe8ffa69e8ba
2026-01-28 21:47:40 +01:00
Efraim Flashner 064c31578c gnu: binutils-mesboot: Update to 2.30.
* gnu/packages/commencement.scm (binutils-mesboot): Update to 2.30.
[arguments]: Don't inherit from binutils-mesboot1.  Update
configure-flags.
[native-inputs]: When building for not i686 or x86_64 use
%boot-muslboot2-inputs.
[supported-systems]: Support all supported systems.

Change-Id: I52740e2c87fbb31da05a0f3fd5016edf4e94bd41
2026-01-28 21:47:40 +01:00
Efraim Flashner a2272a638e gnu: glibc-headers-mesboot: Remove unused C macro.
* gnu/packages/commencement.scm (glibc-headers-mesboot)[source]: Add
snippet to remove an exported unused pre-GNU C macro.

Change-Id: I8622eeaea819ca8b3abbee36e2a14214ec97be07
2026-01-28 21:47:40 +01:00
Efraim Flashner f2609ae482 gnu: gawk-boot0: Remove pre-generated source file.
* gnu/packages/commencement.scm (gawk-boot0)[source]: Add snippet to
remove a pre-generated source file.
[native-inputs]: Add byacc-boot0.

Change-Id: Ieb3e859c1893b87e5767227e24541e45cf55afce
2026-01-28 21:47:40 +01:00
Efraim Flashner 273a65fff2 gnu: Add byacc-boot0.
* gnu/packages/commencement.scm (byacc-boot0): New variable.

Change-Id: I8b7e778af6b1e07bbac416dad2b2efb789dacd51
2026-01-28 21:47:40 +01:00
Efraim Flashner 337e718377 gnu: %boot0-inputs: Remove duplicate packages.
* gnu/packages/commencement.scm (%boot0-inputs): When building for i686,
x86-64 or riscv64 remove the old *-mesboot packages for newer *-boot0
packages.

Change-Id: Ide54f9185dd67765f4a35110c6bb47d5f61ba6b5
2026-01-28 21:47:40 +01:00
Efraim Flashner 61994c713f gnu: %boot0-inputs: Use newly built *-boot0 packages on riscv64-linux.
* gnu/packages/commencement.scm (%boot0-inputs): Use the newly built
*-boot0 packages when creating the package list on riscv64-linux.

Change-Id: Id07bd5384065e6adec77fc8e00d53f08d308db48
2026-01-28 21:47:40 +01:00
Efraim Flashner db01b0aee2 gnu: file-boot0: Fix building on riscv64-linux.
* gnu/packages/commencement.scm (file)[configure-flags]: When building
for riscv64-linux disable the use of xz.
(file-boot0)[arguments]: When building for riscv64-linux adjust the
make-flags to pass a different CFLAG to build for C11.

Change-Id: I3c8a3f6882fd5c7dce7ba43785a1f1548fa984cb
2026-01-28 21:47:39 +01:00
Efraim Flashner 482bf05c68 gnu: findutils-boot0: Adjust the skipped tests on riscv64-linux.
* gnu/packages/commencement.scm (findutils-boot0)[arguments]: In the
custom 'skip-problematic-tests phase adjust the tests skipped on
riscv64-linux.

Change-Id: I6252c69d088a27d4989b324ad64378102b7b5de2
2026-01-28 21:47:39 +01:00
Efraim Flashner 9c3f731bd0 gnu: gnu-make-boot0: Adjust configure-flags on riscv64-linux.
* gnu/packages/commencement.scm (gnu-make-boot0)[arguments]: When
building for riscv64-linux adjust the configure-flags to allow using
posix-spawn.

Change-Id: If0e983f57c3483acfa154aa569a126de206518c1
2026-01-28 21:47:39 +01:00
Efraim Flashner 283ce3bdb3 gnu: %bootstrap-inputs+toolchain: Switch riscv64-linux to full bootstrap.
* gnu/packages/commencement.scm (%bootstrap-inputs+toolchain): When
building on riscv64-linux use %boot-mesboot6-inputs.

Change-Id: Ie5dbf4ba321ac9ff421533ec04d2ace9306e8a50
2026-01-28 21:47:39 +01:00
Efraim Flashner 359d21c4fd gnu: %boot-mesboot6-inputs: Adjust for riscv64-linux.
* gnu/packages/commencement.scm (%boot-mesboot6-inputs): Adjust a
different existing list of packages depending on which system we are
building for.

Change-Id: Ida848be3a41b5694099fbc61c2bc40e46e587f04
2026-01-28 21:47:39 +01:00
Efraim Flashner 5eddbc9763 gnu: mesboot-package: Adjust for riscv64-linux builds.
* gnu/packages/commencement.scm (mesboot-package)[supported-systems]:
Add riscv64-linux.
[native-inputs]: Use %boot-mesboot5-inputs or %boot-muslboot3-inputs
depending on the system.
[arguments]: Don't enable parallel building on riscv64-linux.

Change-Id: I2e57278dcd1c1e14314ddd9a7fdc081245e08720
2026-01-28 21:47:39 +01:00
Efraim Flashner be9cd46b28 gnu: Add %boot-muslboot3-inputs.
* gnu/packages/commencement.scm (%boot-muslboot3-inputs): New variable.

Change-Id: I34e5c593f7f38df78707cc3c49260aae10192723
2026-01-28 21:47:39 +01:00
Efraim Flashner 09eca14ae7 gnu: Add mawk-mesboot.
* gnu/packages/commencement.scm (mawk-mesboot): New variable.

Change-Id: Ia04d70557682aef705eebe8caccb59ce68406ffc
2026-01-28 21:47:39 +01:00
Efraim Flashner 2f58bea592 gnu: gawk-mesboot: Remove pre-generated source file.
* gnu/packages/commencement.scm (gawk-mesboot)[source]: Use
bootstrap-origin.  Add a snippet to remove a pre-generated source file.
[native-inputs]: Add byacc-mesboot.

Change-Id: Ic064190ae76677e5473343ba50aaa22a43def462
2026-01-28 21:47:39 +01:00
Efraim Flashner 5f55392d50 gnu: gawk-mesboot: Support building on riscv64-linux.
* gnu/packages/commencement.scm (gawk-mesboot)[supported-systems]:
Remove field.
[native-inputs]: Use %boot-mesboot2-inputs or %boot-muslboot2-inputs
depending on which system it is being built for.

Change-Id: If4f2635cb2e651eedae6291dca0eddd4f5caea60
2026-01-28 21:47:39 +01:00
Efraim Flashner a6ef00e0e7 gnu: Add byacc-mesboot.
* gnu/packages/commencement.scm (byacc-mesboot): New variable.

Change-Id: I2bbda955702ec3ecb0c3ca1d3f336fd931d7c10a
2026-01-28 21:47:39 +01:00
Efraim Flashner 0060275d4a gnu: hello-mesboot: Add support for riscv64-linux.
* gnu/packages/commencement.scm (hello-mesboot)[supported-systems]: Add
riscv64-linux.
[native-inputs]: If not building on x86 or x86_64 then use
%boot-muslboot2-inputs.

Change-Id: I39a5a6d294defc2b43d1aeebd5616de51924ec99
2026-01-28 21:47:39 +01:00
Efraim Flashner a0a231fd00 gnu: Add %boot-muslboot2-inputs.
* gnu/packages/commencement.scm (%boot-muslboot2-inputs): New variable.

Change-Id: Ia2248cb71b253487f62b2c8887bbd0153ebcd36c
2026-01-28 21:47:39 +01:00
Ekaitz Zarraga b76231de38 gnu: Add gcc-muslboot.
* gnu/packages/commencement.scm (gcc-muslboot): New variable.
* gnu/packages/patches/gcc-boot-4.6.4-riscv64-libstdc++-support.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: Ic31754a13fe81631bea8fbc61e6f4af82e105d11
2026-01-28 21:47:39 +01:00
Ekaitz Zarraga c0dce76afb gnu: Add musl-boot.
* gnu/packages/commencement.scm (musl-boot): New variable.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I2310f164276192099694c0ceb2ebe60938386f59
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 2ddbd6b30e gnu: Add gcc-muslboot0.
* gnu/packages/commencement.scm (gcc-muslboot0): New variable.
* gnu/packages/patches/gcc-boot-4.6.4-riscv64-support.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I9a96fe502d739ddf1d73b0f3973f7f9e1e70dcb3
2026-01-28 21:47:38 +01:00
Efraim Flashner 892e2a41de gnu: gcc-mesboot: Adjust for changes in gcc-mesboot1.
* gnu/packages/commencement.scm (gcc-mesboot)[inputs]: Replace gmp, mpfr
and mpc sources with the ones used later in the bootstrap.  Add the
no-longer inherited 'unpack-gmp&co phase.  Replace the
'set-cplus-include-path phase instead of the 'setenv phase and make the
changes less dramatic.

Change-Id: I89ec54cae4f48ea5f1b2c894c50a6065a56e5d33
2026-01-28 21:47:38 +01:00
Efraim Flashner fae95b3a02 gnu: gcc-mesboot1: Adjust setting include paths.
* gnu/packages/commencement.scm (gcc-mesboot1)[arguments]: Don't replace
the 'setenv phase, add a 'set-cplus-include-path phase to set the
CPLUS_INCLUDE_PATH.

Change-Id: I58434bca416c07b43e147b598930ad4ea8382802
2026-01-28 21:47:38 +01:00
Efraim Flashner 5311abd4a6 gnu: gcc-mesboot1: Fix native-search-paths.
* gnu/packages/commencement.scm (gcc-mesboot1)[native-search-paths]:
Don't inherit from gcc-core-mesboot1.  Add CPLUS_INCLUDE_PATH.

Change-Id: I027e0722d6c63bd2b6222849f6bb82907e593da7
2026-01-28 21:47:38 +01:00
Efraim Flashner 5c3ef975ec gnu: gcc-core-mesboot1: Adjust for dependency changes.
* gnu/packages/commencement.scm (gcc-core-mesboot1)[inputs]: Replace
gmp-source, mpfr-source and mpc-source with gmp, mpfr and mpc.
[arguments]: Remove the 'unpack-gmp&co and 'setenv phases.

Change-Id: Ie42824696501470a6d1bf3940dc9ed88f2b18131
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 8b5d2379d7 gnu: mpc-boot: Update and build package.
* gnu/packages/commencement.scm (mpc-boot): Update to 1.2.1.  Replace
with a full package.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I827adfbcd3eb8d98b52da2931f3e435bfaec5096
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 8365355b0c gnu: mpfr-boot: Update and build package.
* gnu/packages/commencement.scm (mpfr-boot): Update to 4.1.0.  Replace
with a full package.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I472d3e7d037824c8588f951b51035eef06730ca6
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 9e3e90b88e gnu: gmp-boot: Update and build package.
* gnu/packages/commencement.scm (gmp-boot): Update to 5.1.3.  Replace
with a full package.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I6dcabd1f2b311063829fb680007b2ac1ba82be34
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 251febbcc6 gnu: Add m4-boot.
* gnu/packages/commencement.scm (m4-boot): New variable.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: Ic04b8b9ba7e273fe0607428b91d50e548f800aa1
2026-01-28 21:47:38 +01:00
Efraim Flashner 174650753d gnu: Add %boot-tcc-musl-inputs.
* gnu/packages/commencement.scm (%boot-tcc-musl-inputs): New variable.

Change-Id: I65673183f284808ec8337dbdfa50678f21c28cd8
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga c8d4f4b2bf gnu: Add binutils-muslboot0.
* gnu/packages/commencement.scm (binutils-muslboot0): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I3c0f18f97b60f302620baccab895cebdb332e1c5
2026-01-28 21:47:38 +01:00
Efraim Flashner b675f1b364 gnu: Add oksh-muslboot0.
* gnu/packages/commencement.scm (oksh-muslboot0): New variable.

Change-Id: I37bf7ac4c3cac842c217c297f257e8143fb2eaf8
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 4f7ef33d43 gnu: Add tcc-musl.
* gnu/packages/commencement.scm (tcc-musl): New variable.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I4031733b8c11551b86dac373735712123bf9aafe
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga 4610eda184 gnu: Add tcc-boot-musl.
* gnu/packages/commencement.scm (tcc-boot-musl): New variable.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: Id658d7cd7c7b7b4051bd8418f57797fbbe426117
2026-01-28 21:47:38 +01:00
Ekaitz Zarraga b4c6acea02 gnu: Add musl-boot0.
* gnu/packages/commencement.scm (musl-boot0): New variable.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: Ifceb687164435c6a2d9a630a2923a3ef71df007a
2026-01-28 21:47:37 +01:00
Ekaitz Zarraga 66866be907 gnu: tcc-boot: Update to 0.9.27.1139-8cd21e9.
* gnu/packages/commencement.scm (tcc-boot0)
[native-inputs]: Remove mes-boot.
[arguments]: Adjust the 'scripted-patch phase for changes in the code.
Adjust the 'configure phase to create a minimal config.h to enable
building.  Adjust the compile flags passed in the 'build phase.  Add the
'build-libtcc1.a and 'rebuild-libraries phases.  Replace the 'install
phase with a manual install phase.

Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I81f4105a8f925943cd49e842dd8ae32f2eba45e0
2026-01-28 21:47:37 +01:00
Efraim Flashner 497bdeaecc gnu: tcc-boot: Support more architectures.
* gnu/packages/commencement.scm (tcc-boot0)[arguments]: Adjust the
'configure phase to specify the build target.  Adjust the 'build and
'install phases to not pass architecture specific flags.

Change-Id: I3aa0ce006922a98a0070c81b65dc747736020e21
2026-01-28 21:47:37 +01:00
Efraim Flashner d6fd632034 gnu: tcc-boot0: Specify the build target.
* gnu/packages/commencement.scm (tcc-boot0)[arguments]: Adjust the
'configure phase to specify the build target.

Change-Id: Ic418a631ed48873771217207d0088573fe2a151a
2026-01-28 21:47:37 +01:00
Efraim Flashner 218f726b44 gnu: gcc-mesboot1-wrapper: Correctly target more systems.
* gnu/packages/commencement.scm (gcc-mesboot1-wrapper)[arguments]:
Adjust the 'build phase to correctly target more architectures.

Change-Id: I26ed5d329d7b3c80d74edd27acf4f2865928db7b
2026-01-28 21:47:37 +01:00
Efraim Flashner 147257b37a gnu: mes-boot: Enable support for armhf-linux and aarch64-linux.
* gnu/packages/commencement.scm (mes-boot)[supported-systems]: Add
armhf-linux, aarch64-linux.

Change-Id: I65da745e6db050416356613c67348fc3bfeee23e
2026-01-28 21:47:37 +01:00
Efraim Flashner e21e75c091 gnu: gcc-mesboot: Use commencement-build-target.
* gnu/packages/commencement.scm (gcc-mesboot)[arguments]: Adjust the
configure-flags and 'setenv phase to use commencement-build-target.

Change-Id: I7f864963dd5c08b878dda29188741707b3016edd
2026-01-28 21:47:37 +01:00
Efraim Flashner d55cc5b440 gnu: glibc-headers-mesboot: Use commencement-build-target.
* gnu/packages/commencement.scm (glibc-headers-mesboot)[arguments]:
Adjust the configure-flags to use commencement-build-target.

Change-Id: Icc4a05f3f5f448a5cb657319ae47b3c3d4f347ca
2026-01-28 21:47:37 +01:00
Efraim Flashner c236b48498 gnu: gcc-core-mesboot1: Use commencement-build-target.
* gnu/packages/commencement.scm (gcc-core-mesboot1)[arguments]: Adjust
the configure-flags, make-flags and 'setenv phase to use
commencement-build-target.

Change-Id: I6dc04a4aacde08a83f9f5dac3af9c0fabc69d2a7
2026-01-28 21:47:37 +01:00
Efraim Flashner ebf7457775 gnu: binutils-mesboot1: Use commencement-build-target.
* gnu/packages/commencement.scm (binutils-mesboot1)[arguments]: Adjust
the configure-flags to use commencement-build-target.

Change-Id: I950f3f43a823965833d04b0475adf3f4f2967711
2026-01-28 21:47:37 +01:00
Efraim Flashner 4fe6ae720d gnu: gcc-mesboot0: Use commencement-build-target.
* gnu/packages/commencement.scm (gcc-mesboot0)[arguments]: Adjust the
configure-flags and 'install2 phase to use commencement-build-target.

Change-Id: Icbd301bb6e1bb003940c1a9fef7d02fdc725a283
2026-01-28 21:47:37 +01:00
Efraim Flashner 0262ce7ac1 gnu: glibc-mesboot0: Use commencement-build-target.
* gnu/packages/commencement.scm (glibc-mesboot0)[arguments]: Adjust the
configure-flags to use commencement-build-target.

Change-Id: Icc90fbc7669e5bd59e34d498d1a4f561af748cba
2026-01-28 21:47:37 +01:00
Efraim Flashner 98435bea93 gnu: gcc-core-mesboot0: Use commencement-build-target.
* gnu/packages/commencement.scm (gcc-core-mesboot0)[arguments]: Adjust
the configure-flags and build phase to use commencement-build-target.
[native-search-paths]: Use commencement-build-target.

Change-Id: Ic147d914f45e1a5dd61fd93223792859e51264cb
2026-01-28 21:47:37 +01:00
Efraim Flashner 1099f6fa0c gnu: binutils-mesboot0: Use commencement-build-target.
* gnu/packages/commencement.scm (binutils-mesboot0)[arguments]: Adjust
the configure-flags to use commencement-build-target.

Change-Id: I18ed9a0dfebc9c90eb8cab2aeda3210a0b9508c1
2026-01-28 21:47:37 +01:00
Efraim Flashner f4261091c2 gnu: patch-mesboot: Enable building on all systems.
* gnu/packages/commencement.scm (patch-mesboot)[supported-systems]:
Remove field.

Change-Id: I0bd853e9cabef671bff4b6a3d79621126fff39b9
2026-01-28 21:47:37 +01:00
Efraim Flashner 2fff764107 gnu: gnu-make-mesboot0: Update to 3.82.
* gnu/packages/commencement.scm (gnu-make-mesboot0): Update to 3.82.
[supported-systems]: Remove field.
[arguments]: Adjust configure-flags to use commencement-build-target.

Change-Id: I04d65008c891d451d640b222f84cef4dbb2b79c2
2026-01-28 21:47:36 +01:00
Efraim Flashner 23c3eaec71 gnu: gzip-mesboot: Allow building on all systems.
* gnu/packages/commencement.scm (gzip-mesboot) [supported-systems]:
Remove field.

Change-Id: I3648113e44df1052e0a6581cd414284f7de4e71e
2026-01-28 21:47:36 +01:00
Efraim Flashner f0f831530c gnu: mes-boot: Use commencement-build-target.
* gnu/packages/commencement.scm (mes-boot)[arguments]: Adjust 'configure
phase to use commencement-build-target.

Change-Id: Iee906690041f6fe3d015bfa594d64e330cd31be8
2026-01-28 21:47:36 +01:00
Efraim Flashner d76d8587e5 gnu: Add commencement-build-target.
* gnu/packages/commencement.scm (commencement-build-target): New
procedure.

Change-Id: Ie479ccd0afd659e843b45cb5cf22717f34ddff5c
2026-01-28 21:47:36 +01:00
Efraim Flashner ebf891605b gnu: mes-boot: Extend build timeout.
* gnu/packages/commencement.scm (mes-boot)[properties]: New field.

Change-Id: I5086114ff6d06687a167c3cdce0b8cc1d139c80b
2026-01-28 21:47:36 +01:00
Efraim Flashner 40fc41296a gnu: stage0-posix: Update to 1.7.0.
* gnu/packages/commencement.scm (stage0-posix): Update to 1.7.0.
[description]: Update to follow upstream's changes.

Change-Id: I3a9d9cdb494188b88f62becf00809c8f899208bd
2026-01-28 21:47:36 +01:00
Efraim Flashner 587eda0f58 gnu: mes-boot: Update to 0.27.
* gnu/packages/commencement.scm (mes-boot): Update to 0.27.

Change-Id: I1fc91fe60fb421c688378223210ad6dba30faabf
2026-01-28 21:47:36 +01:00
Ekaitz Zarraga 5aac4dd320 gnu: tcc-boot0: Update to 0.9.26-1157-gdd46e018.
* gnu/packages/commencement.scm (tcc-boot0): Update to
0.9.26-1157-gdd46e018.

Change-Id: Ie95cdafc567265b8924f982b6e4b3b8959777b5f
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2026-01-28 21:47:36 +01:00
Ekaitz Zarraga 66aab1caf0 gnu: mes-boot: Update to 0.26.1.
* gnu/packages/commencement.scm (mes-boot): Update to 0.26.1.

Change-Id: I59617e202bdbea79012df9b7174bd001869cc04a
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2026-01-28 21:47:32 +01:00
jgart df96ee97e9 gnu: Add wayout.
* gnu/packages/xdisorg.scm (wayout): New variable.

Change-Id: Ibe4c302ff273e84f9baf444a56c10970d59ba120
Signed-off-by: jgart <jgart@dismail.de>
2026-01-28 14:15:41 -05:00
jgart d3aa1a72ee gnu: Add lisgd.
* gnu/packages/freedesktop.scm (lisgd): New variable.

Change-Id: I3ebee227ff08c500380739613b36b7ebc81c7deb
Signed-off-by: jgart <jgart@dismail.de>
2026-01-28 14:11:08 -05:00
jgart d4c83934a4 gnu: emacs-shell-maker: Update to 0.84.8.
* gnu/packages/emacs-xyz.scm (emacs-shell-maker): Update to 0.84.8.
[arguments]: Patch curl.
[inputs]: Add curl.

Change-Id: Icab3e1fdc5ef20a1959e4735098a9c3df6d7eae1
2026-01-28 13:59:13 -05:00
Christopher Baines 1c230ec96e scripts: substitute: Default to fast decompression.
This changes the behaviour for the first one or few nars the substitute script
downloads, with uncompressed and zstd compressed nars prefered rather than
picking by file size.

* guix/scripts/substitute.scm: (%default-fast-decompression?): Change to #t.
* tests/substitute.scm ("substitute, preferred nar URL is 404, other is 200"):
Adjust test.

Change-Id: I89202f084cd6b9d506bcb3d46f75de690c6986b5
2026-01-28 17:45:33 +00:00
Christopher Baines 86d06b4cad substitutes: Handle closing connections to substitute servers.
When reusing a HTTP connection to fetch multiple nars, and the remote server
signals that the connection should be closed.

* guix/substitutes.scm (download-nar): Close connections to substitute servers
when a Connection: close header is specified in the response.

Change-Id: Id3746c848a2157419060d5d968f724bc82a28e49
2026-01-28 17:44:57 +00:00
Christopher Baines be84a75c39 substitutes: Add #:keep-alive? keyword argument to download-nar.
To be consistent with other procedures that make network requests.

* guix/substitutes.scm (download-nar): Add #:keep-alive? option.
* guix/scripts/substitute.scm (process-substitution/fallback)
(process-substitution): Call download-nar with #:keep-alive? #t.

Change-Id: I83b27d0c3a0916d058fbbbeb7aa77dbb8a742768
2026-01-28 17:44:57 +00:00
Christopher Baines 53d306ca39 substitutes: Move download-nar from substitutes script to here.
From the substitutes script.  This makes it possible to use download-nar in
the the Guile guix-daemon.

* guix/scripts/substitute.scm (%fetch-timeout): Move down to where it's now
used.
(%random-state, with-timeout, catch-system-error, http-response-error?,
download-nar): Move to…
* guix/substitutes.scm: …here.

Change-Id: I8c09bf4b33cb5c6d042057d4d9adeb36c24c11dc
2026-01-28 17:44:57 +00:00
Christopher Baines 41a20ca0d2 scripts: substitute: Don't enforce cached connections in download-nar.
This is in preparation for moving the download-nar procedure out of the
script.

As well as calling open-connection-for-uri/cached, with-cached-connection adds
a single retry to the expression passed in, in the case of a exception that
suggests there's a problem with the cached connection. This is important
because download-nar/http-fetch doesn't check if a connection used for
multiple requests should be closed (because the servers set the relevant
response header).

To make download-nar more generic, have it take open-connection-for-uri as a
keyword argument, and replicate the with-cached-connection single retry by
closing the port in the case of a network error, and recalling
open-connection-for-uri.  This will work fine in the case when connection
caching is not in use, as well as when open-connection-for-uri/cached is used,
since open-connection-for-uri/cached will open a new connection if the cached
port is closed.

* guix/scripts/substitute.scm (kind-and-args-exception?): Remove and inline
where necessary.
(call-with-cached-connection): Remove procedure.
(with-cached-connection): Remove syntax rule.
(http-response-error?): New procedure.
(download-nar): Add new #:open-connection-for-uri keyword argument and use it,
also replace with-cached-connection.
(process-substitution/fallback,process-substitution): Pass
 #:open-connection-for-uri open-connection-for-uri/cached to download-nar.

Change-Id: I277b1d8dfef79aa1711755b10b9944da7c19157c
2026-01-28 17:44:57 +00:00
Christopher Baines 999a8a668b http-client: Include EPIPE in network-error?.
The substitute script checks for EPIPE errors, so this allows using
network-error?.

* guix/http-client.scm (network-error?): Include EPIPE.

Change-Id: I96d76d77997ed21a38bf9c41479fea67ab01e084
2026-01-28 17:44:57 +00:00
Christopher Baines b354ef2df3 http-client: Add network-error? from the substitute script.
Plus remove http-get-error? from network-error? as http-get-error? doesn't
indicate a network error.

* guix/scripts/substitute.scm (process-substitution/fallback)
(process-substitution): Use http-get-error?  with network-error?.
(system-error?, network-error?): Move from here…
* guix/http-client.scm: …to here, and also don't use http-get-error?.

Change-Id: I61ee9e5fbf90ebb76a34aa8b9ec8f5d74f8a3c54
2026-01-28 17:44:56 +00:00
Christopher Baines dce5b6371e scripts: substitute: Extract script specific output from download-nar.
As this moves download-nar in a direction where it could be used outside the
substitute script.

* guix/scripts/substitute.scm (download-nar): Return expected and actual
hashes and move status-port output to guix-substitute.
(process-substitution/fallback): Remove port argument, and move output to port
to guix-substitute.
(process-substitution): Return hashes from download-nar or
process-substitution/fallback, plus the narinfo.
(guix-substitute): Don't pass the reply-port in to process-substitution and
implement the messages to the reply-port here.

Change-Id: Icbddb9a47620b3520cdd2e8095f37a99824c1ce0
2026-01-28 17:44:56 +00:00
Christopher Baines 3e8d419da9 scripts: substitute: Untangle selecting fast vs small compressions.
Pulling the logic up to the script makes this code more portable and not
reliant on setting a global variable.

* guix/scripts/substitute.scm (%prefer-fast-decompression?): Rename to…
(%default-fast-decompression?): this.
(call-with-cpu-usage-monitoring): Use multiple values to return the results
from the thunk as well as the cpu usage.
(display-narinfo-data): Update accordingly.
(download-nar): Add fast-decompression? as a keyword argument, remove
code to set! it and monitor the cpu-usage.
(process-substitution, process-substitution/fallback): Accept and pass through
fast-decompression? to download-nar.
(guix-substitute): Move the cpu usage monitoring and fast decompression
switching logic here.

Change-Id: I4e80b457b55bcda8c0ff4ee224dd94a55e1b24fb
2026-01-28 17:44:56 +00:00
Christopher Baines 392cf48739 http-client: Alter http-fetch to return the response.
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-28 17:44:56 +00:00
Christopher Baines dd6ee2f53a scripts: substitute: Simplify with-timeout usage.
To reduce the codepaths in download-nar.

* guix/scripts/substitute.scm (with-timeout): Accept a #f duration and don't
set a timeout.
(download-nar): Remove the if for fetch-timeout.

Change-Id: I4e944a425a8612e96659dd84dd0e315012f080ab
2026-01-28 17:44:56 +00:00
Cayetano Santos 45469682c8 gnu: python-botorch: Update to 0.16.1.
* gnu/packages/machine-learning.scm (python-botorch): Update to 0.16.1.

Merges guix/guix!5935

Change-Id: I6d2d9d3b3071a7974a41020c2f42b4547cc92fcf
2026-01-28 14:16:43 +01:00
Cayetano Santos e1890ff86f gnu: python-gpytorch: Update to 1.15.1.
* gnu/packages/machine-learning.scm (python-gpytorch): Update to 1.15.1.

Merges guix/guix!5935

Change-Id: I1b2d4b8937f74143910ba281f7496d4b1c10b81c
2026-01-28 14:16:35 +01:00
Cayetano Santos f5dd93caf3 gnu: python-pynndescent: Update to 0.6.0.
* gnu/packages/machine-learning.scm (python-pynndescent): Update to 0.6.0.
[native-inputs]: Remove python-wheel.

Merges guix/guix!5935

Change-Id: Ib9dcb82bede9d2806c0e44c8b39c428aaac97804
2026-01-28 14:16:09 +01:00
Cayetano Santos f18a45499a gnu: bowtie: Update to 2.5.4.
* gnu/packages/bioinformatics.scm (bowtie): Update to 2.5.4.
[source]: Use G-Expressions in ’snippet.
[arguments]: Use G-Expressions.
<#:make-flags>: Add CC.
<#:phases>: Add ’tests? arguments to ’check phase; add ’fix-prefix.
[inputs]: Drop variables, add onetbb, delete tbb-2020 and
python-wrapper.
[native-inputs]: Add python-wrapper, which and perl-file-which.

Merges guix/guix!5491

Change-Id: I12686b06911c11170748b64af722c5311b2e542d
2026-01-28 14:03:59 +01:00
Patrick Norton adfeff04bc gnu: iotop: Update to 1.31.
* gnu/packages/linux.scm (iotop): Update to 1.31.

Closes: guix/guix#5961
Change-Id: I1f15cb19542d9be4a738adf113bded904e4d3b6a
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2026-01-28 18:31:55 +08:00
Ashish SHUKLA 039695115f gnu: knot: Update to 3.5.3.
* gnu/packages/dns.scm (knot): Update to 3.5.3.

Closes: guix/guix#5984
Change-Id: Iffe0cc8e828c99bd8c3345cbb656369425a438f0
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2026-01-28 18:31:51 +08:00
Thomas Kramer 33209c4ff5 gnu: Add python-gdstk.
* gnu/packages/electronics.scm (python-gdstk): New variable

Merges guix/guix!5798

Change-Id: I00e6ae26aaf741acd24caceba6d3181ab83ed692
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
2026-01-28 10:21:26 +01:00
Thomas Kramer e3fe03c5ed gnu: Add gdstk.
* gnu/packages/electronics.scm (gdstk): New variable

Merges guix/guix!5798

Change-Id: Ic159f22e31fadb7f348bf768b1e23e0ef71d2331
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
2026-01-28 10:21:17 +01:00
Cayetano Santos 59dbdc642a gnu: emacs-lsp-mode: Update to 9.0.1-1.328c979.
* gnu/packages/emacs-xyz.scm (emacs-lsp-mode): Update to
9.0.1-1.328c979.
[arguments]: Update #:emacs.

Change-Id: I79a5da405f9ef77e9a8376db421c3709a69e2fb4
2026-01-28 09:07:27 +01:00
Ludovic Courtès 40c24a92af serialization: Use ‘bytevector-slice’ from Guile >= 3.0.9.
* guix/serialization.scm (sub-bytevector): Remove.
(read-byte-string): Use ‘bytevector-slice’.
* configure.ac: Require Guile 3.0.9.
* doc/contributing.texi (Requirements): Adjust accordingly.

Change-Id: I7aa11a2182530ea5131be591db03b17efb6847a4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4495
2026-01-27 13:01:14 +01:00
Ludovic Courtès ab72a155c6 store: Move low-level protocol bit-twiddling to (guix remote-procedures).
* guix/store.scm (%protocol-version, %worker-magic-1, %worker-magic-2)
(protocol-major, protocol-minor, protocol-version): Move to…
* guix/remote-procedures.scm: … here.

Change-Id: Idbb23e63ab6314aa7e9ce0e3e5aa835be85c27d9
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:18 +01:00
Ludovic Courtès 68f1f74fb8 Define remote procedure interface in (guix remote-procedures).
* guix/store.scm (define-enumerate-type, operation-id)
(hash-algo, build-mode, gc-action): Remove.
(operation, define-operation): Remove.
(client-stub, define-client-stubs): New macros.
(%client-stubs): New variable.
<top level>: Call ‘visit-remote-procedures’.
(define-top-level-client-procedures): New macro.
<top level>: Call ‘define-top-level-client-procedures’.
(valid-path?, query-path-hash, query-path-info, ensure-path)
(find-roots, add-temp-root, add-indirect-root)
(references, referrers, valid-derivers, query-derivation-outputs)
(has-substitutes, substitutable-paths, substitutable-path-info)
(optimize-store, import-paths, query-failed-paths)
(clear-failed-paths, hash-path->path): Remove.
(set-build-options): Rewrite in terms of ‘set-options’.
(add-data-to-store): Rewrite in terms of ‘add-data-to-store/direct’.
(add-to-store, add-file-tree-to-store): Use ‘remote-procedure-id’ instead of
‘operation-id’.
(build-things): Rewrite in terms of ‘build-things/direct’.
(%built-in-builders): Rewrite in terms of ‘built-in-builders/direct’.
(verify-store): Rewrite in terms of ‘verify-store/direct’.
(run-gc): Rewrite in terms of ‘run-gc/direct’.
(export-path): Rewrite in terms of ‘export-path/direct’.
(substitute-urls): Rewrite in terms of ’substitute-urls/direct’.
* guix/remote-procedures.scm: New file.
* Makefile.am (MODULES): Add it.

Change-Id: I78b3d47e34205e8f8b93a51b273f56edc46e3902
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:18 +01:00
Ludovic Courtès b67831bb6e store: Require a more recent minor version.
* guix/store.scm (open-connection): Require minor version #x61 or later.
(set-build-options): Remove now useless conditionals.
(build-things): Remove ‘build/old’ and the condition on the minor version.

Change-Id: I17835524ad7d69d29dba81292c6691212e200117
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:17 +01:00
Ludovic Courtès 40b525be02 store: Rewrite ‘run-gc’ client stub using ‘operation’.
* guix/store.scm (run-gc): Rewrite using ‘operation’.

Change-Id: I63c83604be22af83ada073993994e8695ab4e7b0
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:17 +01:00
Ludovic Courtès 4dd5fd2dff store: Remove unnecessary protocol version conditionals.
In commit 36457566f9 (2014), the
‘worker-protocol.hh’ defines #x10e as the protocol version.  Thus, minor
versions lower than 14 existed in Nix but never existed in Guix.

* guix/store.scm (open-connection): Ensure minor version >= 14.
(set-build-options): Remove unnecessary conditionals on
‘store-connection-minor-version’.
(run-gc): Likewise.

Change-Id: I5fc32fbdf7412150ac81543b5da17d2c6f3473a1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:17 +01:00
Ludovic Courtès 132250beff serialization: Rename ‘string’ to ‘utf8-string’.
This avoids name clash with the ‘string’ binding of core Guile.

* guix/serialization.scm <top level>: Change ‘string’ to ‘utf8-string’.
* guix/store.scm (valid-path?, hash-part->path):
(add-data-to-store, add-indirect-root): Adjust operation specification
accordingly.

Change-Id: Ibf7c571ac46689c2870a2c6db6a3632405d47544
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:17 +01:00
Ludovic Courtès 0c1ea038e9 serialization: Formally declare serializable types.
* guix/serialization.scm (write-boolean, read-boolean)
(read-base16, write-base16): New procedures.
(<substitutable>, <path-info>): New record types.
(read-substitutable-path-list, read-path-info): New procedures.
(define-serializable-types): New macro.
<top level>: Use it.
* guix/store.scm (<substitutable>, <path-info>)
(read-substitutable-path-list, read-path-info): Move to serialization.scm.
(read-arg, write-arg): Remove.
* guix/store.scm (open-connection, process-stderr)
(add-to-store, add-file-tree-to-store, run-gc)
(export-path, export-paths): Use ‘write-value’ and ‘read-value’.
(store-path): Rename to…
(make-store-path): … this.
(output-path, fixed-output-path): Adjust accordingly.

Change-Id: I0b8863e48cb59205fa7812e8202f9a175ec8606b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-01-27 12:58:17 +01:00
Clombrong 8dc57904e3 services: Add endlessh-service-type.
* docs/guix.texi: Document EndleSSH service and configuration.
* gnu/services/ssh.scm: New service.
* gnu/services/ssh.scm: Define shepherd service.

Merges: https://codeberg.org/guix/guix/pulls/5910
Co-Authored-By: Giacomo Leidi <therewasa@fishinthecalculator.me>
Change-Id: Ief4520b536276b88f2e5027ef0897bf84b2835df
Signed-off-by: Giacomo Leidi <therewasa@fishinthecalculator.me>
2026-01-27 11:46:03 +01:00
Daniel Khodabakhsh 3f5ebde420 gnu: Add node-typescript.
* gnu/packages/node-xyz.scm (node-typescript): New variable.

Change-Id: Ief680a973c6f4f98837db3b2b15109c10fda8c6e
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh 116f04b948 gnu: Add node-types-source-map-support.
* gnu/packages/node-xyz.scm (node-types-source-map-support): New variable.

Change-Id: I4bfda700f971ad4b8ec2d04ff510e263f94d94bd
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh 526e87d09f gnu: Add node-types-node.
* gnu/packages/node-xyz.scm (node-types-node): New variable.

Change-Id: I31801972ed59743856d56585aad450aa8368baea
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh ee7d8a74a6 gnu: Add node-chalk.
* gnu/packages/node-xyz.scm (node-chalk): New variable.

Change-Id: Ia267af1f10b4b322682ceb44d0bae7d9ee0dc30b
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh a93c9ae66c gnu: Add node-command-line-usage.
* gnu/packages/node-xyz.scm (node-command-line-usage): New variable.

Change-Id: I30410f1287e1a4aa07ea159e160bc7c6e79073ed
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh 58e6543f6b gnu: Add node-hereby.
* gnu/packages/node-xyz.scm (node-hereby): New variable.

Change-Id: Ide051fbc2be3d80f70a45f1030211e20fbc9f9bf
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:46 +01:00
Daniel Khodabakhsh 5c98e5269a gnu: Add node-glob.
* gnu/packages/node-xyz.scm (node-glob): New variable.

Change-Id: I8a16ef870f604cac35cda534b49006c7f746895e
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 0342cecbac gnu: Add node-minimatch.
* gnu/packages/node-xyz.scm (node-minimatch): New variable.

Change-Id: Ided488ef27a54d680681d966845e6e8cee74c0f3
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh edaab3e577 gnu: Add node-table-layout.
* gnu/packages/node-xyz.scm (node-table-layout): New variable.

Change-Id: I52722b5c23f877e0e11efca970a55a9bff4941eb
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 3081706ffa gnu: Add node-wordwrapjs.
* gnu/packages/node-xyz.scm (node-wordwrapjs): New variable.

Change-Id: I7a85881db3e2ce9cd99517b655b53add55ee7158
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 46d3c833c6 gnu: Add node-ansi-styles.
* gnu/packages/node-xyz.scm (node-ansi-styles): New variable.

Change-Id: I5ea900aae7a16418d442de5cd058eed5e18a7cbc
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh c40a927df6 gnu: Add node-brace-expansion.
* gnu/packages/node-xyz.scm (node-brace-expansion): New variable.

Change-Id: I3d2d96c5a888d3e70ed23248e7e02b3a92ae14c2
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 2371b45028 gnu: Add node-fast-xml-parser.
* gnu/packages/node-xyz.scm (node-fast-xml-parser): New variable.

Change-Id: I1e569fed347895d0409b65110f184e90f7d9222c
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 6649e34002 gnu: Add node-minipass-7.
* gnu/packages/node-xyz.scm (node-minipass-7): New variable.

Change-Id: I9a7fa292a8117795959a3f45cb300d9e07fd6a45
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh aae52b37be gnu: Add node-path-scurry.
* gnu/packages/node-xyz.scm (node-path-scurry): New variable.

Change-Id: I39598efc068bc706a481d121f6b0c5615a83effc
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh 6d11b2c0c0 gnu: Add node-pretty-ms.
* gnu/packages/node-xyz.scm (node-pretty-ms): New variable.

Change-Id: I77eb83b965af37f31076766d4a0e795e61d64ab7
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh efe368426f gnu: Add node-source-map-support.
* gnu/packages/node-xyz.scm (node-source-map-support): New variable.

Change-Id: Ie975afe66498a174a78536c0075c53306a73593d
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh f868a14709 gnu: Add node-supports-color.
* gnu/packages/node-xyz.scm (node-supports-color): New variable.

Change-Id: I00d7701662e4d3752426aca5aece879fa8d15c79
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh d44c3fc267 gnu: Add node-which.
* gnu/packages/node-xyz.scm (node-which): New variable.

Change-Id: I31434c264ba2df58ed74eb3f35a97faea327ddf6
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:45 +01:00
Daniel Khodabakhsh b02a4eefbd gnu: Add node-balanced-match.
* gnu/packages/node-xyz.scm (node-balanced-match): New variable.

Change-Id: I91006e112da75c54a777bf6da83d5d939a7de9d1
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 029db9af52 gnu: Add node-color-convert.
* gnu/packages/node-xyz.scm (node-color-convert): New variable.

Change-Id: Ifc3061862a5d0abbad0fedf1b36ea4f9e554b418
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 333b5bba9d gnu: Add node-dprint-formatter.
* gnu/packages/node-xyz.scm (node-dprint-formatter): New variable.

Change-Id: I3b850a1a3d821f125f52d02718c49c7252ed0247
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 433fd24130 gnu: Add node-jsonc-parser.
* gnu/packages/node-xyz.scm (node-jsonc-parser): New variable.

Change-Id: I4a482d482b587006bac621161c01a31ab8c16a55
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 9ac0df45ee gnu: Add node-array-back.
* gnu/packages/node-xyz.scm (node-array-back): New variable.

Change-Id: I348ce710940d8309c1fb55313425541061644228
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 145d4ca98e gnu: Add node-buffer-from.
* gnu/packages/node-xyz.scm (node-buffer-from): New variable.

Change-Id: Id90afe871a323fa513832544c222560a0954da0a
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 4ce6be078a gnu: Add node-deep-extend.
* gnu/packages/node-xyz.scm (node-deep-extend): New variable.

Change-Id: I567a994e57e48d54e5a938cd56fb4d98445448c7
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 0cb873f173 gnu: Add node-escape-string-regexp.
* gnu/packages/node-xyz.scm (node-escape-string-regexp): New variable.

Change-Id: I5879164912380f9880313bf45349c42a270f4c07
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 3ca4d943fe gnu: Add node-fastest-levenshtein.
* gnu/packages/node-xyz.scm (node-fastest-levenshtein): New variable.

Change-Id: I452ea3174da66509b199c38031ae6e5ca08f1a85
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 9ce61658d1 gnu: Add node-has-flag.
* gnu/packages/node-xyz.scm (node-has-flag): New variable.

Change-Id: I75d3d85928e8f3cd884ce9dc3a6c20927f62965a
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 699ddb16dd gnu: Add node-isexe.
* gnu/packages/node-xyz.scm (node-isexe): New variable.

Change-Id: I412db97f7c94d3eed15edf9ca9a27f843a3079aa
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh bde545386f gnu: Add node-lru-cache.
* gnu/packages/node-xyz.scm (node-lru-cache): New variable.

Change-Id: Ic09c6608d11554d0e67935dab87a0f681d1ca49b
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:44 +01:00
Daniel Khodabakhsh 333f7c1709 gnu: Add node-minipass-5.
* gnu/packages/node-xyz.scm (node-minipass-url): New variable.

Change-Id: Ib3edc6d85aa3e279751b296870d6ed1f571affcf
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh 6765faeb84 gnu: Add node-undici-types.
* gnu/packages/node-xyz.scm (node-undici-types): New variable.

Change-Id: I2a958fa4b7aeda01587105fe1027607df7677851
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh 7d94b835e9 gnu: node-minimist: Update to 1.2.8.
* gnu/packages/node-xyz.scm (node-minimist): Update to 1.2.8.

Change-Id: Ie9eb70530a2870365794c4d3b2432dddc4e27361
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh 9de7fa194d gnu: Add node-parse-ms.
* gnu/packages/node-xyz.scm (node-parse-ms): New variable.

Change-Id: I9d12b5acff3122276e7074c9b77ba1b3d109a4fd
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh dd7dac883e gnu: Add node-picocolors.
* gnu/packages/node-xyz.scm (node-picocolors): New variable.

Change-Id: I60c0bbf7b2ea058f398f81dfcf635165ffd1b027
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh a98bfe26fb gnu: Add node-reduce-flatten.
* gnu/packages/node-xyz.scm (node-reduce-flatten): New variable.

Change-Id: Ib8887489b53f1e4cad033ddeffe597a7d3ad6dfa
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh 5eab0ad523 gnu: Add node-source-map.
* gnu/packages/node-xyz.scm (node-source-map): New variable.

Change-Id: I13e2be02c270f18f300eb61ad3504b8bfceda5cd
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh 89ad8677b0 gnu: Add node-strnum.
* gnu/packages/node-xyz.scm (node-strnum): New variable.

Change-Id: I33988e4fd6eca9b81c650b171b777af747056760
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:43 +01:00
Daniel Khodabakhsh ba1e0dc41a gnu: Add node-typical.
* gnu/packages/node-xyz.scm (node-typical): New variable.

Change-Id: I0053fc63f641b1ba6e294931496b41ab6e33dc86
Signed-off-by: Andreas Enge <andreas@enge.fr>
2026-01-27 10:39:35 +01:00
Efraim Flashner 1cad718948 gnu: make-rust-sysroot: Remove cross-gcc work-around.
* gnu/packages/rust.scm (make-rust-sysroot/implementation)
[native-inputs]: Remove gcc-14.

Change-Id: Ia2c8dcff4b3fac5f7d61d7890e35f769e7bdc1bf
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2026-01-27 10:55:49 +02:00
Cayetano Santos 149c5bf876 gnu: emacs-marginalia: Update to 2.9.
* gnu/packages/emacs-xyz.scm (emacs-marginalia): Update to 2.9.

Change-Id: I2976a02f3636919dbc0c68b39cc40210d72dfb9b
2026-01-27 09:28:12 +01:00
Cayetano Santos 0a0bc22694 gnu: emacs-cape: Update to 2.5.
* gnu/packages/emacs-xyz.scm (emacs-cape): Update to 2.5.

Change-Id: I5343780d4323d33d163d6d7a03e1e0fa032a1621
2026-01-27 09:28:12 +01:00
Cayetano Santos 025cb9939c gnu: emacs-corfu: Update to 2.8.
* gnu/packages/emacs-xyz.scm (emacs-corfu): Update to 2.8.

Change-Id: I53d89deacc41267ab824b85f8d53afaf8ceb6f21
2026-01-27 09:28:12 +01:00
Hennadii Stepanov e3f6fa5b95 gnu: osslsigncode: Update to 2.11.
* gnu/packages/crypto.scm (osslsigncode): Update to 2.11.

Merges guix/guix!5944

Change-Id: I2e1a291efbb21681bb1da2a81cead0e045114e9d
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
2026-01-27 09:15:19 +01:00
Cayetano Santos e1e2fb4008 gnu: emacs-org-ref: Update to 3.1-1.dc2481d.
* gnu/packages/emacs-xyz.scm (emacs-org-ref): Update to 3.1-1.dc2481d.
[propagated-inputs]: Add emacs-pdf-tools.
[arguments]: Delete ’skip-failing-test #:phase; set #:emacs.

Change-Id: I88bd559d87ea2482bed32dbca3692bd0d4013afe
2026-01-27 08:23:35 +01:00
Danny Milosavljevic 6c19ffab58 gnu: python-mathics-django: Update to 9.0.0.
* gnu/packages/maths.scm (python-mathics-django): Update to 9.0.0.

Change-Id: I7e4acb492b06a4d3357db61e7baf445cd36b6d59
2026-01-27 07:46:12 +01:00
Danny Milosavljevic c443f64cda gnu: python-mathicsscript: Update to 9.0.0.
* gnu/packages/maths.scm (python-mathicsscript): Update to 9.0.0.

Change-Id: I608b02988fee70306e465e69dd85ab059fb4db36
2026-01-27 07:46:12 +01:00
Danny Milosavljevic a6fc532169 gnu: python-mathics-core: Update to 9.0.0.
* gnu/packages/maths.scm (python-mathics-core)[arguments]<#:tests?>: Enable.
<#:phases>{patch-bugs}: Modify.
{set-home}: New phase.

Change-Id: I4b892e4475f63478ea6c52bed69f593259a4d618
2026-01-27 07:46:12 +01:00
Danny Milosavljevic 1a81e3a4ce gnu: python-mathics-scanner: Update to 2.0.0.
* gnu/packages/maths.scm (python-mathics-scanner): Update to 2.0.0.
[arguments]<#:phases>[prepare]: Modify.

Change-Id: I3e6cfe6b18899a1000d181b024aebbd120397250
2026-01-27 07:46:11 +01:00
Maxim Cournoyer 830d58dac2 import/utils: Add #:recursive? to `git-origin'.
* guix/import/utils.scm (git-origin) [#:recursive?]: New key.

Change-Id: Ibae80e873a593f9e904b1c974dbeca18fa115074
2026-01-27 14:27:25 +09:00
Maxim Cournoyer 33bb5f129d gnu: mitm-cache: Apply patch to gracefully handle HEAD requests.
* gnu/packages/patches/mitm-cache-head-requests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register.
* gnu/packages/rust-apps.scm (mitm-cache): Apply it.

Change-Id: I3480735340ef72be2acf8a3fdcfa9e71a6961b45
2026-01-27 14:27:25 +09:00
Maxim Cournoyer d5cd7679d3 import/utils: Add #:recursive? argument to `download-git-repository'.
* guix/import/utils.scm (download-git-repository)
[#:recursive?]: New argument.

Change-Id: I35660284e8048714c53f0ce4c16714630fd89775
2026-01-27 14:27:25 +09:00
Maxim Cournoyer 1b761aa3df system/linux-container: Re-export %namespaces, %writable-/tmp variables.
* gnu/system/linux-container.scm: Re-export %namespaces and %writable-/tmp,
which are from (guix build linux-container).

Change-Id: Iaad362247825e30fb6837af013018f2c472c19fa
2026-01-27 14:27:25 +09:00
Maxim Cournoyer 4b023510ec store: Mention return value of `add-to-store'.
* guix/store.scm (add-to-store): Mention return value in doc string.

Change-Id: I820cdb17945979954c9a2b09808025b5bb7793fc
2026-01-27 14:27:25 +09:00
Maxim Cournoyer cdd80c5ad7 doc: Fix typo.
* doc/guix.texi (Invoking guix import): Fix typo.

Change-Id: I4d9234ac3c4d83f64d36e7aedf4c67e9eaf79167
2026-01-27 14:27:25 +09:00
Vagrant Cascadian 60a507264d gnu: disorderfs: Update to 0.6.2.
* gnu/packages/file-systems.scm (disorderfs): Update to 0.6.2.
[native-inputs]: Switch from fuse-2 to fuse-3.18.
2026-01-26 20:00:05 -08:00
Vagrant Cascadian c468099db7 gnu: Add fuse@3.18.
* gnu/packages/linux.scm (fuse-3.18): New variable.
2026-01-26 19:59:58 -08:00
Maxim Cournoyer 5b1f7552e2 gnu: qemu: Update to 10.2.0.
* gnu/packages/virtualization.scm (qemu): Update to 10.2.0.
* gnu/packages/patches/qemu-fix-agent-paths.patch: Update patch.
* gnu/packages/patches/qemu-fix-test-virtio-version.patch: Adjust for file
name change.

Relates-to: #2447
Change-Id: I26034baf660af802cf4a4646d3b303f949bb1f3f
2026-01-27 11:16:12 +09:00
Maxim Cournoyer 476e0818c1 Revert "maint: Clean-up .dir-locals.el a bit."
This reverts commit 54b5356488.

The supporting `lisp-fill-paragraphs-as-doc-string' variable in Emacs hasn't
been released yet.  To check, run this in an Emacs git checkout:

  git branch --contains 192355e54af91ad6e7d1343071a749e1ced29400

Change-Id: I3fc23ceb7bc22876d7d3a51a1e55c6965c45699f
2026-01-27 11:09:09 +09:00
Maxim Cournoyer 42fe5b361c gnu: Add lua-language-server.
* gnu/packages/lua.scm (lua-language-server): New variable.

Change-Id: I2e110acf855b81f3d9e7b3228fc5fbf0827cb884
2026-01-27 10:56:28 +09:00
Maxim Cournoyer d888d51761 gnu: Add luamake and lua-bee.
* gnu/packages/lua.scm (luamake, lua-bee): New variables.

Change-Id: I9d2b05d8dfd7cf3a47d5ef9a23685d5fd0d29898
2026-01-27 10:56:28 +09:00
jgart c283124f4d gnu: mblaze: Update to 1.4.
* gnu/packages/mail.scm (mblaze): Update to 1.4.
[source]: Update uri.

Change-Id: I0c31c5dfd325dca85b6ae8c2d4a46ab9f3796efd
2026-01-26 14:57:18 -05:00
Cayetano Santos 0c1046ac0d gnu: adaptivecpp: Add rocm backend.
* gnu/packages/sycl.scm (adaptivecpp)[inputs]: Add rocm-device-libs,
rocm-hip-runtime, and rocr-runtime.
[native-inputs]: Remove clang-19 and lld-19; add clang-20 and lld-20.
[arguments]: Adjust #:configure-flags accordingly.
[synopsis]: Refresh.
[description]: Update.

Merges guix/guix!5879

Change-Id: Ide6484230237ae348e6a71be43bc30f5231af597
2026-01-26 18:29:25 +01:00
Cayetano Santos 11097ec2e0 gnu: adaptivecpp: Fix rpath.
* gnu/packages/sycl.scm (adaptivecpp)[arguments]<#:phases>: Remove
’create-symlinks.
<#:configure-flags>: Remove default flag.

Change-Id: Ia8d9a87e46be22303ffca126dec733b7042ead9d
2026-01-26 18:19:09 +01:00
Efraim Flashner 40298c2071 gnu: python-numpy: Fix build on powerpc64le-linux.
* gnu/packages/python-xyz.scm (python-numpy)[arguments]: Add a phase to
fix the test suite when building on powerpc64le-linux.

Change-Id: I124cab23263f72174b72f36c3fba08fa6d696b80
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2026-01-26 18:21:42 +02:00
Efraim Flashner 64429ac586 Revert "gnu: gdb: Enable scripting when cross compiling."
This reverts commit 1d9cf8758e.

This commit inadvertently caused many rebuilds.
2026-01-26 13:57:11 +02:00
Yelninei 1d9cf8758e gnu: gdb: Enable scripting when cross compiling.
Python detection failed because gdb was not able to find the flags for linking
with python.
Follow https://www.sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport but
dispatch to pkg-config.

Guile detection was failing because gdb only tried the unprefixed pkg-config.
Also a native guile is needed to compile the scheme files.

Fixes guix/guix#5634.

* gnu/packages/gdb.scm (gdb-python-config): New procedure.
(gdb-14)[configure-flags]: Add --with-python
[#:phases]: Add a phase for guile detection.
[native-inputs]: Add guile-3.0.

Change-Id: I4a151ac292eba1472725a1535b72b9168bc10742
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #5645
2026-01-26 10:28:45 +01:00
Charles Roelli d7e71dad6d doc: Fix hello package example.
* doc/guix.texi (Defining Packages): Fix package example.

Change-Id: Ib3bf14f50a938de569b7eb1927ec18d9ee5d1e5c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #5838
2026-01-26 10:24:00 +01:00
Ludovic Courtès 997dd3aa51 doc: cookbook: Don’t insist on mounting home directories on the head node.
* doc/guix-cookbook.texi (Setting Up a Head Node): State that mounting home
directories on the head node is “optional”.

Change-Id: Id60b54d463f5422f71a71607cd71ed347a98865e
Merges: #5890
2026-01-26 10:22:54 +01:00
Ludovic Courtès 085c6e6583 doc: cookbook: Recommend systemd timer for ‘guix gc’.
* doc/guix-cookbook.texi (Setting Up a Head Node): Give instructions for the
systemd timer rather than ‘crontab’.

Change-Id: I063ad0ea694500a67553d66d37ae354b9c078a65
2026-01-26 10:18:39 +01:00
Ludovic Courtès 28ce4eae6b doc: cookbook: Update for unprivileged guix-daemon execution.
* doc/guix-cookbook.texi (Setting Up a Head Node): Add note about unprivileged
guix-daemon.  Remove ‘--build-users-group=guixbuild’ flag from ‘.service’
snippets.  Mention “systemd timer” next to “crontab entry”.

Change-Id: I72ac59d3ce8a5572dbeb8cb4c7764a8478f6e1ee
2026-01-26 10:18:35 +01:00
45 changed files with 16290 additions and 1471 deletions
+21 -3
View File
@@ -98,9 +98,27 @@
((indent-tabs-mode . nil)
;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the
;; first line of package descriptions to extrude past 'fill-column'. The
;; following variable reverts its behavior to the previous one.
(lisp-fill-paragraphs-as-doc-string nil)
;; first line of package descriptions to extrude past 'fill-column', and
;; somehow that is deemed more correct upstream (see:
;; https://issues.guix.gnu.org/56197).
(eval . (progn
(require 'lisp-mode)
(defun emacs27-lisp-fill-paragraph (&optional justify)
(interactive "P")
(or (fill-comment-paragraph justify)
(let ((paragraph-start
(concat paragraph-start
"\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
(paragraph-separate
(concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
(fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
(derived-mode-p 'emacs-lisp-mode))
emacs-lisp-docstring-fill-column
fill-column)))
(fill-paragraph justify))
;; Never return nil.
t))
(setq-local fill-paragraph-function #'emacs27-lisp-fill-paragraph)))
;; This notably allows '(' in Paredit to not insert a space when the
;; preceding symbol is one of these.
+1
View File
@@ -116,6 +116,7 @@ MODULES = \
guix/narinfo.scm \
guix/derivations.scm \
guix/grafts.scm \
guix/remote-procedures.scm \
guix/repl.scm \
guix/rpm.scm \
guix/transformations.scm \
+3 -2
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
#
# GNU Guix --- Functional package management for GNU
# Copyright © 2012-2021, 2022-2023 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2012-2021, 2022-2023, 2025 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2013, 2016 Mark H Weaver <mhw@netris.org>
# Copyright © 2014-2016 Alex Kost <alezost@gmail.com>
# Copyright © 2014-2016 David Thompson <davet@gnu.org>
@@ -130,7 +130,8 @@ if test "x$GUILD" = "x"; then
fi
dnl (guix ui), notably, requires 'default-optimization-level' added in 3.0.3.
PKG_CHECK_MODULES([GUILE], [guile-3.0 >= 3.0.3])
dnl (guix serialization) requires 'bytevector-slice' added in 3.0.9.
PKG_CHECK_MODULES([GUILE], [guile-3.0 >= 3.0.9])
dnl Get CFLAGS and LDFLAGS for libguile.
GUILE_FLAGS
+1 -1
View File
@@ -66,7 +66,7 @@ GNU Guix depends on the following packages:
@itemize
@item @url{https://gnu.org/software/guile/, GNU Guile}, version 3.0.x,
version 3.0.3 or later;
version 3.0.9 or later;
@item @url{https://notabug.org/cwebber/guile-gcrypt, Guile-Gcrypt}, version
0.1.0 or later;
@item
+41 -14
View File
@@ -22,7 +22,7 @@ Copyright @copyright{} 2020 André Batista@*
Copyright @copyright{} 2020 Christine Lemmer-Webber@*
Copyright @copyright{} 2021 Joshua Branson@*
Copyright @copyright{} 2022, 2023 Maxim Cournoyer@*
Copyright @copyright{} 2023-2025 Ludovic Courtès@*
Copyright @copyright{} 2023--2026 Ludovic Courtès@*
Copyright @copyright{} 2023 Thomas Ieong@*
Copyright @copyright{} 2024 Florian Pelz@*
Copyright @copyright{} 2025 45mg@*
@@ -5958,6 +5958,15 @@ installation instructions (@pxref{Binary Installation,,, guix, GNU Guix
Reference Manual}). Thanks to the installation script, this should be
quick. Once installation is complete, we need to make some adjustments.
@quotation Note
Starting from Guix version 1.5.0, @command{guix-daemon} runs without
root privileges by default; previously installed systems can also be
migrated to this ``rootless'' mode (@pxref{Build Environment Setup,,,
guix, GNU Guix Reference Manual}). Learn more about this change in a
@uref{https://hpc.guix.info/blog/2025/03/build-daemon-drops-its-privileges/,
2025 blog post}.
@end quotation
Since we want @code{guix-daemon} to be reachable not just from the head
node but also from the compute nodes, we need to arrange so that it
listens for connections over TCP/IP. To do that, we'll edit the systemd
@@ -5972,13 +5981,12 @@ something like this:
@ifnothtml
@example
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon \
--build-users-group=guixbuild \
--listen=/var/guix/daemon-socket/socket --listen=0.0.0.0
@end example
@end ifnothtml
@ifhtml
@example
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --listen=/var/guix/daemon-socket/socket --listen=0.0.0.0
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --listen=/var/guix/daemon-socket/socket --listen=0.0.0.0
@end example
@end ifhtml
@@ -6014,32 +6022,51 @@ The @file{/gnu/store} directory can be exported read-only since only
package}; thus, to allow users to install packages with @code{guix
package}, this must be read-write.
Users can create as many profiles as they like in addition to the
default profile, @file{~/.guix-profile}. For instance, @code{guix
package -p ~/dev/python-dev -i python} installs Python in a profile
reachable from the @code{~/dev/python-dev} symlink. To make sure that
@quotation Note
Although it is rarely used, Guix allows for the creation of profiles in
non-default locations. For instance, @code{guix package -p
~/dev/python-dev -i python} installs Python in a profile reachable from
the @code{~/dev/python-dev} symlink instead of the default
@file{~/.guix-profile}.
To make sure that
this profile is protected from garbage collection---i.e., that Python
will not be removed from @file{/gnu/store} while this profile exists---,
@emph{home directories should be mounted on the head node} as well so
that @code{guix-daemon} knows about these non-standard profiles and
avoids collecting software they refer to.
@c The following paragraph refers to Guix commit
@c d12c4452a49b355369636de1dfc766b5bad6437b, which changed
@c 'time-machine' and 'shell' to store GC roots under /var/guix.
Doing so is optional though: profiles created by default by
@command{guix package}, @command{guix pull}, and @command{guix shell}
are all stored under @file{/var/guix} and thus protected from garbage
collection.
@end quotation
It may be a good idea to periodically remove unused bits from
@file{/gnu/store} by running @command{guix gc} (@pxref{Invoking guix
gc,,, guix, GNU Guix Reference Manual}). This can be done by adding a
crontab entry on the head node:
systemd timer based on the one shipped with Guix:
@example
root@@master# crontab -e
cp \
/var/guix/profiles/per-user/root/current-guix/lib/systemd/system/guix-gc.* \
/etc/systemd/system
@end example
@noindent
... with something like this:
Make sure to edit @file{guix-gc.service} and @file{guix-gc.timer} under
@file{/etc/systemd/system} to adjust the parameters to your need: timer
frequency, amount of free space, and whether to delete user's old
generations. We recommend executing @command{guix gc -F50G} every
night, which will ensure that at least 50@tie{}GiB are available,
without deleting user generations. Once you're satisfied, you can start
the timer:
@example
# Every day at 5AM, run the garbage collector to make sure
# at least 10 GB are free on /gnu/store.
0 5 * * 1 /usr/local/bin/guix gc -F10G
systemctl daemon-reload
systemctl start guix-gc.timer
@end example
We're done with the head node! Let's look at compute nodes now.
+55 -2
View File
@@ -7901,6 +7901,7 @@ package looks like this:
@lisp
(define-module (gnu packages hello)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -15124,8 +15125,8 @@ When @option{--lockfile} is specified, the importer will ignore other options
and won't output package expressions, instead importing source expressions
from @var{file}, a @file{Cargo.lock} file.
@xref{Packaging Rust Crates,,, guix-cookbook, GNU Guix Cookbook}, for packaging
workflow utilizing it.
@xref{Packaging Rust Crates,,, guix-cookbook, GNU Guix Cookbook}, for
a packaging workflow utilizing it.
@end table
@item elm
@@ -24320,6 +24321,58 @@ Whether to enable password-based authentication.
@end table
@end deftp
@cindex EndleSSH
@defvar endlessh-service-type
This is the type for the
@uref{https://github.com/skeeto/endlessh,EndleSSH} program that runs an
SSH tar pit. By very slowly sending an SSH banner, this program keeps
unwanted visitors locked away from the actual SSH daemon.
For example, to specify a service running Endlessh on port @code{2222}, add
this call to the operating system's @code{services} field:
@lisp
(service endlessh-service-type
(endlessh-configuration
(port-number 2222)))
@end lisp
@end defvar
@deftp {Data Type} endlessh-configuration
This data type represents the configuration of an EndleSSH service.
@table @asis
@item @code{endlessh} (default: @var{endlessh})
The EndleSSH package to use.
@item @code{port-number} (default: @code{22})
The TCP port where the daemon waits for incoming connections.
@item @code{log-level} (default: @code{1})
The log level. @code{0} is quiet, @code{2} is very noisy.
@item @code{syslog-output?} (default: @code{#t})
Whether to enable syslog output.
@item @code{pid-file} (default: @code{"/var/run/endlessh.pid"})
File name of the daemon's PID file.
@item @code{message-delay} (default: @code{10000})
The endless banner is sent one line at a time. This is the delay in
milliseconds between individual lines.
@item @code{max-banner-length} (default: @code{32})
The length of each line is randomized. This controls the maximum length
of each line. Shorter lines may keep clients on for longer if they give
up after a certain number of bytes.
@item @code{max-clients} (default: @code{4096})
Maximum number of connections to accept at a time. Connections beyond
this are not immediately rejected, but will wait in the queue.
@end table
@end deftp
@cindex AutoSSH
@defvar autossh-service-type
This is the type for the @uref{https://www.harding.motd.ca/autossh,
+3
View File
@@ -1355,6 +1355,8 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-asan-missing-include.patch \
%D%/packages/patches/gcc-boot-2.95.3.patch \
%D%/packages/patches/gcc-boot-4.6.4.patch \
%D%/packages/patches/gcc-boot-4.6.4-riscv64-support.patch \
%D%/packages/patches/gcc-boot-4.6.4-riscv64-libstdc++-support.patch \
%D%/packages/patches/gcc-cross-environment-variables.patch \
%D%/packages/patches/gcc-cross-gxx-include-dir.patch \
%D%/packages/patches/gcc-fix-texi2pod.patch \
@@ -1901,6 +1903,7 @@ dist_patch_DATA = \
%D%/packages/patches/minisat-install.patch \
%D%/packages/patches/miniz-for-pytorch.patch \
%D%/packages/patches/mit-krb5-hurd.patch \
%D%/packages/patches/mitm-cache-head-requests.patch \
%D%/packages/patches/mpc123-initialize-ao.patch \
%D%/packages/patches/mpg321-CVE-2019-14247.patch \
%D%/packages/patches/mpg321-gcc-10.patch \
+42 -30
View File
@@ -138,6 +138,7 @@
#:use-module (gnu packages node)
#:use-module (gnu packages nss)
#:use-module (gnu packages ocaml)
#:use-module (gnu packages oneapi)
#:use-module (gnu packages pcre)
#:use-module (gnu packages package-management)
#:use-module (gnu packages parallel)
@@ -5674,7 +5675,7 @@ errors at the end of reads.")
(define-public bowtie
(package
(name "bowtie")
(version "2.3.4.3")
(version "2.5.4")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5683,40 +5684,51 @@ errors at the end of reads.")
(file-name (git-file-name name version))
(sha256
(base32
"1zl3cf327y2p7p03cavymbh7b00djc7lncfaqih33n96iy9q8ibp"))
(modules '((guix build utils)))
"020dwg059zmgqcfnxgg67qmn8rf207mwrybly39ncch1riva58z5"))
(snippet
'(begin
(substitute* "Makefile"
;; replace BUILD_HOST and BUILD_TIME for deterministic build
(("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
(("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))))))
#~(begin
(use-modules (guix build utils))
(substitute* "Makefile"
;; replace BUILD_HOST and BUILD_TIME for deterministic build
(("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
(("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
,#~(list "allall"
"WITH_TBB=1"
(string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda _
;; This "extended character" is not considered valid.
(substitute* "processor_support.h"
(("“") "\"")
(("”") "\""))))
(replace 'check
(lambda _
(invoke "perl"
"scripts/test/simple_tests.pl"
"--bowtie2=./bowtie2"
"--bowtie2-build=./bowtie2-build"))))))
(list
#:make-flags
#~(list "allall"
"WITH_TBB=1"
(string-append "prefix=" #$output)
(string-append "CC=" #$(cc-for-target)))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-prefix
(lambda _
(substitute* "Makefile"
(("/usr/local") #$output))))
(replace 'configure
(lambda _
;; This "extended character" is not considered valid.
(substitute* "processor_support.h"
(("“") "\"")
(("”") "\""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "perl"
"scripts/test/simple_tests.pl"
"--bowtie2=./bowtie2"
"--bowtie2-build=./bowtie2-build")))))))
(inputs
`(("tbb" ,tbb-2020)
("zlib" ,zlib)
("python" ,python-wrapper)))
(list onetbb zlib))
(native-inputs
(list perl perl-clone perl-test-deep perl-test-simple))
(list perl
perl-clone
perl-file-which
perl-test-deep
perl-test-simple
python-wrapper
which))
(home-page "https://bowtie-bio.sourceforge.net/bowtie2/index.shtml")
(synopsis "Fast and sensitive nucleotide sequence read aligner")
(description
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1814,7 +1814,7 @@ for creation and reading of DigiDoc files.")
(define-public osslsigncode
(package
(name "osslsigncode")
(version "2.10")
(version "2.11")
(source
(origin
(method git-fetch)
@@ -1823,7 +1823,7 @@ for creation and reading of DigiDoc files.")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1fizcrcgavw5zkzws62pgz8ly5jnmrpv33whryabqgg9q5fwsf2j"))))
(base32 "17vzkrv4qzjrjinjlgk8fbimkzd5b5akkpangkpn8cdficxgibxr"))))
(build-system cmake-build-system)
(arguments
(list
+2 -2
View File
@@ -852,7 +852,7 @@ Extensions} (DNSSEC).")
(define-public knot
(package
(name "knot")
(version "3.5.2")
(version "3.5.3")
(source
(origin
(method git-fetch)
@@ -861,7 +861,7 @@ Extensions} (DNSSEC).")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0z1h22qjhjvjlli66nq3bl5nskdid6g86jk7v37y02vwy5xq93rm"))
(base32 "19nasxzkv805am7skkzs0vnqxjrdc4dqm67crdgqj36jli24zs3s"))
(patches
(search-patches "knot-remove-runtime-deps.patch"))
(modules '((guix build utils)))
+61
View File
@@ -438,6 +438,51 @@ hardware designs in Verilog.")
(home-page "https://github.com/ZipCPU/zipcpu/")
(license license:lgpl3+))))
(define-public gdstk
(package
(name "gdstk")
(version "0.9.62")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/heitzmann/gdstk")
(commit (string-append "v" version))))
(sha256
(base32 "0q07g7h613yqszgs49vbnran3pz6yayc0hyisdnp4fi60cyzsz1l"))
(file-name (git-file-name name version))
(snippet '(begin
;; This snippet is also inherited by python-gdstk.
(use-modules (guix build utils))
;; Disable 'external' source code directory.
(substitute* "CMakeLists.txt"
(("add_subdirectory\\(external\\)")
""))
(delete-file-recursively "external")
(substitute* "src/CMakeLists.txt"
(("clipper)")
"polyclipping)"))
(substitute* "src/clipper_tools.cpp"
(("clipper/")
"polyclipping/"))))))
(build-system cmake-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'build-examples
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "make" "examples")))))))
(inputs (list clipper qhull zlib))
(home-page "https://heitzmann.github.io/gdstk/")
(synopsis "Library for creation and manipulation of GDSII files")
(description
"@code{gdstk} is a library for creation and manipulation of GDSII
layout files which are commonly used for
@acronym{EDA, elecronic design automation} and chip design.")
(license license:boost1.0)))
(define-public gerbv
(package
(name "gerbv")
@@ -2129,6 +2174,22 @@ programming language, as well as evaluation board definitions and a System on
Chip toolkit.")
(license license:bsd-3)))
(define-public python-gdstk
(package
(inherit gdstk)
(name "python-gdstk")
(build-system pyproject-build-system)
(arguments (list #:test-flags #~(list ".")))
(native-inputs (list cmake-minimal python-pytest python-minimal-wrapper
python-scikit-build-core))
(inputs (modify-inputs (package-inputs gdstk)
(prepend python-numpy)))
(synopsis "Python module for creation and manipulation of GDSII files")
(description
"@code{python-gdstk} is a Python library for creation
and manipulation of GDSII layout files which are commonly used
for @acronym{EDA, elecronic design automation} and chip design.")))
(define-public python-klayout
(package
(name "python-klayout")
+30 -27
View File
@@ -6627,7 +6627,7 @@ bibliographic references.")
(define-public emacs-corfu
(package
(name "emacs-corfu")
(version "2.7")
(version "2.8")
(source
(origin
(method git-fetch)
@@ -6636,7 +6636,7 @@ bibliographic references.")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1x4jaf234x3scq7lq43pgnyn3qz3p441nc5whx4azb2v4chmrpym"))))
(base32 "0aliis64ifr17xyig99gbh0xczdkdlb4snq5pbrlnrjhzk1cksy4"))))
(build-system emacs-build-system)
(arguments
(list
@@ -6715,7 +6715,7 @@ be regarded as @code{emacs-company-quickhelp} for @code{emacs-corfu}.")
(define-public emacs-cape
(package
(name "emacs-cape")
(version "2.4")
(version "2.5")
(source
(origin
(method git-fetch)
@@ -6724,7 +6724,7 @@ be regarded as @code{emacs-company-quickhelp} for @code{emacs-corfu}.")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0s2pirvws93nrrfcz1bwzbvmzgd5sv4hrf2012i5ag42c0skdqmh"))))
(base32 "12jk8jjk38mfldsgnimnsggxan5a5amzf2z17pwjq7dxhn87168j"))))
(build-system emacs-build-system)
(arguments
(list
@@ -10899,18 +10899,27 @@ the speedbar window.")
(define-public emacs-shell-maker
(package
(name "emacs-shell-maker")
(version "0.84.7")
(version "0.84.8")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/xenodium/shell-maker")
(commit (string-append "v" version))))
(url "https://github.com/xenodium/shell-maker")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0x10qjhcym4nnv5zh4nwy7d46lp158q06w2iwgi265nl1bz9s7yq"))))
"1knswylikwipg8aqb7dip2jm1l8q3sxj8q0af31ipn92v6wh9bks"))))
(build-system emacs-build-system)
(arguments (list #:tests? #f)) ;no tests
(arguments
(list #:tests? #f ; There are no tests.
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-curl
(lambda* (#:key inputs #:allow-other-keys)
(emacs-substitute-variables "shell-maker.el"
("shell-maker-curl-executable"
(search-input-file inputs "/bin/curl"))))))))
(inputs (list curl))
(home-page "https://github.com/xenodium/shell-maker")
(synopsis "Create Emacs shells")
(description "Shell Maker is a convenience wrapper around Comint mode.")
@@ -15480,7 +15489,7 @@ expansion and overwriting the marked region with a new snippet completion.")
(define-public emacs-marginalia
(package
(name "emacs-marginalia")
(version "2.8")
(version "2.9")
(source
(origin
(method git-fetch)
@@ -15489,7 +15498,7 @@ expansion and overwriting the marked region with a new snippet completion.")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0fni7zs7az5ljpvd7ianbd26h9qwwsmmwwsc0b6l6ahy94sbza6p"))))
(base32 "0l77djsjamfnn8064gb2z9m3wxcyxcfnfyk5sjm8w82hqd73410f"))))
(build-system emacs-build-system)
(arguments
(list
@@ -30169,8 +30178,8 @@ their meaning for the current Emacs major-mode.")
(license license:gpl3+)))
(define-public emacs-org-ref
(let ((commit "732a20bd236fd02db4a651da29f87f87f458a54a")
(revision "0"))
(let ((commit "dc2481d430906fe2552f9318f4405242e6d37396")
(revision "1"))
(package
(name "emacs-org-ref")
(version (git-version "3.1" revision commit))
@@ -30183,22 +30192,15 @@ their meaning for the current Emacs major-mode.")
(file-name (git-file-name name version))
(sha256
(base32
"1kbjxz56fvln6drd2wqdxrpgwjshzpdbyaq7dz0gn285z93y1knk"))))
"0q3fkqzdk52y6cnl5p6igrczr8v9l0jc1rp7pp27isjq8mjyvkgs"))))
(build-system emacs-build-system)
(arguments
(list
#:emacs emacs-no-x ;needs libxml support
#:include #~(cons* "org-ref.org" "org-ref.bib" %default-include)
#:exclude #~(list
;; author doesn't recommend using it
"org-ref-pdf.el")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'skip-failing-test
(lambda _
(substitute* "test/all-org-test.el"
(("\\(ert-deftest preprocess .*" all)
(string-append all
" (skip-unless (libxml-available-p))"))))))))
"org-ref-pdf.el")))
(propagated-inputs
(list emacs-avy
emacs-citeproc
@@ -30209,6 +30211,7 @@ their meaning for the current Emacs major-mode.")
emacs-hydra
emacs-ox-pandoc
emacs-parsebib
emacs-pdf-tools
emacs-request
emacs-s))
(native-inputs (list emacs-ert-runner))
@@ -36542,8 +36545,8 @@ the standard @code{Dockerfile} file format.")
(define-public emacs-lsp-mode
;; Last release is one year old.
;; Latest revision enables support for new lsp spec 3.17 features.
(let ((commit "147233313576c844e2bf56640827b0d0e5c2ee6c")
(revision "0"))
(let ((commit "328c97945c345e32e4b8fd6bb5ccd6bb6c5d462f")
(revision "1"))
(package
(name "emacs-lsp-mode")
(version (git-version "9.0.1" revision commit)) ;taken from lsp-mode.el
@@ -36555,11 +36558,11 @@ the standard @code{Dockerfile} file format.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32 "14317wgi0mrxbcrlgrfqyf80lh86n7x6bv07b43cxl3k4c4fqk0l"))))
(base32 "0dyk685q6z7z4bcb9pnwb045b819j6qkbm0qng4kn677laa51ikn"))))
(build-system emacs-build-system)
(arguments
(list
#:emacs emacs ;need libxml support
#:emacs emacs-no-x ;need libxml support
#:test-command #~(list "ert-runner"
"-L" "."
"-L" "clients"
+3 -3
View File
@@ -1197,7 +1197,7 @@ files mistakenly overwritten or destroyed just a few seconds ago.")
(define-public disorderfs
(package
(name "disorderfs")
(version "0.6.0")
(version "0.6.2")
(source
(origin
(method git-fetch)
@@ -1207,12 +1207,12 @@ files mistakenly overwritten or destroyed just a few seconds ago.")
(file-name (git-file-name name version))
(sha256
(base32
"14x57qnqifx6hal1yb2bnrda9l12z19vhqlq850qax23z362q53q"))))
"03bz03y7dx5hqv1c1vl7l1axzjr86cd2cddl1qkyqf8vsrn4ds6m"))))
(build-system gnu-build-system)
(native-inputs
(list pkg-config))
(inputs
(list fuse-2 attr))
(list fuse-3.18 attr))
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure)) ; no configure script
+40
View File
@@ -42,6 +42,7 @@
;;; Copyright © 2024, 2025 dan <i@dan.games>
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2025 wvlab <me@wvlab.xyz>
;;; Copyright © 2025 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -328,6 +329,45 @@ some of the freedesktop.org specifications.")
will pick hardware planes for these layers if possible.")
(license license:expat)))
(define-public lisgd
(package
(name "lisgd")
(version "0.4.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://git.sr.ht/~mil/lisgd")
(commit version)))
(sha256
(base32
"0rkm6d3jn0i1fwf5qj47hv8w9aax5fijhccnc6f6v59q3aj5jd4n"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
(list
#:tests? #f ; There are no tests.
#:make-flags
#~(list
(string-append "CC=" #$(cc-for-target))
(string-append "PREFIX=" %output)
(string-append "CPPFLAGS="
"-DWITH_WAYLAND "
"-I" #$libinput "/include "
"-I" #$wayland "/include")
(string-append "LDFLAGS="
"-L" #$libinput "/lib "
"-L" #$wayland "/lib"))
#:phases
#~(modify-phases %standard-phases
(delete 'configure)))) ; There is no configure script.
(inputs (list libinput libx11 wayland))
(home-page "https://git.sr.ht/~mil/lisgd")
(synopsis "Bind gestures via libinput touch events")
(description "Bind gestures on touchscreens and unsupported gesture
devices via libinput touch events.")
(license (list license:expat license:x11))))
(define-public malcontent
(package
(name "malcontent")
+17 -2
View File
@@ -4878,7 +4878,7 @@ processes currently causing I/O.")
(define-public iotop
(package
(name "iotop")
(version "1.30")
(version "1.31")
(source
(origin
(method git-fetch)
@@ -4887,7 +4887,7 @@ processes currently causing I/O.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1sijsk13bkrhsc5bc8f5i97a1ayhivak9pfinnyli57dh22w4k1g"))))
(base32 "19ccdiw3flzk7gki90rc1nifmma79g2l87vhls4d2xr4z763m4nc"))))
(build-system gnu-build-system)
(arguments
(list #:make-flags
@@ -4985,6 +4985,21 @@ user-space processes.")
(license (list license:lgpl2.1 ; library
license:gpl2+)))) ; command-line utilities
(define-public fuse-3.18
(package
(inherit fuse)
(name "fuse")
(version "3.18.1")
(source (origin
(method url-fetch)
(uri
(string-append "https://github.com/libfuse/libfuse/releases/"
"download/fuse-" version
"/fuse-" version ".tar.gz"))
(sha256
(base32
"0b1jp5gp2gv40gv6cvmv86rcr4l0mdh050qbvnxl0xcwya45qffx"))))))
(define-public fuse-2
(package
(inherit fuse)
+237 -1
View File
@@ -22,7 +22,7 @@
;;; Copyright © 2023 Valter Nazianzeno <manipuladordedados@gmail.com>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
;;; Copyright © 2024 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
;;; Copyright © 2024 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2024, 2026 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2025 Zheng Junjie <z572@z572.online>
;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se>
;;;
@@ -72,6 +72,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages m4)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ninja)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages rdf)
@@ -395,6 +396,241 @@ directory structure and file attributes.")
(define-public lua5.2-filesystem
(make-lua-filesystem "lua5.2-filesystem" lua-5.2))
(define-public lua-bee
;; There are no releases; use the commit known to work with the packaged
;; luamake.
(let ((commit "fe3feb2b62e8f0179dad5abb438ed4df39f675d4")
(revision "0"))
(package
(name "lua-bee")
(version (git-version "0.0.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/actboy168/bee.lua/")
(commit commit)
;; Requires a few git submodules such as the Lua
;; sources to patch and a few source libraries.
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
(base32
"1iv4cdkgcs123zw67ngq4jfbp7p7hkmj8zg2lbblipmm0hivhbd2"))))
(build-system gnu-build-system)
(arguments
(list
;; TODO: Re-enable the tests after luamake can use a newer bee commit
;; (see:
;; <https://github.com/actboy168/bee.lua/commit/679c566f0f26bcf0c19e37066e678993122e1f34>).
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'build
(lambda* (#:key parallel-build? #:allow-other-keys)
(invoke "luamake"
"-EXE" "lua"
"-notest"
"-j" (if parallel-build?
(number->string (parallel-job-count))
"1")
"-v")))
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(when tests?
(invoke "luamake"
"-EXE" "lua"
"-j" (if parallel-tests?
(number->string (parallel-job-count))
"1")
"test" "-v"))))
(replace 'install
(lambda _
(install-file "build/bin/lua"
(string-append #$output "/bin"))
(install-file "build/bin/bee.so"
(string-append #$output "/lib/")))))))
(native-inputs (list luamake))
(home-page "https://github.com/actboy168/bee.lua/")
(synopsis "Lua runtime with a few extra features")
(description "The Bee Lua runtime implements a few extra features
such as:
@itemize
@item Deterministic tables traversal
@item Enable @code{lua_assert} in debug mode
@item Add error hook (for debugger)
@item Add resume/yield hook (for debugger)
@item Disable tail calls in debug mode (for debugger)
@end itemize")
(license license:expat))))
(define-public luamake
(package
(name "luamake")
(version "1.7")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/actboy168/luamake")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"075sp8dpcb81kwrpp843f1y00kvaqan09np6spf6b72z5dhf6aiw"))))
(build-system gnu-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'copy-lua-bee-sources
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(copy-recursively (dirname
(search-input-directory
(or native-inputs inputs) "bee"))
"bee.lua")))
(add-after 'unpack 'patch-commands
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "scripts/action.lua"
(("\"ninja\"")
(format #f "~s" (search-input-file inputs "bin/ninja"))))))
(delete 'configure)
(replace 'build
(lambda* (#:key parallel-build? #:allow-other-keys)
(invoke "compile/build.sh" "-j"
(if parallel-build?
(number->string (parallel-job-count))
"1")
"notest" "-v")))
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(when tests?
(invoke "compile/build.sh" "-j"
(if parallel-tests?
(number->string (parallel-job-count))
"1")
"test" "-v"))))
(replace 'install
(lambda _
(let ((bin (string-append #$output "/bin"))
(lib (string-append #$output "/lib/luamake")))
(install-file "luamake" lib)
(install-file "main.lua" lib)
(copy-recursively "scripts"
(string-append lib "/scripts"))
(copy-recursively "tools"
(string-append lib "/tools"))
(mkdir bin)
(symlink (string-append lib "/luamake")
(string-append bin "/luamake"))))))))
(native-inputs (list (package-source lua-bee)
ninja))
(inputs (list ninja))
(home-page "https://github.com/actboy168/luamake")
(synopsis "Make-inspired configuration and build system")
(description "Luamake is a platform independent configuration and
build system that uses the standard Lua command-line interpreter.")
(license license:expat)))
(define-public lua-language-server
(package
(name "lua-language-server")
(version "3.16.4")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/LuaLS/lua-language-server")
(commit version)
;; There are quite a few bundled Lua libraries under the
;; '3rd' and 'meta/3rd' directories; most are currently
;; not packaged in Guix, and they all track exact
;; commits, so it would be annoying to maintain them as
;; separate origins (on top of having to patch the build
;; system to unbundle them).
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
(base32
"0kbbwz9cjw9b8sii2hki51s968n551r8z46h9gp9bd2m3g3l1l75"))))
(build-system gnu-build-system)
(arguments
(list
;; The test suite currently fails with luamake apparently attempting to
;; find the bee.so shared object (see:
;; <https://github.com/LuaLS/lua-language-server/issues/3325>).
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'build
(lambda* (#:key parallel-build? #:allow-other-keys)
(invoke "luamake"
"-notest"
"-j" (if parallel-build?
(number->string (parallel-job-count))
"1")
"-v")))
(replace 'check
(lambda* (#:key parallel-tests? tests? #:allow-other-keys)
(when tests?
(invoke "luamake"
"-j" (if parallel-tests?
(number->string (parallel-job-count))
"1")
"test" "-v"))))
(replace 'install
;; This is inspired by the package definition in Slackware.
(lambda* (#:key inputs #:allow-other-keys)
(let* ((bin (string-append #$output "/bin"))
(lib (string-append #$output
"/libexec/lua-language-server"))
(lib/bin (string-append lib "/bin")))
;; XXX: The binary expects some odd layout to find its resources,
;; hence the bin subdirectory under libexec.
(mkdir-p lib)
(for-each (lambda (x)
(copy-recursively x (string-append lib "/" x)))
(list "bin"
"debugger.lua"
"locale"
"main.lua"
"meta"
"script"))
;; Create a custom wrapper, adjusted to log elsewhere than in
;; its read-only location under the store.
(mkdir bin)
(call-with-output-file (string-append bin "/lua-language-server")
(lambda (p)
(format p "#!~a
exec ~a --logpath=\"/tmp/runtime-$USER/lua-language-server/log\" \
--metapath=\"/tmp/runtime-$USER/lua-language-server/meta\" \"$@\""
(search-input-file inputs "bin/sh")
(string-append lib/bin
"/lua-language-server"))))
(chmod (string-append bin "/lua-language-server") #o755)))))))
(native-inputs (list luamake))
(inputs (list bash-minimal)) ;for the wrapper
(home-page "https://github.com/LuaLS/lua-language-server")
(synopsis "Lua language server")
(description "The Lua language server provides various language
features for Lua to make development easier and faster, including:
@itemize
@item Support for all recent versions of Lua, including LuaJIT
@item Jump to definition
@item Dynamic type checking
@item Find references
@item Diagnostics/Warnings
@item Syntax checking
@item Element renaming
@item Hover to view details on variables, functions, and more
@item Auto-completion
@item Support for libraries
@item Code formatting
@item Spell checking
@item Custom plugins
@item Documentation generation
@end itemize")
(license license:expat)))
(define (make-lua-ossl name lua)
(package
(name name)
+7 -7
View File
@@ -2594,15 +2594,15 @@ to return meaningful clusters (if there are any).")
(define-public python-pynndescent
(package
(name "python-pynndescent")
(version "0.5.13")
(version "0.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pynndescent" version))
(sha256
(base32 "1yq0k15964klz7135gpa7rcpixywzs4zxmcp8p4fw7haxv058hnp"))))
(base32 "1x94mjdf62f2yqql50qn0qjh4bkhwdvx7xx9aph421s0bgxy1zbz"))))
(build-system pyproject-build-system)
(native-inputs (list python-pytest python-setuptools python-wheel))
(native-inputs (list python-pytest python-setuptools))
(propagated-inputs (list python-importlib-metadata
python-joblib
python-llvmlite
@@ -6332,13 +6332,13 @@ linear algebra routines needed for structured matrices (or operators).")
(define-public python-gpytorch
(package
(name "python-gpytorch")
(version "1.14.2")
(version "1.15.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "gpytorch" version))
(sha256
(base32
"1c30348kjawg0cl522qvbljg6adyy5bcpmqdg4mh09zk8r8z0hla"))))
"1y8p1mpn00jjimszljmyczcg4bxcvd1n1czihnbykhy4qm74vn3n"))))
(build-system pyproject-build-system)
(arguments
(list #:test-flags
@@ -6368,7 +6368,7 @@ linear algebra routines needed for structured matrices (or operators).")
(define-public python-botorch
(package
(name "python-botorch")
(version "0.16.0")
(version "0.16.1")
(source (origin
(method git-fetch) ;no tests in PyPI
(uri (git-reference
@@ -6377,7 +6377,7 @@ linear algebra routines needed for structured matrices (or operators).")
(file-name (git-file-name name version))
(sha256
(base32
"1bk7ks2g0qfrjsi4vqy72jkc6pr0pcqq4k5z6dmqqs0ajxc2d5sy"))))
"0md7y9nvnnjirky58qpcr127klqqlcc8srbppvqmbphsak1qvngj"))))
(build-system pyproject-build-system)
(arguments
;; 7 failed, 1502 passed, 1 skipped, 1 deselected, 807 warnings
+5 -7
View File
@@ -3094,16 +3094,14 @@ converts them to maildir format directories.")
(define-public mblaze
(package
(name "mblaze")
(version "1.2")
(version "1.4")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/leahneukirchen/mblaze")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(method url-fetch)
(uri (string-append "https://leahneukirchen.org/releases/"
name "-" version ".tar.gz"))
(sha256
(base32 "0fa8s9dp5ilwmfcwkx72x2b5i0maa5sl97hv2cdknqmc27gv0b1c"))))
(base32 "06x4k1zvhzzk9gwz84hp2c5ijrxf0w54lgwcsgin66g3z6rz5dkv"))))
(outputs '("out" "contrib"))
(build-system gnu-build-system)
(inputs (list bash-minimal
+50 -21
View File
@@ -11277,7 +11277,7 @@ architecture.")
(define-public python-mathics-scanner
(package
(name "python-mathics-scanner")
(version "1.4.1")
(version "2.0.0")
(source
(origin
(method git-fetch)
@@ -11287,7 +11287,7 @@ architecture.")
(file-name (git-file-name name version))
(sha256
(base32
"0y34kzqha5wp6n8cyvhhz47mq33x9kwi8ibj67q6pf08qslg154n"))))
"1illmj40rynrhqwr5sfh2mkj2wnpvaqrmvlh56h7za3d823pf5jz"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -11299,15 +11299,18 @@ architecture.")
(substitute* "mathics_scanner/version.py"
(("__version__=\"[^\"]*\"")
(string-append "__version__=\"" #$version "\"")))
;; Generate JSON character/operator tables (character-tables.json,
;; operators.json) which are pre-generated in the PyPI tarball
;; but not in git. The Makefile runs this script before
;; 'make dist'. Unlike in mathics-core, running the script here
;; works because it writes to its own source tree being built;
;; in mathics-core, the script tries to write to the installed
;; python-mathics-scanner package which is not allowed.
(invoke "bash" "./admin-tools/make-JSON-tables.sh")
;; Missing installation of "operators.yml".
(substitute* "pyproject.toml"
(("\"data/named-characters.yml\",")
"\"data/named-characters.yml\", \"data/operators.yml\","))
;; Would cause a crash at runtime every time you select
;; anything when running build_tables.py .
(substitute* "mathics_scanner/generate/build_tables.py"
(("\"operator-to-amslatex\",") "")))))))
"\"data/named-characters.yml\", \"data/operators.yml\",")))))))
(propagated-inputs (list python-chardet python-click python-pyyaml))
(native-inputs (list python-pytest python-setuptools python-wheel))
(home-page "https://mathics.org/")
@@ -11343,7 +11346,7 @@ the Wolfram language.")
(define-public python-mathics-core
(package
(name "python-mathics-core")
(version "8.0.1")
(version "9.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -11352,18 +11355,15 @@ the Wolfram language.")
(file-name (git-file-name name version))
(sha256
(base32
"1ikgw3w3silxisih92g1wgcwb37k7qkwfmdv5r6yy4ki74qvyk5q"))))
"19232vs3sxg1nq32cas8hwsiwvp6nzpnz4jzjjahpvrv1bl62prs"))))
(arguments
`(;; <https://github.com/pytest-dev/pytest/pull/10173> is missing .closed
#:tests? #f ;TODO: update package
#:test-flags '("-s")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-bugs
(lambda _
(substitute* "pyproject.toml"
(("\"data/*.json\",")
"\"data/*.json\", \"data/operator-tables.json\",")
(("\"autoload/\\*.m\",")
;; They forgot to install autoload/rules/*.m
"\"autoload/*.m\", \"autoload/rules/*.m\","))
@@ -11371,9 +11371,33 @@ the Wolfram language.")
(substitute* "mathics/builtin/files_io/files.py"
(("https://raw.githubusercontent.com/Mathics3/mathics-core/master/README.rst")
(string-append (getcwd) "/README.rst")))
;; setup.py has some weird acrobatics that cannot work right.
(invoke "mathics3-generate-operator-json-table" "-o"
"mathics/data/operator-tables.json")))
;; llvmlite 0.45+ auto-initializes LLVM; calling initialize()
;; now raises RuntimeError.
;; <https://llvmlite.readthedocs.io/en/v0.45.0/user-guide/binding/initialization-finalization.html>
(substitute* "mathics/compile/compile.py"
(("llvm\\.initialize\\(\\)") "pass"))
;; The JSON operator tables (op-tables.json, operator-tables.json)
;; are pre-generated in the PyPI tarball but not in git.
;; The Makefile runs admin-tools/make-JSON-tables.sh before
;; 'make dist', but that script also writes to the scanner's
;; default location which is read-only in the store. Run the
;; needed commands directly. setup.py has fallback generation
;; code but it's buggy: it writes operator-tables.json to the
;; wrong path and op-tables.json is missing
;; --field=operator-to-amslatex. Creating the files first
;; makes setup.py's 'if not os.path.exists' checks pass and
;; the buggy code is skipped.
(with-directory-excursion "mathics/data"
(invoke "mathics3-generate-json-table"
"--field=ascii-operator-to-symbol"
"--field=ascii-operator-to-unicode"
"--field=ascii-operator-to-wl-unicode"
"--field=operator-to-ascii"
"--field=operator-to-amslatex"
"--field=operator-to-unicode"
"-o" "op-tables.json")
(invoke "mathics3-generate-operator-json-table"
"-o" "operator-tables.json"))))
(add-before 'check 'prepare-check
(lambda* (#:key inputs outputs #:allow-other-keys)
;(copy-file "operator-tables.json" "mathics/data/operator-tables.json")
@@ -11383,7 +11407,12 @@ the Wolfram language.")
(lambda _
;; Otherwise 210 tests fail because the real output would use
;; unicode arrow characters. With this, only 18 (symbolic) tests fail.
(setenv "MATHICS_CHARACTER_ENCODING" "ASCII"))))))
(setenv "MATHICS_CHARACTER_ENCODING" "ASCII")))
(add-before 'check 'set-home
(lambda _
;; The sanity check imports mathics which tries to create a
;; config directory in HOME. Set HOME to a writable location.
(setenv "HOME" "/tmp"))))))
(build-system pyproject-build-system)
(native-inputs (list python-pytest python-setuptools python-wheel))
(inputs (list llvm))
@@ -11409,13 +11438,13 @@ to Wolfram.")
(define-public python-mathicsscript
(package
(name "python-mathicsscript")
(version "8.0.0")
(version "9.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mathicsscript" version))
(sha256
(base32 "12si397b9ap5ibvbap72bvkmssh8hdap8jbmdmhsj1qdb1axrac4"))))
(base32 "0pamvbmm8ichxapblfck913frdmr82vmb0s2jbiiy7iil5bzn59i"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
@@ -11443,13 +11472,13 @@ Mathics3.")
(define-public python-mathics-django
(package
(name "python-mathics-django")
(version "8.0.1")
(version "9.0.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Mathics_Django" version))
(uri (pypi-uri "mathics_django" version))
(sha256
(base32 "1cwvm72w6c3vz49gj09ihiwicj291ia51xhkxgi9z88a9vszx5pq"))))
(base32 "1lnqqi3ssr2xdss66asvd02b13igy75264yir0w1v6d1gznn93j5"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
+1529 -21
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
This is part 2 of the diff between Ekaitz's branch and upstream's releases/gcc-4.6.4 branch.
It only contains the libstdc++ diff.
diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h
index 3199bf30bb3..b8d7c16361e 100644
--- a/libstdc++-v3/config/os/generic/os_defines.h
+++ b/libstdc++-v3/config/os/generic/os_defines.h
@@ -33,4 +33,9 @@
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+// Disable the weak reference logic in gthr.h for os/generic because it
+// is broken on every platform unless there is implementation specific
+// workaround in gthr-posix.h and at link-time for static linking.
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
+
#endif
diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index e29404c026f..5bbeb7f3763 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -236,6 +236,9 @@ case "${host_os}" in
freebsd*)
os_include_dir="os/bsd/freebsd"
;;
+ linux-musl*)
+ os_include_dir="os/generic"
+ ;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
if [ "$uclibc" = "yes" ]; then
os_include_dir="os/uclibc"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,69 @@
Upstream-status: <https://github.com/chayleaf/mitm-cache/pull/5>
diff --git a/src/main.rs b/src/main.rs
index d9f760f..215ed89 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,6 @@
use base64::Engine;
use clap::{Parser, Subcommand};
+use futures_util::StreamExt;
use http_body_util::BodyExt;
use hudsucker::{
certificate_authority::RcgenAuthority,
@@ -11,6 +12,7 @@ use hudsucker::{
tokio_tungstenite::tungstenite::http::uri::Scheme,
Body, HttpContext, HttpHandler, Proxy, RequestOrResponse,
};
+use hyper::Method;
use hyper::{StatusCode, Uri};
use hyper_rustls::{HttpsConnector, HttpsConnectorBuilder};
use hyper_util::{
@@ -137,11 +139,15 @@ impl HttpHandler for Handler {
"GET" | "POST" | "HEAD" => {
let original_url = req.uri().clone();
println!("{req:?}");
- let Ok(req) = decode_request(req) else {
+ let Ok(mut req) = decode_request(req) else {
let mut res = Response::new("not found".into());
*res.status_mut() = StatusCode::NOT_FOUND;
return res.into();
};
+ let is_head_request = req.method() == "HEAD";
+ if is_head_request {
+ *req.method_mut() = Method::GET;
+ }
let (info, body) = req.into_parts();
let Ok(req_body) = body.collect().await.map(|x| x.to_bytes())
else {
@@ -165,7 +171,7 @@ impl HttpHandler for Handler {
req_body
)])),
);
- let store_body_info = req.method() != "HEAD";
+ let store_body_info = true;
let url = process_uri(original_url);
if matches!(forget_regex, Some(x) if x.is_match(&url.to_string())) {
forget = true;
@@ -307,7 +313,20 @@ impl HttpHandler for Handler {
}
}
});
- Response::from_parts(info, ret_body)
+ if is_head_request {
+ // For HEAD requests, drain the channel
+ // output; otherwise rx will be dropped,
+ // which closes the channel and causes
+ // the tx.poll_ready call above to
+ // return an error
+ let mut stream = ret_body.into_data_stream();
+ while let Some(_) = stream.next().await {
+ // do nothing
+ }
+ Response::from_parts(info, Body::empty())
+ } else {
+ Response::from_parts(info, ret_body)
+ }
} else {
// remove hash headers to force the software to download this
// so we get sha256
+14 -39
View File
@@ -1,46 +1,21 @@
Allow a QEMU host to set the time and shutdown Guix guests. Styled
after the patch from the Nix package:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 6e3c15f539..eaef900b6e 100644
index 837be51c40..d0d4d99b5e 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -216,6 +216,7 @@ out:
@@ -216,9 +216,9 @@ out:
return retcode;
}
-#define POWEROFF_CMD_PATH "/sbin/poweroff"
-#define HALT_CMD_PATH "/sbin/halt"
-#define REBOOT_CMD_PATH "/sbin/reboot"
+#define POWEROFF_CMD_PATH "/run/current-system/profile/sbin/shutdown"
+#define HALT_CMD_PATH "/run/current-system/profile/sbin/halt"
+#define REBOOT_CMD_PATH "/run/current-system/profile/sbin/reboot"
void qmp_guest_shutdown(const char *mode, Error **errp)
{
const char *shutdown_flag;
+ const char *command;
Error *local_err = NULL;
#ifdef CONFIG_SOLARIS
@@ -235,16 +236,24 @@ void qmp_guest_shutdown(const char *mode, Error **errp)
slog("guest-shutdown called, mode: %s", mode);
if (!mode || strcmp(mode, "powerdown") == 0) {
shutdown_flag = powerdown_flag;
+ command = "shutdown";
} else if (strcmp(mode, "halt") == 0) {
shutdown_flag = halt_flag;
+ command = "halt";
} else if (strcmp(mode, "reboot") == 0) {
shutdown_flag = reboot_flag;
+ command = "reboot";
} else {
error_setg(errp,
"mode is invalid (valid values are: halt|powerdown|reboot");
return;
}
+ /* Try Guixs shutdown/halt/reboot first. */
+ char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command);
+ execl(path, command, (char *) NULL);
+ g_free(path);
+
const char *argv[] = {"/sbin/shutdown",
#ifdef CONFIG_SOLARIS
shutdown_flag, "-g0", "-y",
@@ -269,7 +278,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
@@ -295,7 +295,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
int ret;
Error *local_err = NULL;
struct timeval tv;
@@ -49,7 +24,7 @@ index 6e3c15f539..eaef900b6e 100644
/* If user has passed a time, validate and set it. */
if (has_time) {
@@ -302,6 +311,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
@@ -328,6 +328,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
* hardware clock (RTC). */
ga_run_command(argv, NULL, "set hardware clock to system time",
&local_err);
@@ -5,8 +5,8 @@ There were some discussion in <https://gitlab.com/qemu-project/qemu/-/issues/162
diff --git a/tests/functional/test_virtio_version.py b/tests/functional/test_virtio_version.py
index a5ea73237f..501545f655 100755
--- a/tests/functional/test_virtio_version.py
+++ b/tests/functional/test_virtio_version.py
--- a/tests/functional/x86_64/test_virtio_version.py
+++ b/tests/functional/x86_64/test_virtio_version.py
@@ -10,6 +10,8 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
+11 -2
View File
@@ -14,7 +14,7 @@
;;; Copyright © 2015, 2016, 2017, 2019, 2022 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2015-2025 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015-2026 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
@@ -5309,7 +5309,7 @@ concepts.")
(define-public python-hdf5storage
;; XXX: Use the latest commit containing compatability with Pytest and Python
;; 3.11, see: <https://github.com/frejanordsiek/hdf5storage/issues/135>.
;;
;;
;; This package probably is sun setting, consider to remove when stops
;; building, see: <https://github.com/frejanordsiek/hdf5storage/issues/136>.
(let ((commit "7ee2a96de134b44beaa79c3a11c559f9ac87c5a6")
@@ -11033,6 +11033,15 @@ writing C extensions for Python as easy as Python itself.")
;; Relay on python from the PATH instead of full reference
;; stored in built wheel.
(("'py.full_path\\(\\)'") "'python'"))))
;; This isn't architecture specific.
;; TODO: Remove this conditional and apply for all builds.
#$@(if (target-ppc64le?)
#~((add-after 'unpack 'patch-bin-true
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "numpy/_core/tests/test_cpu_features.py"
(("/bin/true")
(search-input-file inputs "bin/true"))))))
#~())
(add-before 'build 'parallelize-build
(lambda _
(setenv "OMP_NUM_THREAD"
+2 -1
View File
@@ -1976,7 +1976,8 @@ specified image or color, easing the process of theme creation.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "0hbjzf3jb8gpisq3qi5z7wc20hawcgvjwnw2xp80bwq1cj12d3vr"))))
(base32 "0hbjzf3jb8gpisq3qi5z7wc20hawcgvjwnw2xp80bwq1cj12d3vr"))
(patches (search-patches "mitm-cache-head-requests.patch"))))
(build-system cargo-build-system)
(arguments
'(#:install-source? #f))
-3
View File
@@ -2024,9 +2024,6 @@ ar = \"" (search-input-file inputs (string-append "/bin/" #$(ar-for-target targe
(package-propagated-inputs base-rust)))
(native-inputs
(modify-inputs (package-native-inputs base-rust)
;; Build with the same version as the cross-gcc version.
;; TODO: Remove this when gcc and %xgcc are the same version again.
(prepend gcc-14)
(prepend (cross-gcc target
#:libc (cross-libc target)))
(prepend (if (target-mingw? target)
+24 -35
View File
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023, 2024 Andy Tai <atai@atai.org>
;;; Copyright © 2025, 2026 Cayetano Santos <csantosb@inventati.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -51,57 +52,45 @@
(base32
"0sv5f366ybzpsdpka0fb578pb4q3537h6hkn825m0kbssh32wxk7"))))
(build-system cmake-build-system)
;; Sync with llvm-for-rocm llvm release.
(native-inputs (list clang-19 lld-19 python-minimal))
;; Sync with llvm version used by llvm-rocm.
(native-inputs (list clang-20 lld-20 python-minimal))
(inputs
(list boost
libffi
numactl
rocm-opencl-runtime
rocm-device-libs
rocm-hip-runtime
rocr-runtime
spirv-headers
spirv-tools))
(arguments
(list
#:configure-flags
#~(list
"-DACPP_COMPILER_FEATURE_PROFILE=full"
(string-append "-DCMAKE_EXE_LINKER_FLAGS=" "-Wl,-rpath="
#$output "/lib,-rpath="
#$output "/lib/hipSYCL/llvm-to-backend")
(string-append
"-DACPP_LLD_PATH=" (search-input-file %build-inputs "/bin/ld.lld")))
#:phases
#~(modify-phases %standard-phases
;; FIXME: There is probably a much better way.
;; This file: bin/hipSYCL/llvm-to-backend/llvm-to-host-tool
;; requires libacpp-common.so and libllvm-to-{backend,host}.so
;; in RUNPATH
(add-before 'validate-runpath 'create-symlinks
(lambda _
(symlink
(string-append #$output "/lib/libacpp-common.so")
(string-append
#$output
"/bin/hipSYCL/llvm-to-backend/libacpp-common.so"))
(symlink
(string-append
#$output
"/lib/hipSYCL/llvm-to-backend/libllvm-to-backend.so")
(string-append
#$output
"/bin/hipSYCL/llvm-to-backend/libllvm-to-backend.so"))
(symlink
(string-append
#$output
"/lib/hipSYCL/llvm-to-backend/libllvm-to-host.so")
(string-append
#$output
"/bin/hipSYCL/llvm-to-backend/libllvm-to-host.so")))))
"-DACPP_LLD_PATH=" (search-input-file %build-inputs "/bin/ld.lld"))
"-DWITH_ROCM_BACKEND=ON"
(string-append
"-DROCM_PATH=" #$(this-package-input "rocm-device-libs"))
(string-append
"-DROCM_DEVICE_LIBS_PATH=" #$(this-package-input "rocm-device-libs")
"/amdgcn/bitcode"))
#:tests? #f)) ; no tests
(home-page "https://adaptivecpp.github.io/")
(synopsis
"Implementation of the SYCL programming language for accelerators")
"Compiler for multiple programming models for CPUs and GPUs")
(description
"AdaptiveCpp is aImplementation of SYCL and C++ standard parallelism
for CPUs and GPUs from all vendors, with independent, community-driven
compiler for C++-based heterogeneous programming models")
"AdaptiveCpp is a community-driven compiler for C++-based heterogeneous
programming models. It implements SYCL, C++ standard parallelism, and
HIP/CUDA, targeting CPUs and GPUs from all major vendors. AdaptiveCpp lets
applications adapt themselves to all the hardware found in the system. This
includes use cases where a single binary needs to be able to target all
supported hardware, or utilize hardware from different vendors
simultaneously.")
(license license:bsd-2)))
(define-deprecated-package opensycl
+3 -3
View File
@@ -15,7 +15,7 @@
;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020-2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020-2026 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
;;; Copyright © 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com>
@@ -201,14 +201,14 @@
;; Do not forget to update the various firmware used by QEMU, and sync the
;; configuration options used by the seabios-qemu package with those
;; provided by QEMU.
(version "10.1.0")
(version "10.2.0")
(source
(origin
(method url-fetch)
(uri (string-append "https://download.qemu.org/qemu-"
version ".tar.xz"))
(sha256
(base32 "0ldyh3qia7zwv0xq6f67cp567i6ma1hb11gsqaz3x9qcnm4p6lg0"))
(base32 "0fl8hlkngmm61h65822xxb6cyfbz56mx30hm01il8ywzicdssc4y"))
(patches (search-patches "qemu-build-info-manual.patch"
"qemu-fix-agent-paths.patch"
"qemu-fix-test-virtio-version.patch"))
+21
View File
@@ -1937,6 +1937,27 @@ night to daytime temperature to allow your eyes to slowly adapt. At night the
color temperature should be set to match the lamps in your room.")
(license license:gpl3+)))
(define-public wayout
(package
(name "wayout")
(version "0.1.5")
(home-page "https://git.sr.ht/~proycon/wayout")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page) (commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"1i7bab1dcdyybwarhy44xawb6661zv4z8rfdicjyljg320vj79a2"))))
(build-system meson-build-system)
(native-inputs (list cmake-minimal pkg-config scdoc))
(inputs (list cairo pango wayland wayland-protocols))
(synopsis "Output simple text to a wayland desktop widget")
(description
"Wayout takes text from standard input and outputs it to a desktop-widget
on Wayland desktops.")
(license license:gpl3+)))
(define-public redshift-wayland
(let ((commit "7da875d34854a6a34612d5ce4bd8718c32bec804")
(revision "1"))
+73
View File
@@ -70,6 +70,17 @@
dropbear-service-type
dropbear-service ; deprecated
endlessh-configuration
endlessh-configuration?
endlessh-configuration-endlessh
endlessh-configuration-port-number
endlessh-configuration-log-level
endlessh-configuration-syslog-output?
endlessh-configuration-message-delay
endlessh-configuration-max-banner-length
endlessh-configuration-max-clients
endlessh-service-type
autossh-configuration
autossh-configuration?
autossh-service-type
@@ -523,6 +534,68 @@ daemon} with the given @var{config}, a @code{<dropbear-configuration>}
object."
(service dropbear-service-type config))
;;;
;;; Endlessh.
;;;
(define-record-type* <endlessh-configuration>
endlessh-configuration make-endlessh-configuration
endlessh-configuration?
(endlessh endlessh-configuration-endlessh
(default endlessh))
(port-number endlessh-configuration-port-number
(default 22))
(log-level endlessh-configuration-log-level
(default 1))
(syslog-output? endlessh-configuration-syslog-output?
(default #t))
(message-delay endlessh-configuration-message-delay
(default 10000))
(max-banner-length endlessh-configuration-max-banner-length
(default 32))
(max-clients endlessh-configuration-max-clients
(default 4096)))
(define (endlessh-shepherd-service config)
"Return a <shepherd-service> for endlessh with CONFIG."
(define endlessh
(endlessh-configuration-endlessh config))
(define endlessh-config
(format #f "Port ~a~%Delay ~a~%MaxLineLength ~a~%MaxClients ~a~%LogLevel ~a"
(endlessh-configuration-port-number config)
(endlessh-configuration-message-delay config)
(endlessh-configuration-max-banner-length config)
(endlessh-configuration-max-clients config)
(endlessh-configuration-log-level config)))
(define endlessh-command
#~(list (string-append #$endlessh "/bin/endlessh")
"-f" #$(plain-file "endlessh_config" endlessh-config)
#$@(if (endlessh-configuration-syslog-output? config) '("-s") '())))
(define requires
(if (endlessh-configuration-syslog-output? config)
'(user-processes networking syslogd)
'(user-processes networking)))
(list (shepherd-service
(documentation "EndleSSH server.")
(requirement requires)
(provision '(endlessh))
(start #~(make-forkexec-constructor #$endlessh-command))
(stop #~(make-kill-destructor)))))
(define endlessh-service-type
(service-type (name 'endlessh)
(description
"Run the EndleSSH secure shell (SSH) tarpit.")
(extensions
(list (service-extension shepherd-root-service-type
endlessh-shepherd-service)))
(default-value (endlessh-configuration))))
;;;
;;; AutoSSH.
+5 -1
View File
@@ -45,7 +45,11 @@
#:export (system-container
containerized-operating-system
container-script
eval/container))
eval/container)
;; Re-export some variables from (guix build linux-container), for
;; convenience.
#:re-export (%namespaces
%writable-/tmp))
(define* (container-essential-services os #:key shared-network?)
"Return a list of essential services corresponding to OS, a
+3 -2
View File
@@ -22,6 +22,7 @@
#:autoload (lzlib) (call-with-lzip-input-port)
#:use-module (guix progress)
#:use-module (web uri)
#:use-module (web response)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (ice-9 format)
@@ -69,7 +70,7 @@ item. Return #t on success, #f otherwise."
((url rest ...)
(format #t "Trying content-addressed mirror at ~a...~%"
(uri-host (string->uri url)))
(let-values (((port size)
(let-values (((port response)
(catch #t
(lambda ()
(http-fetch (string->uri url)))
@@ -81,7 +82,7 @@ item. Return #t on success, #f otherwise."
(values #f #f)))))
(if (not port)
(loop rest)
(begin
(let ((size (response-content-length response)))
(if size
(format #t "Downloading from ~a (~,2h MiB)...~%" url
(/ size (expt 2 20.)))
+8 -3
View File
@@ -22,6 +22,7 @@
(define-module (guix build download)
#:use-module (web uri)
#:use-module (web http)
#:use-module (web response)
#:use-module ((web client) #:hide (open-socket-for-uri))
#:use-module (web response)
#:use-module (guix base64)
@@ -752,7 +753,7 @@ otherwise simply ignore them."
(case (uri-scheme uri)
((http https)
(false-if-exception*
(let-values (((port size)
(let-values (((port response)
(http-fetch uri
#:verify-certificate? verify-certificate?
#:timeout timeout)))
@@ -762,9 +763,13 @@ otherwise simply ignore them."
#:buffer-size %http-receive-buffer-size
#:reporter (if print-build-trace?
(progress-reporter/trace
file (uri->string uri) size)
file (uri->string uri)
(response-content-length
response))
(progress-reporter/file
(uri-abbreviation uri) size)))
(uri-abbreviation uri)
(response-content-length
response))))
(newline)))
(close-port port)
file)))
+29 -6
View File
@@ -54,6 +54,8 @@
http-get-error-reason
http-get-error-headers
network-error?
http-fetch
http-multiple-get
@@ -75,6 +77,27 @@
(reason http-get-error-reason) ;string
(headers http-get-error-headers)) ;alist
(define kind-and-args-exception?
(exception-predicate &exception-with-kind-and-args))
(define (system-error? exception)
"Return true if EXCEPTION is a Guile 'system-error exception."
(and (kind-and-args-exception? exception)
(eq? 'system-error (exception-kind exception))))
(define network-error?
(let ((kind-and-args? (exception-predicate &exception-with-kind-and-args)))
(lambda (exception)
"Return true if EXCEPTION denotes a networking error."
(or (and (system-error? exception)
(let ((errno (system-error-errno
(cons 'system-error (exception-args exception)))))
(memv errno (list ECONNRESET ECONNABORTED ETIMEDOUT
ECONNREFUSED EHOSTUNREACH EPIPE
ENOENT)))) ;for "file://"
(and (kind-and-args? exception)
(memq (exception-kind exception)
'(gnutls-error getaddrinfo-error)))))))
(define* (http-fetch uri #:key port (text? #f) (buffered? #t)
(open-connection guix:open-connection-for-uri)
@@ -83,11 +106,11 @@
(headers '((user-agent . "GNU Guile")))
(log-port (current-error-port))
timeout)
"Return an input port containing the data at URI, and the expected number of
bytes available or #f. If TEXT? is true, the data at URI is considered to be
textual. Follow any HTTP redirection. When BUFFERED? is #f, return an
unbuffered port, suitable for use in `filtered-port'. HEADERS is an alist of
extra HTTP headers.
"Return an input port containing the data at URI, and the HTTP response from
the server. If TEXT? is true, the data at URI is considered to be textual.
Follow any HTTP redirection. When BUFFERED? is #f, return an unbuffered port,
suitable for use in `filtered-port'. HEADERS is an alist of extra HTTP
headers.
When KEEP-ALIVE? is true, the connection is marked as 'keep-alive' and PORT is
not closed upon completion.
@@ -126,7 +149,7 @@ Raise an '&http-get-error' condition if downloading fails."
(response-code resp)))
(case code
((200)
(values data (response-content-length resp)))
(values data resp))
((301 ; moved permanently
302 ; found (redirection)
303 ; see other
+8 -4
View File
@@ -202,24 +202,28 @@ thrown."
;; Fallback.
(string-suffix? ".git" url)))
(define (download-git-repository url ref)
(define* (download-git-repository url ref #:key recursive?)
"Fetch the given REF from the Git repository at URL. Return three values :
the commit hash, the downloaded directory and its content hash."
(with-store store
(let (((values checkout commit-hash)
(latest-repository-commit store url #:ref ref)))
(latest-repository-commit store url #:ref ref
#:recursive? recursive?)))
(values commit-hash
checkout
(bytevector->nix-base32-string
(query-path-hash store checkout))))))
(define (git-origin url commit hash)
(define* (git-origin url commit hash #:key recursive?)
"Simple helper to generate a Git origin s-expression."
`(origin
(method git-fetch)
(uri (git-reference
(url ,(and (not (eq? url 'null)) url))
(commit ,commit)))
(commit ,commit)
,@(if recursive?
'(recursive? #t)
'())))
(file-name (git-file-name name version))
(sha256
(base32 ,hash))))
+364
View File
@@ -0,0 +1,364 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012-2025 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix remote-procedures)
#:use-module (guix serialization)
#:export (%protocol-version
%worker-magic-1
%worker-magic-2
protocol-major
protocol-minor
protocol-version
visit-remote-procedures
id:
returns:
remote-procedure-id
stream-argument
hash-algo
build-mode
gc-action))
;;; Comment:
;;;
;;; This module defines the remote procedure interface between the build
;;; daemon and clients (also known as "remote procedure calls" or RPCs). It
;;; is used to generate client stubs in (guix store) and can also be used to
;;; generate server stubs.
;;;
;;; Code:
(define %protocol-version
;; Version of the currently-implemented protocol.
#x164)
;; Values sent by the client and then the server upon handshake.
(define %worker-magic-1 #x6e697863) ; "nixc"
(define %worker-magic-2 #x6478696f) ; "dxio"
(define (protocol-major magic)
"Extract from MAGIC, an integer, the protocol major version."
(logand magic #xff00))
(define (protocol-minor magic)
"Extract from MAGIC, an integer, the protocol minor version."
(logand magic #x00ff))
(define (protocol-version major minor)
"Return an integer representing protocol version MAJOR and MINOR."
(logior major minor))
(define-syntax define-remote-procedures
(syntax-rules (define)
((_ walk definition ...)
(define-syntax-rule (walk process)
(process definition ...)))))
;; Syntactic keywords.
(define-syntax id:
(lambda (s) #`(syntax-error "invalid use of 'id:' keyword" #,s)))
(define-syntax returns:
(lambda (s) #`(syntax-error "invalid use of 'returns:' keyword" #,s)))
;; What follows is in essence an instance of the interface definition language
;; (IDL) for client/daemon messaging.
(define-remote-procedures visit-remote-procedures
(define (valid-path? (utf8-string path))
"Return #t when PATH designates a valid store item and #f otherwise (an
invalid item may exist on disk but still be invalid, for instance because it
is the result of an aborted or failed build.)
An exception is raised if PATH is not prefixed by the store
directory (/gnu/store)."
id: 1
returns: boolean)
(define (has-substitutes? (store-path path)) ;deprecated
"Return #t if binary substitutes are available for PATH, and #f
otherwise."
id: 3
returns: boolean)
(define (query-path-hash (store-path path))
"Return the SHA256 hash of the nar serialization of PATH as a bytevector."
id: 4
returns: base16)
(define (query-references (store-path path))
"Return the list of references of PATH."
id: 5
returns: store-path-list)
(define (query-referrers (store-path path))
"Return the list of store items that refer to PATH."
id: 6
returns: store-path-list)
(define (add-to-store (utf8-string basename)
(boolean obsolete) ;obsolete, must be #t
(boolean recursive?)
(utf8-string hash-algo)
(file file-name))
"Add the contents of FILE-NAME under BASENAME to the store. When
RECURSIVE? is false, FILE-NAME must designate a regular file--not a directory
nor a symlink. When RECURSIVE? is true and FILE-NAME designates a directory,
the contents of FILE-NAME are added recursively; if FILE-NAME designates a
flat file and RECURSIVE? is true, its contents are added, and its permission
bits are kept. HASH-ALGO must be a string such as \"sha256\".
When RECURSIVE? is true, call (SELECT? FILE STAT) for each directory entry,
where FILE is the entry's absolute file name and STAT is the result of
'lstat'; exclude entries for which SELECT? does not return true.
Return the store file name of the newly added file."
id: 7
returns: store-path)
(define (add-text-to-store (utf8-string name) (bytevector text)
(string-list references))
"Add BYTES under file NAME in the store, and return its store path.
REFERENCES is the list of store paths referred to by the resulting store
path."
id: 8
returns: store-path)
(define (build-things (string-list things)
(integer mode))
"Build THINGS, a list of store items which may be either '.drv' files or
outputs, and return when the worker is done building them. Elements of THINGS
that are not derivations can only be substituted and not built locally.
Alternatively, an element of THING can be a derivation/output name pair, in
which case the daemon will attempt to substitute just the requested output of
the derivation. Return #t on success."
id: 9
returns: boolean)
(define (ensure-path (store-path path))
"Ensure that the given path is valid; if it is not valid, it may be made valid
by running a substitute. Return #t on success and raise an exception on
failure.
As a GC root is not created by the daemon, you may want to call
'add-temp-root' on that store path."
id: 10
returns: boolean)
(define (add-temp-root (store-path path))
"Make PATH a temporary root for the duration of the current session.
Return #t."
id: 11
returns: boolean)
(define (add-indirect-root (utf8-string file-name))
"Make the symlink FILE-NAME an indirect root for the garbage collector:
whatever store item FILE-NAME points to will not be collected. Return #t on
success.
FILE-NAME can be anywhere on the file system, but it must be an absolute file
name--it is the caller's responsibility to ensure that it is an absolute file
name."
id: 12
returns: boolean)
(define (find-roots)
"Return a list of root/target pairs: for each pair, the first element is the
GC root file name and the second element is its target in the store.
When talking to a local daemon, this operation is equivalent to the 'gc-roots'
procedure in (guix store roots), except that the 'find-roots' excludes
potential roots that do not point to store items."
id: 14
returns: string-pairs)
(define (export-path (store-path item)
(boolean sign?)
(stream port))
"Export PATH to PORT; when SIGN? is true, sign it. Return #t."
id: 16
returns: boolean)
(define (set-options (boolean keep-failed?) (boolean keep-going?)
(boolean fallback?) (integer verbosity)
(boolean offload?)
(integer build-verbosity) (integer log-type)
(boolean print-build-trace)
(boolean use-substitutes?)
(string-pairs settings))
"Set daemon options for this session; return nothing."
id: 19
returns:) ;returns nothing
(define (collect-garbage (integer action)
(store-path-list to-delete)
(boolean obsolete1)
(long-long min-freed)
(integer obsolete2)
(integer obsolete3)
(integer obsolete4))
"Invoke the garbage collector to perform ACTION, a 'gc-action' value."
id: 20
returns: store-path-list long-long long-long)
(define (query-derivation-outputs ;avoid name clash with `derivation-outputs'
(store-path path))
"Return the list of outputs of PATH, a .drv file."
id: 22
returns: store-path-list)
;; missing: query-all-valid-paths id: 23
(define (query-failed-paths)
"Return the list of store items for which a build failure is cached.
The result is always the empty list unless the daemon was started with
'--cache-failures'."
id: 24
returns: store-path-list)
(define (clear-failed-paths (store-path-list items))
"Remove ITEMS from the list of cached build failures and return #t.
This makes sense only when the daemon was started with '--cache-failures'."
id: 25
returns: boolean)
(define (query-path-info (store-path path))
"Return the info (hash, references, etc.) for PATH."
id: 26
returns: path-info)
(define (import-paths (stream port))
"Import the set of store paths read from PORT into SERVER's store. An error
is raised if the set of paths read from PORT is not signed (as per
'export-path #:sign? #t'.) Return the list of store paths imported."
id: 27
returns: store-path-list)
(define (query-path-from-hash-part (utf8-string hash))
"Return the store path whose hash part is HASH-PART (a nix-base32
string). Return the empty string if no such path exists."
;; This RPC is primarily used by Hydra to reply to HTTP GETs of
;; /HASH.narinfo.
id: 29
returns: store-path)
(define (query-substitutable-paths (store-path-list paths))
"Return the subset of PATHS that is substitutable."
id: 32
returns: store-path-list)
(define (query-valid-derivers (store-path path))
"Return the list of valid \"derivers\" of PATH---i.e., all the
.drv present in the store that have PATH among their outputs."
id: 33
returns: store-path-list)
(define (query-substitutable-path-infos (store-path-list paths))
"Return information about the subset of PATHS that is
substitutable. For each substitutable path, a `substitutable?' object is
returned; thus, the resulting list can be shorter than PATHS. Furthermore,
that there is no guarantee that the order of the resulting list matches the
order of PATHS."
id: 30
returns: substitutable-path-list)
(define (optimize-store)
"Optimize the store by hard-linking identical files (\"deduplication\".)
Return #t on success."
id: 34
returns: boolean)
(define (verify-store (boolean check-contents?)
(boolean repair?))
"Verify the store. Return #t if errors were encountered, false otherwise."
id: 35
returns: boolean)
;; Guix-specific RPCs.
(define (built-in-builders)
"Return the built-in builders."
id: 80
returns: string-list)
(define (substitute-urls)
"Return the list of substitute URLs."
id: 81
returns: string-list))
(define-syntax remote-procedure-id
(syntax-rules ()
"Return the numeric identifier of the remote procedure with the given name."
((_ name)
(letrec-syntax ((extract-id
(lambda (s)
(syntax-case s (define id: returns:)
((_)
#`(syntax-error "remote procedure not found"
#,s))
((_ (define (procedure formals (... ...))
doc
id: id
returns: _ (... ...))
rest (... ...))
(eq? (syntax->datum #'procedure)
(syntax->datum #'name))
#'id)
((_ (define _ (... ...))
rest (... ...))
#'(extract-id rest (... ...)))))))
(visit-remote-procedures extract-id)))))
(define-syntax stream-argument
(syntax-rules (stream)
"Extract the stream from the given formal parameter list, or expand to #f
if there is none."
((_ (stream arg) rest ...)
arg)
((_ (type arg) rest ...)
(stream-argument rest ...))
((_)
#f)))
(define-syntax define-enumerate-type
(syntax-rules ()
((_ name->int (name id) ...)
(define-syntax name->int
(syntax-rules (name ...)
((_ name) id) ...)))))
(define-enumerate-type hash-algo
;; hash.hh
(md5 1)
(sha1 2)
(sha256 3))
(define-enumerate-type build-mode
;; store-api.hh
(normal 0)
(repair 1)
(check 2))
(define-enumerate-type gc-action
;; store-api.hh
(return-live 0)
(return-dead 1)
(delete-dead 2)
(delete-specific 3))
+6 -2
View File
@@ -44,6 +44,7 @@
#:use-module (ice-9 format)
#:use-module (ice-9 ftw)
#:use-module (web uri)
#:use-module (web response)
#:export (compare-contents
comparison-report?
@@ -257,11 +258,14 @@ in the nar."
"Call PROC with an input port from which it can read the nar pointed to by
NARINFO."
(let* ((uri compression size (narinfo-best-uri narinfo))
(port actual-size (http-fetch uri)))
(port response (http-fetch uri)))
(define reporter
(progress-reporter/file (narinfo-path narinfo)
(and size
(max size (or actual-size 0))) ;defensive
(max size (or
(response-content-length
response)
0))) ;defensive
#:abbreviation (const (uri-host uri))))
(define result
+134 -329
View File
@@ -31,7 +31,6 @@
#:use-module (guix diagnostics)
#:use-module (guix i18n)
#:use-module ((guix serialization) #:select (restore-file dump-file))
#:autoload (guix store deduplication) (dump-file/deduplicate)
#:autoload (guix scripts discover) (read-substitute-urls)
#:use-module (gcrypt hash)
#:use-module (guix base32)
@@ -40,14 +39,9 @@
#:use-module (guix pki)
#:autoload (guix build utils) (mkdir-p delete-file-recursively)
#:use-module ((guix build download)
#:select (uri-abbreviation nar-uri-abbreviation
#:select (uri-abbreviation
(open-connection-for-uri
. guix:open-connection-for-uri)))
#:autoload (gnutls) (error/invalid-session
error/again
error/interrupted
error/push-error
error/pull-error)
#:use-module (guix progress)
#:use-module ((guix build syscalls)
#:select (set-thread-name))
@@ -61,6 +55,7 @@
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-71)
#:use-module (web uri)
#:use-module (web response)
#:use-module (guix http-client)
#:export (%allow-unauthenticated-substitutes?
%reply-file-descriptor
@@ -95,45 +90,6 @@ disabled!~%"))
(and=> (getenv "GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES")
(cut string-ci=? <> "yes"))))
(define %fetch-timeout
;; Number of seconds after which networking is considered "slow".
5)
(define %random-state
(seed->random-state (+ (ash (cdr (gettimeofday)) 32) (getpid))))
(define-syntax-rule (with-timeout duration handler body ...)
"Run BODY; when DURATION seconds have expired, call HANDLER, and run BODY
again."
(begin
(sigaction SIGALRM
(lambda (signum)
(sigaction SIGALRM SIG_DFL)
handler))
(alarm duration)
(call-with-values
(lambda ()
(let try ()
(catch 'system-error
(lambda ()
body ...)
(lambda args
;; Before Guile v2.0.9-39-gfe51c7b, the SIGALRM triggers EINTR
;; because of the bug at
;; <http://lists.gnu.org/archive/html/guile-devel/2013-06/msg00050.html>.
;; When that happens, try again. Note: SA_RESTART cannot be
;; used because of <http://bugs.gnu.org/14640>.
(if (= EINTR (system-error-errno args))
(begin
;; Wait a little to avoid bursts.
(usleep (random 3000000 %random-state))
(try))
(apply throw args))))))
(lambda result
(alarm 0)
(sigaction SIGALRM SIG_DFL)
(apply values result)))))
(define (at-most max-length lst)
"If LST is shorter than MAX-LENGTH, return it and the empty list; otherwise
return its MAX-LENGTH first elements and its tail."
@@ -266,22 +222,20 @@ Internal tool to substitute a pre-built binary to a local build.\n"))
;;; Daemon/substituter protocol.
;;;
(define %prefer-fast-decompression?
;; Whether to prefer fast decompression over good compression ratios. This
;; serves in particular to choose between lzip (high compression ratio but
;; low decompression throughput) and zstd (lower compression ratio but high
;; decompression throughput).
#f)
;; Whether to initially prefer fast decompression or not
(define %default-fast-decompression? #t)
(define (call-with-cpu-usage-monitoring proc)
(define (call-with-cpu-usage-monitoring thunk)
(let ((before (times)))
(proc)
(let ((after (times)))
(if (= (tms:clock after) (tms:clock before))
0
(/ (- (tms:utime after) (tms:utime before))
(- (tms:clock after) (tms:clock before))
1.)))))
(call-with-values thunk
(lambda vals
(let* ((after (times))
(usage (if (= (tms:clock after) (tms:clock before))
0
(/ (- (tms:utime after) (tms:utime before))
(- (tms:clock after) (tms:clock before))
1.))))
(apply values (append vals (list usage))))))))
(define-syntax-rule (with-cpu-usage-monitoring exp ...)
"Evaluate EXP... Return its CPU usage as a fraction between 0 and 1."
@@ -302,7 +256,7 @@ daemon."
(let ((uri compression file-size
(narinfo-best-uri narinfo
#:fast-decompression?
%prefer-fast-decompression?)))
%default-fast-decompression?)))
(format port "~a\n~a\n"
(or file-size 0)
(or (narinfo-size narinfo) 0))))
@@ -365,6 +319,10 @@ authorized substitutes."
;; 'open-connection-for-uri/cached'.
16)
(define %fetch-timeout
;; Number of seconds after which networking is considered "slow".
5)
(define open-connection-for-uri/cached
(let ((cache '()))
(lambda* (uri #:key fresh? (timeout %fetch-timeout) verify-certificate?)
@@ -410,237 +368,10 @@ server certificates."
(drain-input socket)
socket))))))))
(define kind-and-args-exception?
(exception-predicate &exception-with-kind-and-args))
(define (call-with-cached-connection uri proc)
(let ((port (open-connection-for-uri/cached uri
#:verify-certificate? #f)))
(guard (c ((kind-and-args-exception? c)
(let ((key (exception-kind c))
(args (exception-args c)))
;; If PORT was cached and the server closed the connection in the
;; meantime, we get EPIPE. In that case, open a fresh connection
;; and retry. We might also get 'bad-response or a similar
;; exception from (web response) later on, once we've sent the
;; request, or a ERROR/INVALID-SESSION from GnuTLS.
(if (or (and (eq? key 'system-error)
(= EPIPE (system-error-errno `(,key ,@args))))
(and (eq? key 'gnutls-error)
(memq (first args)
(list error/invalid-session
;; "Error in the push function" is
;; usually a transient error.
error/push-error
error/pull-error
;; XXX: These two are not properly handled in
;; GnuTLS < 3.7.3, in
;; 'write_to_session_record_port'; see
;; <https://bugs.gnu.org/47867>.
error/again error/interrupted)))
(memq key '(bad-response bad-header bad-header-component)))
(proc (open-connection-for-uri/cached uri
#:verify-certificate? #f
#:fresh? #t))
(raise c))))
(#t
;; An exception that's not handled here, such as
;; '&http-get-error'. Re-raise it.
(raise c)))
(proc port))))
(define-syntax-rule (with-cached-connection uri port exp ...)
"Bind PORT with EXP... to a socket connected to URI."
(call-with-cached-connection uri (lambda (port) exp ...)))
(define-syntax-rule (catch-system-error exp)
(catch 'system-error
(lambda () exp)
(const #f)))
(define* (download-nar narinfo destination
#:key status-port
deduplicate? print-build-trace?
(fetch-timeout %fetch-timeout))
"Download the nar prescribed in NARINFO, which is assumed to be authentic
and authorized, and write it to DESTINATION. When DEDUPLICATE? is true, and
if DESTINATION is in the store, deduplicate its files. Print a status line to
STATUS-PORT."
(define destination-in-store?
(string-prefix? (string-append (%store-prefix) "/")
destination))
(define (dump-file/deduplicate* . args)
;; Make sure deduplication looks at the right store (necessary in test
;; environments).
(apply dump-file/deduplicate
(append args (list #:store (%store-prefix)))))
(define (fetch uri)
(case (uri-scheme uri)
((file)
(let ((port (open-file (uri-path uri) "r0b")))
(values port (stat:size (stat port)))))
((http https)
(if fetch-timeout
;; Test this with:
;; sudo tc qdisc add dev eth0 root netem delay 1500ms
;; and then cancel with:
;; sudo tc qdisc del dev eth0 root
(with-timeout %fetch-timeout
(begin
(warning (G_ "while fetching ~a: server is somewhat slow~%")
(uri->string uri))
(warning (G_ "try `--no-substitutes' if the problem persists~%")))
(with-cached-connection uri port
(http-fetch uri #:text? #f
#:port port
#:keep-alive? #t
#:buffered? #f)))
(with-cached-connection uri port
(http-fetch uri #:text? #f
#:port port
#:keep-alive? #t
#:buffered? #f))))
(else
(raise
(formatted-message
(G_ "unsupported substitute URI scheme: ~a~%")
(uri->string uri))))))
(define (try-fetch choices)
(match choices
(((uri compression file-size) rest ...)
(guard (c ((and (pair? rest)
(or (http-get-error? c)
(network-error? c)))
(warning (G_ "download from '~a' failed, trying next URL~%")
(uri->string uri))
(try-fetch rest)))
(let ((port download-size (fetch uri)))
(unless print-build-trace?
(format (current-error-port)
(G_ "Downloading ~a...~%") (uri->string uri)))
(values port uri compression download-size))))
(()
(raise
(formatted-message
(G_ "no valid nar URLs for ~a at ~a~%")
(narinfo-path narinfo)
(narinfo-uri-base narinfo))))))
;; Delete DESTINATION first--necessary when starting over after a failed
;; download.
(catch-system-error (delete-file-recursively destination))
(let ((choices (narinfo-preferred-uris narinfo
#:fast-decompression?
%prefer-fast-decompression?)))
;; 'guix publish' without '--cache' doesn't specify a Content-Length, so
;; DOWNLOAD-SIZE is #f in this case.
(let* ((raw uri compression download-size (try-fetch choices))
(progress
(let* ((dl-size (or download-size
(and (equal? compression "none")
(narinfo-size narinfo))))
(reporter (if print-build-trace?
(progress-reporter/trace
destination
(uri->string uri) dl-size
(current-error-port))
(progress-reporter/file
(uri->string uri) dl-size
(current-error-port)
#:abbreviation nar-uri-abbreviation))))
;; Keep RAW open upon completion so we can later reuse
;; the underlying connection. Pass the download size so
;; that this procedure won't block reading from RAW.
(progress-report-port reporter raw
#:close? #f
#:download-size dl-size)))
(input pids
;; NOTE: This 'progress' port of current process will be
;; closed here, while the child process doing the
;; reporting will close it upon exit.
(decompressed-port (string->symbol compression)
progress))
;; Compute the actual nar hash as we read it.
(algorithm expected (narinfo-hash-algorithm+value narinfo))
(hashed get-hash (open-hash-input-port algorithm input)))
;; Unpack the Nar at INPUT into DESTINATION.
(define cpu-usage
(with-cpu-usage-monitoring
(restore-file hashed destination
#:dump-file (if (and destination-in-store?
deduplicate?)
dump-file/deduplicate*
dump-file))))
;; Create a hysteresis: depending on CPU usage, favor compression
;; methods with faster decompression (like ztsd) or methods with better
;; compression ratios (like lzip). This stems from the observation that
;; substitution can be CPU-bound when high-speed networks are used:
;; <https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00177.html>.
;; To simulate "slow" networking or changing conditions, run:
;; sudo tc qdisc add dev eno1 root tbf rate 512kbit latency 50ms burst 1540
;; and then cancel with:
;; sudo tc qdisc del dev eno1 root
(when (> cpu-usage .8)
(set! %prefer-fast-decompression? #t))
(when (< cpu-usage .2)
(set! %prefer-fast-decompression? #f))
(close-port hashed)
(close-port input)
;; Wait for the reporter to finish.
(every (compose zero? cdr waitpid) pids)
;; Skip a line after what 'progress-reporter/file' printed, and another
;; one to visually separate substitutions. When PRINT-BUILD-TRACE? is
;; true, leave it up to (guix status) to prettify things.
(newline (current-error-port))
(unless print-build-trace?
(newline (current-error-port)))
;; Check whether we got the data announced in NARINFO.
(let ((actual (get-hash)))
(if (bytevector=? actual expected)
;; Tell the daemon that we're done.
(format status-port "success ~a ~a~%"
(narinfo-hash narinfo) (narinfo-size narinfo))
;; The actual data has a different hash than that in NARINFO.
(format status-port "hash-mismatch ~a ~a ~a~%"
(hash-algorithm-name algorithm)
(bytevector->nix-base32-string expected)
(bytevector->nix-base32-string actual)))))))
(define (system-error? exception)
"Return true if EXCEPTION is a Guile 'system-error exception."
(and (kind-and-args-exception? exception)
(eq? 'system-error (exception-kind exception))))
(define network-error?
(let ((kind-and-args? (exception-predicate &exception-with-kind-and-args)))
(lambda (exception)
"Return true if EXCEPTION denotes a networking error."
(or (and (system-error? exception)
(let ((errno (system-error-errno
(cons 'system-error (exception-args exception)))))
(memv errno (list ECONNRESET ECONNABORTED ETIMEDOUT
ECONNREFUSED EHOSTUNREACH
ENOENT)))) ;for "file://"
(and (kind-and-args? exception)
(memq (exception-kind exception)
'(gnutls-error getaddrinfo-error)))
(http-get-error? exception)))))
(define* (process-substitution/fallback port narinfo destination
(define* (process-substitution/fallback narinfo destination
#:key cache-urls acl
deduplicate? print-build-trace?)
deduplicate? print-build-trace?
fast-decompression?)
"Attempt to substitute NARINFO, which is assumed to be authorized or
equivalent, by trying to download its nar from each entry in CACHE-URLS.
@@ -652,9 +383,8 @@ way to download the nar."
(let loop ((cache-urls cache-urls))
(match cache-urls
(()
(report-error (G_ "failed to find alternative substitute for '~a'~%")
(narinfo-path narinfo))
(display "not-found\n" port))
;; Failure, so return two values like download-nar
(values #f #f))
((cache-url rest ...)
(match (lookup-narinfos cache-url
(list (narinfo-path narinfo))
@@ -664,7 +394,8 @@ way to download the nar."
(if (or (equivalent-narinfo? narinfo alternate)
(valid-narinfo? alternate acl)
(%allow-unauthenticated-substitutes?))
(guard (c ((network-error? c)
(guard (c ((or (http-get-error? c)
(network-error? c))
(when (http-get-error? c)
(warning (G_ "download from '~a' failed: ~a, ~s~%")
(uri->string (http-get-error-uri c))
@@ -672,16 +403,21 @@ way to download the nar."
(http-get-error-reason c)))
(loop rest)))
(download-nar alternate destination
#:status-port port
#:deduplicate? deduplicate?
#:print-build-trace? print-build-trace?))
#:print-build-trace? print-build-trace?
#:fast-decompression?
fast-decompression?
#:open-connection-for-uri
open-connection-for-uri/cached
#:keep-alive? #t))
(loop rest)))
(()
(loop rest)))))))
(define* (process-substitution port store-item destination
(define* (process-substitution store-item destination
#:key cache-urls acl
deduplicate? print-build-trace?)
deduplicate? print-build-trace?
fast-decompression?)
"Substitute STORE-ITEM (a store file name) from CACHE-URLS, and write it to
DESTINATION as a nar file. Verify the substitute against ACL, and verify its
hash against what appears in the narinfo. When DEDUPLICATE? is true, and if
@@ -699,25 +435,38 @@ PORT."
(G_ "no valid substitute for '~a'~%")
store-item)))
(guard (c ((network-error? c)
(when (http-get-error? c)
(warning (G_ "download from '~a' failed: ~a, ~s~%")
(uri->string (http-get-error-uri c))
(http-get-error-code c)
(http-get-error-reason c)))
(format (current-error-port)
(G_ "retrying download of '~a' with other substitute URLs...~%")
store-item)
(process-substitution/fallback port narinfo destination
#:cache-urls cache-urls
#:acl acl
#:deduplicate? deduplicate?
#:print-build-trace?
print-build-trace?)))
(download-nar narinfo destination
#:status-port port
#:deduplicate? deduplicate?
#:print-build-trace? print-build-trace?)))
(let ((expected-hash
actual-hash
(guard
(c ((or (http-get-error? c)
(network-error? c))
(when (http-get-error? c)
(warning (G_ "download from '~a' failed: ~a, ~s~%")
(uri->string (http-get-error-uri c))
(http-get-error-code c)
(http-get-error-reason c)))
(format
(current-error-port)
(G_ "retrying download of '~a' with other substitute URLs...~%")
store-item)
(process-substitution/fallback narinfo destination
#:cache-urls cache-urls
#:acl acl
#:deduplicate? deduplicate?
#:print-build-trace?
print-build-trace?
#:fast-decompression?
fast-decompression?)))
(download-nar narinfo destination
#:deduplicate? deduplicate?
#:print-build-trace? print-build-trace?
#:fast-decompression? fast-decompression?
#:open-connection-for-uri
open-connection-for-uri/cached
#:keep-alive? #t))))
(values narinfo
expected-hash
actual-hash)))
;;;
@@ -907,26 +656,82 @@ default value."
;; Specify the number of columns of the terminal so the progress
;; report displays nicely.
(parameterize ((current-terminal-columns (client-terminal-columns)))
(let loop ()
(let loop ((fast-decompression?
%default-fast-decompression?))
(match (read-line)
((? eof-object?)
#t)
((= string-tokenize ("substitute" store-path destination))
(process-substitution reply-port store-path destination
#:cache-urls (substitute-urls)
#:acl (current-acl)
#:deduplicate? deduplicate?
#:print-build-trace?
print-build-trace?)
(loop))))))
(let ((narinfo
expected-hash
actual-hash
cpu-usage
(with-cpu-usage-monitoring
(process-substitution
store-path destination
#:cache-urls (substitute-urls)
#:acl (current-acl)
#:deduplicate? deduplicate?
#:print-build-trace?
print-build-trace?
#:fast-decompression?
fast-decompression?))))
(if expected-hash
(begin
;; Skip a line after what 'progress-reporter/file'
;; printed, and another one to visually separate
;; substitutions. When PRINT-BUILD-TRACE? is true,
;; leave it up to (guix status) to prettify things.
(newline (current-error-port))
(unless print-build-trace?
(newline (current-error-port)))
;; Check whether we got the data announced in NARINFO.
(if (bytevector=? actual-hash expected-hash)
;; Tell the daemon that we're done.
(format reply-port "success ~a ~a~%"
(narinfo-hash narinfo) (narinfo-size narinfo))
;; The actual data has a different hash than that in NARINFO.
(format reply-port "hash-mismatch ~a ~a ~a~%"
(hash-algorithm-name
(narinfo-hash-algorithm+value narinfo))
(bytevector->nix-base32-string expected-hash)
(bytevector->nix-base32-string actual-hash)))
;; Create a hysteresis: depending on CPU usage, favor
;; compression methods with faster decompression (like
;; ztsd) or methods with better compression ratios
;; (like lzip). This stems from the observation that
;; substitution can be CPU-bound when high-speed
;; networks are used:
;; <https://lists.gnu.org/archive/html/guix-devel/2020-12/msg00177.html>.
;; To simulate "slow" networking or changing
;; conditions, run:
;; sudo tc qdisc add dev eno1 root tbf rate 512kbit latency 50ms burst 1540
;; and then cancel with:
;; sudo tc qdisc del dev eno1 root
(loop (cond
;; Whether to prefer fast decompression over
;; good compression ratios. This serves in
;; particular to choose between lzip (high
;; compression ratio but low decompression
;; throughput) and zstd (lower compression ratio
;; but high decompression throughput).
((> cpu-usage .8) #t)
((< cpu-usage .2) #f)
(else fast-decompression?))))
(begin
(report-error (G_ "failed to find alternative substitute for '~a'~%")
(narinfo-path narinfo))
(display "not-found\n" reply-port)
(loop fast-decompression?)))))))))
(opts
(leave (G_ "~a: unrecognized options~%") opts))))))
;;; Local Variables:
;;; eval: (put 'with-timeout 'scheme-indent-function 1)
;;; eval: (put 'with-redirected-error-port 'scheme-indent-function 0)
;;; eval: (put 'with-cached-connection 'scheme-indent-function 2)
;;; eval: (put 'call-with-cached-connection 'scheme-indent-function 1)
;;; End:
;;; substitute.scm ends here
+149 -18
View File
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012-2021, 2025 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -17,8 +17,12 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix serialization)
#:autoload (guix base16) (base16-string->bytevector
bytevector->base16-string)
#:use-module (rnrs bytevectors)
#:autoload (rnrs bytevectors gnu) (bytevector-slice)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
@@ -26,17 +30,23 @@
#:use-module ((ice-9 rdelim) #:prefix rdelim:)
#:use-module (ice-9 match)
#:use-module (ice-9 ftw)
#:use-module (system foreign)
#:export (write-int read-int
#:export (write-value
read-value
write-bytevector
read-maybe-utf8-string
(dump . dump-port*)
;; The following bindings are exported for backward compatibility
;; but one should use 'read-value' and 'write-value' instead.
write-int read-int
write-long-long read-long-long
write-padding
write-bytevector write-string
read-string read-latin1-string read-maybe-utf8-string
write-string
read-string read-latin1-string
write-string-list read-string-list
write-string-pairs read-string-pairs
write-store-path read-store-path
write-store-path-list read-store-path-list
(dump . dump-port*)
&nar-error
nar-error?
@@ -49,6 +59,21 @@
write-file
write-file-tree
substitutable?
substitutable-path
substitutable-deriver
substitutable-references
substitutable-download-size
substitutable-nar-size
path-info?
path-info-deriver
path-info-hash
path-info-references
path-info-registration-time
path-info-nar-size
fold-archive
restore-file
dump-file))
@@ -81,17 +106,6 @@
(port port)))))
bv))
(define (sub-bytevector bv len)
"Return a bytevector that aliases the first LEN bytes of BV."
(define max (bytevector-length bv))
(cond ((= len max) bv)
((< len max)
;; Yes, this is safe because the result of each conversion procedure
;; has its life cycle synchronized with that of its argument.
(pointer->bytevector (bytevector->pointer bv) len))
(else
(error "sub-bytevector called to get a super bytevector"))))
(define (write-int n p)
(let ((b (make-bytevector 8 0)))
(bytevector-u32-set! b 0 n (endianness little))
@@ -101,6 +115,12 @@
(let ((b (get-bytevector-n* p 8)))
(bytevector-u32-ref b 0 (endianness little))))
(define (write-boolean b p)
(write-int (if b 1 0) p))
(define (read-boolean p)
(not (zero? (read-int p))))
(define (write-long-long n p)
(let ((b (make-bytevector 8 0)))
(bytevector-u64-set! b 0 n (endianness little))
@@ -133,7 +153,7 @@
(m (modulo len 8))
(pad (if (zero? m) 0 (- 8 m)))
(bv (get-bytevector-n* p (+ len pad))))
(sub-bytevector bv len)))
(bytevector-slice bv 0 len)))
(define (read-string p)
(utf8->string (read-byte-string p)))
@@ -161,6 +181,12 @@ substitute invalid byte sequences with question marks. This is a
(set-port-conversion-strategy! port 'substitute)
(rdelim:read-string port)))
(define (read-base16 p)
(base16-string->bytevector (read-string p)))
(define (write-base16 bv p)
(write-string (bytevector->base16-string bv) p))
(define (write-string-list l p)
(write-int (length l) p)
(for-each (cut write-string <> p) l))
@@ -229,6 +255,111 @@ any run-time allocations or computations."
bytes)
#`(put-bytevector port #,bv))))))
;; Information about a substitutable store path.
(define-record-type <substitutable>
(substitutable path deriver refs dl-size nar-size)
substitutable?
(path substitutable-path)
(deriver substitutable-deriver)
(refs substitutable-references)
(dl-size substitutable-download-size)
(nar-size substitutable-nar-size))
(define (read-substitutable-path-list p)
(let loop ((len (read-int p))
(result '()))
(if (zero? len)
(reverse result)
(let ((path (read-store-path p))
(deriver (read-store-path p))
(refs (read-store-path-list p))
(dl-size (read-long-long p))
(nar-size (read-long-long p)))
(loop (- len 1)
(cons (substitutable path deriver refs dl-size nar-size)
result))))))
;; Information about a store path.
(define-record-type <path-info>
(make-path-info deriver hash references registration-time nar-size)
path-info?
(deriver path-info-deriver) ;string | #f
(hash path-info-hash)
(references path-info-references)
(registration-time path-info-registration-time)
(nar-size path-info-nar-size))
(define (read-path-info p)
(let ((deriver (match (read-store-path p)
("" #f)
(x x)))
(hash (base16-string->bytevector (read-string p)))
(refs (read-store-path-list p))
(registration-time (read-int p))
(nar-size (read-long-long p)))
(make-path-info deriver hash refs registration-time nar-size)))
(define-syntax define-serializable-types
(syntax-rules ()
"Define READ-ANY and WRITE-ANY as macros that dispatch serialization and
deserialization of known data types. These two macros can then be used like so:
(READ-ANY integer PORT)
and:
(WRITE-ANY store-path VALUE PORT)
The former returns the value it read; the latter returns the unspecified
value."
((_ read-any write-any (type read write) ...)
(begin
;; Define syntactic keywords.
(define-syntax type
(lambda (s)
#`(syntax-error "invalid use of serializable type name" #,s)))
...
(export type ...)
(define-syntax write-any
(syntax-rules (type ...)
"Write the following TYPE value to the given port."
((_ type arg port)
(write arg port))
...))
(define-syntax read-any
(syntax-rules (type ...)
"Read from the given port a value of TYPE."
((_ type port)
(read port))
...))))))
(define no-op (const #t))
;; Serializable types known to the client/daemon protocol.
(define-serializable-types read-value write-value
(integer read-int write-int)
(long-long read-long-long write-long-long)
(boolean read-boolean write-boolean)
(bytevector read-byte-string write-bytevector)
(utf8-string read-string write-string) ;avoid name clash with 'string'
(string-list read-string-list write-string-list)
(string-pairs read-string-pairs write-string-pairs)
(store-path read-store-path write-store-path)
(store-path-list read-store-path-list write-store-path-list)
(base16 read-base16 write-base16)
(path-info read-path-info write-path-info/not-implemented)
(substitutable-path-list read-substitutable-path-list
write-substitutable-path-list/not-implemented)
;; When reading a file, just return the input port and let the caller (a
;; server) call 'restore-file' or whatever is relevant for the operation.
(file identity write-file)
;; User-provided as used in the 'export-path' and 'import-paths' remote
;; procedures.
(stream no-op no-op))
(define-condition-type &nar-read-error &nar-error
nar-read-error?
+265 -561
View File
File diff suppressed because it is too large Load Diff
+221 -7
View File
@@ -30,15 +30,19 @@
#:use-module (gcrypt hash)
#:use-module (guix base32)
#:use-module (guix cache)
#:use-module ((guix build utils) #:select (mkdir-p dump-port))
#:use-module ((guix build utils)
#:select (mkdir-p dump-port delete-file-recursively))
#:use-module ((guix build download)
#:select ((open-connection-for-uri
. guix:open-connection-for-uri)
resolve-uri-reference))
#:autoload (gnutls) (error->string
error/premature-termination
error/pull-error
error/push-error)
resolve-uri-reference
nar-uri-abbreviation))
#:use-module ((guix serialization) #:select (restore-file dump-file))
#:autoload (gnutls) (error->string error/premature-termination
error/invalid-session error/again
error/interrupted
error/push-error error/pull-error)
#:autoload (guix store deduplication) (dump-file/deduplicate)
#:use-module (guix progress)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -49,6 +53,8 @@
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-71)
#:use-module (web uri)
#:use-module (web request)
#:use-module (web response)
@@ -58,7 +64,10 @@
call-with-connection-error-handling
lookup-narinfos
lookup-narinfos/diverse))
lookup-narinfos/diverse
http-response-error?
download-nar))
(define %narinfo-ttl
;; Number of seconds during which cached narinfo lookups are considered
@@ -399,4 +408,209 @@ AUTHORIZED? narinfo."
(() ;that's it
(filter-map (select-hit result) hits)))))))
(define %random-state
(seed->random-state (+ (ash (cdr (gettimeofday)) 32) (getpid))))
(define-syntax-rule (with-timeout duration handler body ...)
"Run BODY; when DURATION seconds have expired, call HANDLER, and run BODY
again. If DURATION is #f, run BODY with no timeout."
(let ((thunk (lambda () body ...)))
(if duration
(begin
(sigaction SIGALRM
(lambda (signum)
(sigaction SIGALRM SIG_DFL)
handler))
(alarm duration)
(call-with-values
(lambda ()
(let try ()
(catch 'system-error
thunk
(lambda args
;; Before Guile v2.0.9-39-gfe51c7b, the SIGALRM triggers EINTR
;; because of the bug at
;; <http://lists.gnu.org/archive/html/guile-devel/2013-06/msg00050.html>.
;; When that happens, try again. Note: SA_RESTART cannot be
;; used because of <http://bugs.gnu.org/14640>.
(if (= EINTR (system-error-errno args))
(begin
;; Wait a little to avoid bursts.
(usleep (random 3000000 %random-state))
(try))
(apply throw args))))))
(lambda result
(alarm 0)
(sigaction SIGALRM SIG_DFL)
(apply values result))))
(thunk))))
(define-syntax-rule (catch-system-error exp)
(catch 'system-error
(lambda () exp)
(const #f)))
(define http-response-error?
(let ((kind-and-args-exception?
(exception-predicate &exception-with-kind-and-args)))
(lambda (exception)
"Return true if EXCEPTION denotes an error with the http response"
(->bool
(memq (exception-kind exception)
'(bad-response bad-header bad-header-component))))))
(define %fetch-timeout
;; Number of seconds after which networking is considered "slow".
5)
(define* (download-nar narinfo destination
#:key deduplicate? print-build-trace?
(fetch-timeout %fetch-timeout)
fast-decompression?
(open-connection-for-uri guix:open-connection-for-uri)
(keep-alive? #f))
"Download the nar prescribed in NARINFO, which is assumed to be authentic
and authorized, and write it to DESTINATION. When DEDUPLICATE? is true, and
if DESTINATION is in the store, deduplicate its files. Use
OPEN-CONNECTION-FOR-URI to open connections."
(define destination-in-store?
(string-prefix? (string-append (%store-prefix) "/")
destination))
(define (dump-file/deduplicate* . args)
;; Make sure deduplication looks at the right store (necessary in test
;; environments).
(apply dump-file/deduplicate
(append args (list #:store (%store-prefix)))))
(define (fetch uri)
(case (uri-scheme uri)
((file)
(let ((port (open-file (uri-path uri) "r0b")))
(values port
(stat:size (stat port))
#t)))
((http https)
;; Test this with:
;; sudo tc qdisc add dev eth0 root netem delay 1500ms
;; and then cancel with:
;; sudo tc qdisc del dev eth0 root
(with-timeout fetch-timeout
(begin
(warning (G_ "while fetching ~a: server is somewhat slow~%")
(uri->string uri))
(warning (G_ "try `--no-substitutes' if the problem persists~%")))
(let loop ((port (open-connection-for-uri uri))
(attempt 0))
(guard (c ((or (network-error? c)
(http-response-error? c))
(close-port port)
;; Perform a single retry in the case of an error,
;; mostly to mimic the behaviour of
;; with-cached-connection
(if (= attempt 0)
(loop (open-connection-for-uri uri) 1)
(raise c))))
(let ((port
response
(http-fetch uri #:text? #f
#:port port
#:keep-alive? keep-alive?
#:buffered? #f)))
(values port
(response-content-length response)
(or
(memq 'close
(response-connection response))
(not keep-alive?))))))))
(else
(raise
(formatted-message
(G_ "unsupported substitute URI scheme: ~a~%")
(uri->string uri))))))
(define (try-fetch choices)
(match choices
(((uri compression file-size) rest ...)
(guard (c ((and (pair? rest)
(or (http-get-error? c)
(network-error? c)))
(warning (G_ "download from '~a' failed, trying next URL~%")
(uri->string uri))
(try-fetch rest)))
(let ((port download-size close? (fetch uri)))
(unless print-build-trace?
(format (current-error-port)
(G_ "Downloading ~a...~%") (uri->string uri)))
(values port uri compression download-size close?))))
(()
(raise
(formatted-message
(G_ "no valid nar URLs for ~a at ~a~%")
(narinfo-path narinfo)
(narinfo-uri-base narinfo))))))
;; Delete DESTINATION first--necessary when starting over after a failed
;; download.
(catch-system-error (delete-file-recursively destination))
(let ((choices (narinfo-preferred-uris narinfo
#:fast-decompression?
fast-decompression?)))
;; 'guix publish' without '--cache' doesn't specify a Content-Length, so
;; DOWNLOAD-SIZE is #f in this case.
(let* ((raw uri compression download-size close? (try-fetch choices))
(progress
(let* ((dl-size (or download-size
(and (equal? compression "none")
(narinfo-size narinfo))))
(reporter (if print-build-trace?
(progress-reporter/trace
destination
(uri->string uri) dl-size
(current-error-port))
(progress-reporter/file
(uri->string uri) dl-size
(current-error-port)
#:abbreviation nar-uri-abbreviation))))
;; Keep RAW open upon completion so we can later reuse
;; the underlying connection. Pass the download size so
;; that this procedure won't block reading from RAW.
(progress-report-port reporter raw
#:close? #f
#:download-size dl-size)))
(input pids
;; NOTE: This 'progress' port of current process will be
;; closed here, while the child process doing the
;; reporting will close it upon exit.
(decompressed-port (string->symbol compression)
progress))
;; Compute the actual nar hash as we read it.
(algorithm expected (narinfo-hash-algorithm+value narinfo))
(hashed get-hash (open-hash-input-port algorithm input)))
;; Unpack the Nar at INPUT into DESTINATION.
(restore-file hashed destination
#:dump-file (if (and destination-in-store?
deduplicate?)
dump-file/deduplicate*
dump-file))
(close-port hashed)
(close-port input)
;; Wait for the reporter to finish.
(every (compose zero? cdr waitpid) pids)
(when close?
(close-port raw))
(values expected
(get-hash)))))
;;; Local Variables:
;;; eval: (put 'with-timeout 'scheme-indent-function 1)
;;; End:
;;; substitutes.scm ends here
+18 -4
View File
@@ -618,16 +618,30 @@ System: mips64el-linux\n")))
(with-narinfo* (string-append %narinfo "Signature: " (signature-field %narinfo))
%main-substitute-directory
(define (compress input output compression)
(call-with-output-file output
(lambda (port)
(call-with-compressed-output-port compression port
(lambda (port)
(call-with-input-file input
(lambda (input)
(dump-port input port))))))))
;; This test is dependent on which nar the substitute script picks to
;; request first
(with-http-server `((200 ,(string-append %narinfo "Signature: "
(signature-field %narinfo)
"\n"
"URL: example.nar.lz\n"
"Compression: lzip\n"))
(404 "Sorry, nar.lz is missing!")
(200 ,(call-with-input-file
(string-append %main-substitute-directory
"/example.nar")
get-bytevector-all)))
(200 ,(let ((nar (string-append
%main-substitute-directory
"/example.nar")))
(compress nar (string-append nar ".lz") 'lzip)
(call-with-input-file
(string-append nar ".lz")
get-bytevector-all))))
(dynamic-wind
(const #t)
(lambda ()