summaryrefslogtreecommitdiff
path: root/guix/utils.scm
AgeCommit message (Collapse)Author
2026-02-20gnu: Use (target-32bit?) to test for 32bit targets.Dariqq
* gnu/packages/*.scm: Replace usage of target-64bit? when actually testing for 32bit targets. * guix/utils.scm (target-hurd32?). Same. Change-Id: If3ed2b82a1229b72b07fafc694eedc14080e5a04 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #5710
2026-02-20utils: Add target-32bit? procedure.Dariqq
* guix/utils.scm (target-32bit?): New procedure. Change-Id: Ifd31e404ab91fbcba96803983de832056f8a9097 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2026-02-20bootstrap: Support bpf for cross compilation.Danny Milosavljevic
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add bpf-none. * guix/utils.scm (target-bpf?): New variable. Closes: guix/guix#6114 Change-Id: I831a764aec9f02baf0b5b1e68d89e1bb6671f471
2025-11-03utils: Define 'target-hurd32?' predicate.Yelninei
* guix/utils.scm (target-hurd32?): New predicate. Change-Id: I19e5b2d4e76b1c5b8c233c21397b48daf9619239 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-03utils: Actually check the target in target-hurd64?.Yelninei
* guix/utils.scm (target-hurd64?): Check the target argument. Change-Id: Ic303e7d6e8284767c2a55411c68c043c3d18c04f Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-23gexp: Make 'local-file' follow symlinks.Nigko Yerden
Fix <https://lists.gnu.org/archive/html/guix-devel/2024-08/msg00047.html> via making 'current-source-directory' always follow symlinks. * guix/utils.scm (absolute-dirname, current-source-directory): Make them follow symlinks. * tests/gexp.scm ("local-file, load through symlink"): New test. Fixes: guix/guix#3523 Change-Id: Ieb30101275deb56b7436df444f9bc21d240fba59 Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
2025-09-18Reapply "Update Maxim's email address."Maxim Cournoyer
This reverts commit a7db92d9b389cbe565395523882c34c6eff2c21a, this time with the more careful command, to avoid a world rebuild: grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \ --exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com | xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g' Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
2025-09-18Revert "Update Maxim's email address."Maxim Cournoyer
This reverts commit d0d87a744d724b7e7d5ac013c586039652087bb3. Oops! This caused a world rebuild. Change-Id: I25fff644b2b61d0ee93d69b457b04c72b5b74d15
2025-09-18Update Maxim's email address.Maxim Cournoyer
The change was automated via: git grep -l maxim.cournoyer@gmail.com | xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g' * .mailmap: New entry. Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
2025-08-21scripts: import: Support expressions defined by 'define.Hilton Chain
* guix/utils.scm (find-definition-location): New procedure. (find-definition-insertion-location): Define with it. * guix/scripts/import.scm (import-as-definitions, guix-import): Support expressions defined by 'define. Change-Id: I03118e1a3372028b4f0530964aba871b4a1a4d25
2025-04-14utils: Add #:sync? parameter to ‘with-atomic-file-output’.Ludovic Courtès
* guix/utils.scm (with-atomic-file-output): Add #:sync? and honor it. Add ‘force-output’ call. Change-Id: I2479778ae55360c0fab3389ac9249045a27b3568
2025-02-19guix: Fix some misspellings.Efraim Flashner
Change-Id: Ia036217dadc1624c5f0d59fd44f646d46315c1f3
2025-01-25utils: target-64bit?: Add loongarch64 case.Zheng Junjie
* guix/utils.scm (target-64bit?): Add loongarch64 case. Change-Id: Ide3ae539d8717b11b05e410c76c97fa7bbdae008
2025-01-25utils: Add target-loongarch64?.Zheng Junjie
* guix/utils.scm (target-loongarch64): New procedure. Change-Id: I8d21bcf04d479937039f6f507b5460bb560fd8ec
2024-12-30import: utils: Move downstream-package-name to (guix utils).Herman Rimm
* guix/import/elpa.scm: Import (guix utils). * guix/import/texlive.scm: Import (guix utils). * guix/import/utils.scm (downstream-package-name): Move to ... * guix/utils.scm (downstream-package-name): ... here. Change-Id: If56a452f64ed06c8bb06a96a283a5067cb54d602 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-12-03gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd.Janneke Nieuwenhuizen
This enables building packages in a 64bit childhurd. It will not enable offloading to a childhurd. * guix/utils.scm (host-hurd?, host-x86-64, host-hurd64?): New procedures. * gnu/packages/commencement.scm (gcc-toolchain): Use them to determine if the host is a 64bit Hurd, and use gcc-toolchain-14. * gnu/packages/gcc.scm (gcc): Likewise, to use gcc-14. Change-Id: I55e43fdc61e3ea5fc13065fc7ca854b951c94930
2024-12-03gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.Janneke Nieuwenhuizen
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Update comment on where to find shared linker name. (make-raw-bag): Also use raw-build-guile3 when building for the 64bit Hurd. * gnu/packages/cross-base.scm (cross-kernel-headers*): Use target-hurd? instead of custom "i586..." matching to also use xhurd-core-headers for target-hurd64. * gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc) [native-inputs]: Move final-inputs before cross-packages. (%binutils-static)[arguments]: When building for the 64bit Hurd, add "lt_cv_prog_compiler_static_works=yes", "lt_cv_prog_compiler_static_works_CXX=yes" to #:make-flags to convince to actually link the binaries statically. (make-guile-static)[arguments]: When building for the 64bit Hurd, add "lt_cv_prog_compiler_static_works=yes" to #:configure-flags to convince libtool to actually link guile statically. * guix/platforms/x86.scm (x86_64-gnu): New exported variable. * guix/utils.scm (target-hurd64? system-hurd64?): New procedures.
2024-09-12utils: ‘compressed-file?’ recognizes .zst and .tzst.Ludovic Courtès
This ensures ‘guix publish’ does not re-compress zst files. * guix/utils.scm (compressed-file?): Add ‘tzst’ and ‘zst’. Change-Id: Iae39e8826f1fc242d2e15d86c82a8ff84797002e
2024-04-15utils: Don’t re-export ‘call-with-temporary-output-file’.Ludovic Courtès
* guix/utils.scm: Remove re-export of ‘call-with-temporary-output-file’. Autoload a number of modules. * guix/download.scm, guix/import/hackage.scm, guix/import/hexpm.scm, guix/import/opam.scm, guix/import/pypi.scm, tests/cpio.scm, tests/egg.scm, tests/opam.scm, tests/publish.scm, tests/store-database.scm, tests/utils.scm: Adjust imports accordingly. Change-Id: I3f5e94631397996a30be2ea4ff8b50a3371e8ee7
2024-02-23utils: Add find-definition-insertion-location procedure.Herman Rimm
* guix/utils.scm (find-definition-insertion-location): Add and export procedure. * tests/utils.scm ("find-definition-insertion-location"): Add test. Change-Id: Ie17e1b4a94790f58518ce121411a38d357f49feb Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-02-23utils: Add insert-expression procedure.Herman Rimm
* guix/utils.scm (define-module): Use (guix read-print) and export (insert-expression). (insert-expression): Add procedure. * tests/utils.scm ("insert-expression"): Add test. Change-Id: I971a43a78aa6ecaaef33c1a7a0db4b287eb85036 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-04gnu: Add target-x32?.Efraim Flashner
* guix/utils.scm (target-x32?): New procedure. Change-Id: Ia16c7edce64de01d5ccb126c7bd9a6736f327b5f Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2024-01-04gnu: Add support for x86_64-linux-gnux32.Efraim Flashner
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add entry for x86_64-linux-gnux32. * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add configure-flag for x86_64-linux-gnux32. * guix/platforms/x86.scm (x86_64-linux-gnux32): New variable. * guix/utils.scm (gnu-triplet->nix-system): Force x86_64-linux-gnux32 to output a different nix-system than x86_64-linux-gnu. Change-Id: I519fea2f8357e4b9895ede05fe8a5e373e9b034a Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11guix: Add target-avr?.Jean-Pierre De Jesus DIAZ
* guix/utils.scm (target-avr?): New procedure. * tests/utils.scm: Add tests for target-avr? procedure. Change-Id: Iaa0fa97a2b6bc45d45f907f43157f1548a0ba3fa Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-10-26utils: Add 'strip-for-target'.Zheng Junjie
* guix/utils.scm (strip-for-target): New procedure. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-06-17gnu: Use target-hurd?, system-hurd? instead of hurd-target?, hurd-system?.Janneke Nieuwenhuizen
* gnu/packages/hurd.scm (hurd-target?): Remove. (hurd-system?): Move to... * guix/utils.scm (system-hurd?): ...here. * gnu/packages/*: Update all users, removing (gnu packages hurd) include where now unused.
2023-03-20Merge remote-tracking branch 'origin/master' into core-updatesAndreas Enge
2023-03-13guix: Strip #:use-module lists.Ludovic Courtès
This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused.
2023-03-02Merge remote-tracking branch 'savannah/master' into core-updatesChristopher Baines
Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm
2023-02-11utils: Add target-little-endian?.Philip McGrath
* guix/utils.scm (target-little-endian?): New function. * guix/build-system/meson.scm (make-machine-alist): Use it. * gnu/packages/chez.scm (nix-system->pbarch-machine-type): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-11Merge branch 'staging' into core-updatesMarius Bakke
2022-08-05utils: Add target-mips64el?.Vivien Kraus
* guix/utils.scm (target-mips64el?): New function. It detects whether the target system is mips64el. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-05utils: Add as-for-target.Antero Mejr
* guix/utils.scm (as-for-target): New function. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-07-22Merge branch 'staging' into core-updatesMarius Bakke
2022-07-19home: Add -I, --list-installed option.Antero Mejr
* guix/scripts/package.scm (list-installed): New procedure. * guix/scripts/home.scm (%options, show-help): Add '--list-installed'. (process-command): For 'describe' and 'list-generations', honor the 'list-installed option. (display-home-environment-generation): Add #:list-installed-regex and honor it. (list-generations): Likewise. * guix/scripts/utils.scm (pretty-print-table): New argument "left-pad". * doc/guix.texi (Invoking Guix Home): Add information and example for --list-installed flag. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-06-27Merge branch 'master' into core-updatesMarius Bakke
2022-06-25utils: Move switch-symlinks to (guix build utils).Arun Isaac
* guix/utils.scm (switch-symlinks): Move to ... * guix/build/utils.scm (switch-symlinks): ... here. * guix/profiles.scm, guix/scripts/home.scm, guix/scripts/package.scm: Import switch-symlinks from (guix build utils). * guix/scripts/system/reconfigure.scm (switch-system-program): Import (guix build utils) in G-expression.
2022-06-24utils: Define 'target-x86?' predicate.Denis 'GNUtoo' Carikli
* guix/utils.scm (target-x86?): New predicate. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-06-16ui: Improve pager selection logic when less is not installed.Taiju HIGASHI
* guix/ui.scm (find-available-pager): New procedure. (call-with-paginated-output-port): Use it. * guix/utils.scm (call-with-environment-variables): Allow clearing of specified environment variables. * tests/ui.scm (make-empty-file, assert-equals-find-available-pager): New procedures. ("find-available-pager, GUIX_PAGER takes precedence") ("find-available-pager, PAGER takes precedence") ("find-available-pager, 'less' takes precedence") ("find-available-pager, 'more' takes precedence") ("find-available-pager, no pager"): New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-05-31utils: Add a %guix-source-root-directory procedure.Maxim Cournoyer
* guix/utils.scm (%guix-source-root-directory): New procedure.
2022-05-31utils: Add a 'delete-expression' procedure.Maxim Cournoyer
* guix/utils.scm: Fix copyright lines and order imports. (edit-expression): Fix typo in doc. Add a new 'include-trailing-newline?' keyword argument. Update doc. (delete-expression): New procedure.
2022-03-18utils: Add ar-for-target and ld-for-target procedures.Maxim Cournoyer
* guix/utils.scm (ar-for-target, ld-for-target): New procedures.
2022-01-26utils: 'edit-expression' reads and conses less when not modifying.Ludovic Courtès
* guix/utils.scm (edit-expression): Delay call to 'get-bytevector-all' until after (string=? str* str).
2022-01-14gnu: bootstrap: Add support for riscv64-linux.Efraim Flashner
On 7d93b21ab1c132990054372a9677c1639d54e631 gnu: glibc-for-bootstrap: Update patch. Run ./pre-inst-env guix build --target=riscv64-linux-gnu bootstrap-tarballs Producing /gnu/store/4hdzva9i0wyyfbgj1lmqc1wkk644pv07-bootstrap-tarballs-0 With guix hash -rx 1nj0fdgj08bbmfny01mp2blv7c3p2iciqh31zmf04ap5s7ygsqlp * gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for riscv64-linux. (%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add entry for riscv64-linux. (raw-build-guile3): New procedure. (make-raw-bag): Use raw-build-guile3 for riscv64-linux. * guix/packages.scm (%supported-systems): Add riscv64-linux. (%cuirass-supported-systems): Remove riscv64-linux. * guix/utils.scm (target-64bit?): Add riscv64-linux. * m4/guix.m4: Add riscv64-linux as a supported system. * doc/guix.texi (GNU Distribution): Add riscv64-linux.
2021-12-30utils: Fix URL in comment.Tobias Geerinckx-Rice
* guix/utils.scm (target-x86-32?): Fix Wikipedia URL.
2021-10-10utils: Define 'target-riscv64?' predicate.Efraim Flashner
* guix/utils.scm (target-riscv64?): New predicate.
2021-08-17utils: Define target-ppc64le? predicate.Efraim Flashner
* guix/utils.scm (target-ppc64le?): New predicate.
2021-08-17utils: Define 'target-ppc32?' predicate.Efraim Flashner
* guix/utils.scm (target-ppc32?): New predicate.
2021-07-29Merge branch 'master' into core-updates-frozenMarius Bakke
Conflicts: gnu/packages/bioinformatics.scm gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/emacs-xyz.scm gnu/packages/gpodder.scm gnu/packages/music.scm gnu/packages/patches/glibc-bootstrap-system.patch gnu/packages/python-xyz.scm gnu/packages/shells.scm gnu/packages/statistics.scm
2021-07-21utils: Do not request block buffering in pretty-print-table.Maxim Cournoyer
Re-testing 'guix package -A' using the default line buffering set in (guix ui), there doesn't seem to be a performance gain to use block buffering, so remove this extraneous side effect. * guix/utils.scm (pretty-print-table): Do not set buffering mode to block. Reported-by: Ludovic Courtès <ludo@gnu.org>