diff options
97 files changed, 6064 insertions, 6565 deletions
diff --git a/CODEOWNERS b/CODEOWNERS index 0728e2875b..54eb803970 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -346,6 +346,7 @@ gnu/packages/openldap\.scm @guix/sysadmin gnu/packages/openstack\.scm @guix/sysadmin gnu/packages/prometheus\.scm @guix/sysadmin gnu/packages/rdesktop\.scm @guix/sysadmin +gnu/packages/samba\.scm @guix/sysadmin gnu/packages/selinux\.scm @guix/sysadmin gnu/packages/storage\.scm @guix/sysadmin gnu/packages/task-runners\.scm @guix/sysadmin diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 96acdb7a28..eb0f3ee543 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -518,7 +518,7 @@ as ``SICP'', this book is a reference. You can also install it and read it from your computer: @example -guix install sicp info-reader +guix install book-sicp info-reader info sicp @end example @@ -5737,9 +5737,9 @@ packages: guix shell -C gcc-toolchain cmake coreutils grep sed make -- @dots{} @end example -Or perhaps you'll find that you could just as well provide a definition -for your package---@pxref{Defining Packages,,, guix, GNU Guix Reference -Manual}, to learn more on how to do that. +Or perhaps you'll find that you could just as well provide a package +definition for your code---@pxref{Defining Packages,,, guix, GNU Guix +Reference Manual}, to learn more on how to do that. Eventually, you'll have a list of packages that satisfies your needs. diff --git a/etc/teams.scm b/etc/teams.scm index 30dcb74770..a3ec8faaa2 100755 --- a/etc/teams.scm +++ b/etc/teams.scm @@ -982,6 +982,7 @@ packages (e.g. Astronomy, Chemistry, Math, Physics etc.)" "gnu/packages/openstack.scm" "gnu/packages/prometheus.scm" "gnu/packages/rdesktop.scm" + "gnu/packages/samba.scm" "gnu/packages/selinux.scm" "gnu/packages/storage.scm" "gnu/packages/task-runners.scm" diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm index 459c6d58d8..c78a7c5461 100644 --- a/gnu/installer/newt/network.scm +++ b/gnu/installer/newt/network.scm @@ -168,10 +168,12 @@ Do you want to continue anyway?")) (define (check-substitute-availability) "Check that at least one of the Guix substitute servers is available." (define (substitutes-available?) - (common-urls-alive? - (list - "https://bordeaux.guix.gnu.org/nix-cache-info" - "https://ci.guix.gnu.org/nix-cache-info"))) + (or + (file-exists? "/tmp/installer-assume-online") + (common-urls-alive? + (list + "https://bordeaux.guix.gnu.org/nix-cache-info" + "https://ci.guix.gnu.org/nix-cache-info")))) (let* ((full-value 5)) (run-scale-page diff --git a/gnu/local.mk b/gnu/local.mk index 2ee6311ee6..ddbdb80898 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -72,6 +72,7 @@ # Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com> # Copyright © 2024 James Smith <jsubuntuxp@disroot.org> # Copyright © 2025 Nigko Yerden <nigko.yerden@gmail.com> +# Copyright © 2025 Cayetano Santos <csantosb@inventati.org> # # This file is part of GNU Guix. # @@ -298,7 +299,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/fortran-xyz.scm \ %D%/packages/freedesktop.scm \ %D%/packages/freeipmi.scm \ - %D%/packages/fsf.scm \ %D%/packages/ftp.scm \ %D%/packages/fribidi.scm \ %D%/packages/fvwm.scm \ @@ -683,6 +683,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/upnp.scm \ %D%/packages/usb-modeswitch.scm \ %D%/packages/uucp.scm \ + %D%/packages/oneapi.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ %D%/packages/video.scm \ @@ -1948,6 +1949,7 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-4.09-multiple-definitions.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/oneko-remove-nonfree-characters.patch \ + %D%/packages/patches/onetbb-other-arches.patch \ %D%/packages/patches/online-judge-tools.patch \ %D%/packages/patches/onnx-optimizer-system-library.patch \ %D%/packages/patches/onnx-1.13.1-use-system-googletest.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 862eb31364..eac62ffcc1 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -3330,10 +3330,7 @@ and gene expression visualization.") python-scipy python-threadpoolctl python-umap-learn)) - (native-inputs (list python-pytest - python-setuptools - python-sphinx - python-sphinx-rtd-theme)) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/tanaylab/metacells.git") (synopsis "Single-cell RNA Sequencing Analysis") (description "The metacells package implements the improved metacell @@ -3359,8 +3356,7 @@ cells).") (base32 "07sj4x95b5hvx57pw24f80sk4ag4hkg1z6wzym3pzi8n5gn85n1z")))) (build-system pyproject-build-system) (propagated-inputs (list python-ete3 python-numpy python-six)) - (native-inputs (list python-black python-flake8 python-pytest python-twine - python-wheel)) + (native-inputs (list python-pytest)) (home-page "https://github.com/tresoldi/ngesh") (synopsis "Library for phylogenetic tree simulation") (description @@ -8289,19 +8285,18 @@ average nucleotide identity.") (define-public python-pyahocorasick (package (name "python-pyahocorasick") - (version "2.1.0") + (version "2.2.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/WojciechMula/pyahocorasick") - (commit version))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1fsnivwcw56q7lwz41c5kbfvxv0v17mmkx43i2a293l49fxj08j8")))) + (base32 "0r9n8awy80dg8dmgza4kpgwbpkvjf4s85cyswnq04h3x6cf62lll")))) (build-system pyproject-build-system) - (native-inputs (list python-pytest python-twine python-setuptools - python-wheel)) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/WojciechMula/pyahocorasick") (synopsis "Library for finding multiple key strings in text") (description @@ -22323,19 +22318,19 @@ multiple experimental contexts.") (define-public vbz-compression (package (name "vbz-compression") - (version "1.0.3") + (version "1.0.13") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nanoporetech/vbz_compression/") - (commit (string-append "v" version)) + (commit version) ;; We include the streamvbyte sources (recursive? #true))) (file-name (git-file-name name version)) (sha256 (base32 - "1rn5d98flvjblhj4zjpcdqqh8qlgsh5cmb13i49fnm187p03097z")))) + "1jf5i5v0h58s7w6rhgi4w1vvxnk9jzbgmiic14d48ngr204m0w5c")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -22365,8 +22360,8 @@ effective when applied to the signal dataset.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/nanoporetech/ont_fast5_api") - (commit (string-append "release_" version)))) + (url "https://github.com/nanoporetech/ont_fast5_api") + (commit (string-append "release_" version)))) (file-name (git-file-name name version)) (sha256 (base32 @@ -22376,15 +22371,17 @@ effective when applied to the signal dataset.") '(delete-file-recursively "ont_fast5_api/vbz_plugin")))) (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'copy-plugin - (lambda* (#:key inputs #:allow-other-keys) - (mkdir-p "ont_fast5_api/vbz_plugin/") - (install-file (string-append - (assoc-ref inputs "vbz-compression") - "/hdf5/lib/plugin/libvbz_hdf_plugin.so") - "ont_fast5_api/vbz_plugin/")))))) + (list + #:test-backend #~'unittest + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-plugin + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "ont_fast5_api/vbz_plugin/") + (install-file (string-append + #$(this-package-input "vbz-compression") + "/hdf5/lib/plugin/libvbz_hdf_plugin.so") + "ont_fast5_api/vbz_plugin/")))))) (inputs (list vbz-compression)) (propagated-inputs diff --git a/gnu/packages/books.scm b/gnu/packages/books.scm index ada2cfe060..75ef1620cf 100644 --- a/gnu/packages/books.scm +++ b/gnu/packages/books.scm @@ -1,7 +1,17 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2023, 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2020 Marius Bakke <marius@gnu.org> +;;; Copyright © 2022 jgart <jgart@dismail.de> ;;; Copyright © 2023 Adam Faiz <adam.faiz@disroot.org> +;;; Copyright © 2023 Maxim Cournoyer <maxim@guixotic.coop> +;;; Copyright © 2023 宋文武 <iyzsong@envs.net> +;;; Copyright © 2023-2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; Copyright © 2025 Gabriel Santos <gabrielsantosdesouza@disroot.org> +;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +31,9 @@ (define-module (gnu packages books) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) + #:use-module (guix deprecation) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) @@ -50,11 +62,105 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tex) + #:use-module (gnu packages texinfo) #:use-module (gnu packages texlive) #:use-module (gnu packages version-control) #:use-module (gnu packages webkit) #:use-module (gnu packages xml)) +(define-public book-faif + (package + (name "book-faif") + (version "2.0") + (source (origin + (method url-fetch) + (uri (string-append "https://www.fsf.org/faif/faif-" version + ".tar.bz2")) + (sha256 + (base32 + "0qf14d0n6k1dn9z0fdnx9qkhn4iq685xd443w7l7w54bm931p7dw")))) + (build-system copy-build-system) + (native-inputs + (list (texlive-local-tree + (list texlive-caption + texlive-endnotes + texlive-etoolbox + texlive-fncychap + texlive-helvetic + texlive-times + texlive-ucs)))) + (arguments + (list + #:install-plan #~'(("faif-2.0.pdf" "share/doc/faif/")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'writable-texmfvar + ;; Generating font shapes require a writable TEXMFVAR directory. + (lambda _ (setenv "TEXMFVAR" "/tmp"))) + (add-before 'install 'build + (lambda _ + (invoke "pdflatex" "faif-2.0.tex")))))) + (home-page "https://www.fsf.org/faif") + (synopsis "Free as in Freedom (2.0)") + (description + "In 2002, Sam Williams wrote Free as in Freedom, a biography of Richard +M. Stallman. In its epilogue, Williams expressed hope that choosing to +distribute his book under the GNU Free Documentation License would enable and +encourage others to share corrections and their own perspectives through +modifications to his work. Free as in Freedom (2.0) is Stallman's revision of +the original biography. While preserving Williams's viewpoint, it includes +factual corrections and extensive new commentary by Stallman, as well as new +prefaces by both authors written for the occasion. It is a rare kind of +biography, where the reader has the benefit of both the biographer's original +words and the subject's response.") + (license license:fdl1.3+))) + +(define-public book-sicp + (let ((commit "bda03f79d6e2e8899ac2b5ca6a3732210e290a79") + (revision "3")) + (package + (name "book-sicp") + (version (git-version "20180718" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sarabander/sicp") + (commit commit))) + (sha256 + (base32 + "0mng7qrj2dvssyffr9ycnf4a5k0kadp4dslq7mc5bhzq1qxyjs2w")) + (file-name (git-file-name name version)))) + (build-system copy-build-system) + (native-inputs (list gzip texinfo)) + (arguments + (list #:install-plan ''(("html" "share/doc/sicp/") + ("sicp.info" "share/info/")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'remove-obsolete-commands + (lambda _ + ;; Reported upstream: + ;; https://github.com/sarabander/sicp/issues/46. + (substitute* "sicp-pocket.texi" + (("@setshortcontentsaftertitlepage") + "")))) + (add-before 'install 'build + (lambda _ + (invoke "makeinfo" "--no-split" + "--output=sicp.info" + "sicp-pocket.texi")))))) + (home-page "https://sarabander.github.io/sicp") + (synopsis "Structure and Interpretation of Computer Programs") + (description "Structure and Interpretation of Computer Programs (SICP) is +a textbook aiming to teach the principles of computer programming. + +Using Scheme, a dialect of the Lisp programming language, the book explains +core computer science concepts such as abstraction in programming, +metalinguistic abstraction, recursion, interpreters, and modular programming.") + (license license:cc-by-sa4.0)))) + +;; It may be removed after 2025-12-19. +(define-deprecated/public-alias sicp book-sicp) + (define-public book-sparc (package (name "book-sparc") diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 62e70e1e91..f043209a83 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2021 David Dashyan <mail@davie.li> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> ;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org> -;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com> +;;; Copyright © 2022, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech> ;;; Copyright © 2022 ( <paren@disroot.org> ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org> @@ -958,17 +958,17 @@ replacement for the syslog() call, but retains its ease of use.") (define-public liblognorm (package (name "liblognorm") - (version "2.0.6") + (version "2.0.7") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/rsyslog/liblognorm.git") + (url "https://github.com/rsyslog/liblognorm") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1pyy1swvq6jj12aqma42jimv71z8m66zy6ydd5v19cp2azm4krml")))) + "1syh3lx58q6izzgmpq8pj4j5aw6qr5nzplnmk42f2alrw38sprd5")))) (build-system gnu-build-system) (arguments (list diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 68603cf9fa..a91e350b54 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -156,15 +156,12 @@ using the CMake build system.") (define %common-disabled-tests/hurd '("CTestTestTimeout" "CTestTestRerunFailed" - "RunCMake.CompilerChange" "RunCMake.ctest_test" - "RunCMake.file" - "RunCMake.BundleUtilities" - "RunCMake.configure_file" "RunCMake.CTestTimeout" "RunCMake.CTestTimeoutAfterMatch" - "RunCMake.CommandLine" - "RunCMake.CTestCommandLine")) + "RunCMake.CTestCommandLine" + ;; Fixed in v4.0.0 + "RunCMake.RuntimePath")) (define %preserved-third-party-files '(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must @@ -247,15 +244,7 @@ using the CMake build system.") ;; CMake uses its own configure script. (replace 'configure (lambda* (#:key (configure-flags '()) #:allow-other-keys) - (apply invoke "./configure" configure-flags))) - #$@(if (target-hurd?) - #~((add-after 'unpack 'patch-hurd - (lambda _ - ;; Version 3.25.0 has a similar fix. - (substitute* "Utilities/cmlibuv/src/unix/udp.c" - (("!defined\\(__QNX__\\)") - "!defined(__GNU__)"))))) - #~())))) + (apply invoke "./configure" configure-flags)))))) (inputs (list bzip2 curl diff --git a/gnu/packages/cybersecurity.scm b/gnu/packages/cybersecurity.scm index 6b736f6f30..86fec0f2f6 100644 --- a/gnu/packages/cybersecurity.scm +++ b/gnu/packages/cybersecurity.scm @@ -110,7 +110,7 @@ Refresh}in-DRAM mitigations effectively and as such can trigger bit flips.") (define-public gallia (package (name "gallia") - (version "1.9.0") + (version "2.0.0b2") (source (origin (method git-fetch) @@ -119,10 +119,11 @@ Refresh}in-DRAM mitigations effectively and as such can trigger bit flips.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "11pyq2jn0py6n4xi5yxbsazybbdn9m8fgllqmfrsiqg9k96i6cwb")))) + (base32 "0bf9zq89dcnnm8ir322l69assrhxrspa97m7yk153q0vv9vib6q9")))) (build-system pyproject-build-system) (arguments (list + #:build-backend "poetry.core.masonry.api" ;XXX: python-uv-build is required ;; NOTE: Test steps are sourced from GitHub Actions attached to the ;; project. This is a minimal test suite, more precise tests require ;; setting up local service with Bats (Bash Automated Testing System) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index a16346a8f8..0fe8e96287 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -203,13 +203,13 @@ your project into different processes.") (define-public python-django (package (name "python-django") - (version "5.2.6") + (version "5.2.7") (source (origin (method url-fetch) (uri (pypi-uri "django" version)) (sha256 - (base32 "0yx82k8iilz8l6wkdvjcrz75i144lf211xybrrrks6b34wvh0pns")))) + (base32 "1pbc6pdb32gr30djr1jrw1xwvfwir9k16fm6jmm73cai4lpg3xp0")))) (build-system pyproject-build-system) (arguments '(#:test-flags diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0b435993ef..de6c340a11 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> +;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,12 +38,17 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system meson) #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages m4) #:use-module (gnu packages pkg-config) @@ -391,6 +397,60 @@ changed.") (substitute* "tests/set-empty-rpath.sh" (("^\\$\\{SCRATCH\\}\\/simple.$") "")))))))))) +(define-public pax-utils + (package + (name "pax-utils") + (version "1.3.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://anongit.gentoo.org/git/proj/pax-utils.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vxklqnabhy15idrg5s2m07lk1hqyf9fnvsfy66n2rdmqijn5rvw")))) + (build-system meson-build-system) + (arguments + (list + #:modules '((guix build meson-build-system) + (guix build utils) + (srfi srfi-26)) + #:configure-flags #~(list "-Dlddtree_implementation=sh") + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-lddtree + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((needed-bin + (map (cut string-append <> "/bin") + (list #$(this-package-input "coreutils-minimal") + #$(this-package-input "gawk") + #$(this-package-input "sed") + #$output))) + (PATH `("PATH" = (,@needed-bin)))) + (for-each (lambda (p) + (wrap-program + (search-input-file outputs + (string-append "bin/" p)) + PATH)) + (list "lddtree" "symtree")))))))) + (native-inputs (list docbook-xsl xmlto)) + (inputs (list bash-minimal coreutils-minimal gawk sed)) + (home-page "https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities") + (synopsis "ELF integrity and security-focused utils") + (description "The pax-utils package contains a small set of utilities +for performing mostly security checks on systems. It is focused on the ELF +format. The included utilities are: +@table @command +@item pspax List ELF/PaX information about running processes +@item scanelf Scan ELF binaries +@item dumpelf Dump internal ELF structure +@item scanmacho Scan Mach-O binaries +@item symtree Display libraries that satisfy undefined symbols, as a tree +@item lddtree Display ELF dependencies as a tree. +@end table") + (license license:gpl2+))) + (define-public libdwarf (package (name "libdwarf") diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 65c4019dc4..92eae83f37 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -12912,7 +12912,7 @@ generates it as a string. Please see the homepage for usage examples.") (emacs-substitute-variables "jedi-core.el" ("jedi:server-command" `(list ,(search-input-file outputs "bin/jediepcserver"))))))))) - (native-inputs (list emacs-mocker python-wrapper python-tox)) + (native-inputs (list emacs-mocker python-wrapper)) (inputs (list python-wrapper python-epc python-jedi)) ;wrapped (propagated-inputs (list emacs-auto-complete emacs-python-environment emacs-epc)) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 889de1cb43..719a861f84 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3838,6 +3838,10 @@ program that can perform mesh processing tasks in batch mode, without a GUI.") "/share/vim/vimfiles/pack/guix/start/poke") (string-append "--with-lispdir=" (emacs:elpa-directory #$output))))) + (native-search-paths + (list (search-path-specification + (variable "POKE_LOAD_PATH") + (files '("share/poke/pickles"))))) (home-page "https://www.gnu.org/software/poke/#documentation") (synopsis "Editing of arbitrary binary data") (description "GNU poke is an interactive, extensible editor for binary data. @@ -3846,6 +3850,26 @@ full-fledged procedural, interactive programming language designed to describe data structures and to operate on them.") (license license:gpl3+))) +(define-public poke-elf + (package + (name "poke-elf") + (version "1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/poke/poke-elf-" version + ".tar.gz")) + (sha256 + (base32 + "0x3shih7sjj34f5305kvbp4cfy11m92zwidjk3658m23zkd6gdqa")))) + (build-system gnu-build-system) + (native-inputs (list poke)) ;for the test suite + (home-page "https://jemarch.net/poke-elf") + (synopsis "GNU poke pickle for ELF object files") + (description "@code{poke-elf} is a GNU poke pickle for editing ELF object files, +executables, shared libraries and core dumps. It supports many architectures +and extensions.") + (license license:gpl3+))) + (define-public emacs-poke ;; The 'emacs-poke' name may eventually refer to 'poke' from ELPA, which is ;; a different beast. diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index f022948957..4cb04d3110 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -443,47 +443,6 @@ embedded systems.") Libraries stack (eo, evas, ecore, edje, emotion, ethumb and elementary).") (license license:lgpl3))) -(define-public edi - (package - (name "edi") - (version "0.8.0") - (source - (origin - (method url-fetch) - (uri (string-append "https://github.com/Enlightenment/edi/releases/" - "download/v" version "/edi-" version ".tar.xz")) - (sha256 - (base32 - "01k8gp8r2wa6pyg3dkbm35m6hdsbss06hybghg0qjmd4mzswcd3a")))) - (build-system meson-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-clang-header - (lambda _ - (substitute* "scripts/clang_include_dir.sh" - (("grep clang") "grep clang | head -n1")) - #t)) - (add-after 'unpack 'set-home-directory - ;; FATAL: Cannot create run dir '/homeless-shelter/.run' - errno=2 - (lambda _ (setenv "HOME" "/tmp") #t))) - #:tests? #f)) ; tests require running dbus service - (native-inputs - `(("check" ,check) - ("gettext" ,gettext-minimal) - ("pkg-config" ,pkg-config))) - (inputs - (list clang efl)) - (home-page "https://www.enlightenment.org/about-edi") - (synopsis "Development environment for Enlightenment") - (description "EDI is a development environment designed for and built using -the EFL. It's aim is to create a new, native development environment for Linux -that tries to lower the barrier to getting involved in Enlightenment development -and in creating applications based on the Enlightenment Foundation Library suite.") - (license (list license:public-domain ; data/extra/skeleton - license:gpl2 ; edi - license:gpl3)))) ; data/extra/examples/images/mono-runtime.png - (define-public ephoto (package (name "ephoto") diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index a831ca4166..b39747fccb 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2023 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016-2018, 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> -;;; Copyright © 2016, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> +;;; Copyright © 2016, 2020, 2024, 2025 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au> ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com> @@ -110,6 +110,7 @@ #:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-web) #:use-module (gnu packages haskell-xyz) + #:use-module (gnu packages iso-codes) #:use-module (gnu packages jemalloc) #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) @@ -1588,6 +1589,30 @@ The module also includes implementations of the Verhoeff, Luhn and family of ISO/IEC 7064 check digit algorithms.") (license license:lgpl2.1+))) +(define-public python-schwifty + (package + (name "python-schwifty") + (version "2025.9.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "schwifty" version)) + (sha256 + (base32 "16d0q1yzrh9fn6ybbsvhr9wbgld27rvn152w4wdcibidq2jbi0s2")))) + (build-system pyproject-build-system) + (native-inputs (list python-hatchling python-hatch-vcs python-pytest + python-pydantic-2)) + (propagated-inputs (list python-importlib-resources python-pycountry + python-rstr python-typing-extensions)) + (home-page "http://github.com/mdomke/schwifty/") + (synopsis "Python module to work with IBANs and BICs") + (description + "schwifty is a Python library that let's you easily work with +IBANs and BICs as specified by the ISO. IBAN is the Internation Bank Account +Number and BIC the Business Identifier Code. Both are used for international +money transfer.") + (license license:expat))) + (define-public python-duniterpy (package (name "python-duniterpy") @@ -2215,14 +2240,10 @@ from account statements and other documents and for managing documents.") python-werkzeug)) (native-inputs (list python-babel - python-mypy python-pytest - python-pytest-cov python-setuptools - python-twine python-types-setuptools - python-types-simplejson - python-wheel)) + python-types-simplejson)) (home-page "https://beancount.github.io/fava/") (synopsis "Web interface for the accounting tool Beancount") (description "Fava is a web interface for the double-entry bookkeeping @@ -2482,6 +2503,24 @@ format used by SWIFT. It returns smart Python collections for statistics and manipulation.") (license license:bsd-3))) +(define-public python-mt940 + (package + (name "python-mt940") + (version "0.6.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mt940" version)) + (sha256 + (base32 "00w9m06wxxqg9w1bkddqr6yl6ajlzhbiryqzijax64l6sks6ml6g")))) + (build-system pyproject-build-system) + (native-inputs (list python-setuptools-67 python-wheel-0.40)) + (home-page "http://mt940.b2ck.com/") + (synopsis "A simple module to parse MT940 files") + (description "This package provides a simple module to parse MT940 +files.") + (license license:bsd-3))) + (define-public xmrig (package (name "xmrig") diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 79c34ef8aa..0b37502321 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2025 Simen Endsjø <contact@simendsjo.me> ;;; ;;; This file is part of GNU Guix. ;;; @@ -248,7 +249,7 @@ used in the process of installing and updating firmware.") (define-public fwupd (package (name "fwupd") - (version "1.8.14") + (version "1.9.32") (source (origin (method git-fetch) (uri (git-reference @@ -257,7 +258,7 @@ used in the process of installing and updating firmware.") (file-name (git-file-name name version)) (sha256 (base32 - "179yc0nbbyrdya5q16ncf7lkslrhr3i90rgb9vdmv751ikilkby6")))) + "0nabjgskbpinj7sj44kblnd8g6psppas4g8qgajfs3p19skp07y1")))) (build-system meson-build-system) (arguments (list @@ -280,7 +281,11 @@ used in the process of installing and updating firmware.") #~(modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ - (for-each make-file-writable + (for-each (lambda (file) + ;; Skip symlinks as `make-file-writable' fails for those. + (unless (eq? 'symlink (stat:type (lstat file))) + (format #t "Make writable: ~A~%" file) + (make-file-writable file))) (find-files ".")) (substitute* "src/fu-self-test.c" (("/bin/sh") @@ -332,6 +337,7 @@ used in the process of installing and updating firmware.") "/libexec/fwupd/efi") (string-append #$output "/libexec/fwupd/efi"))))))) (native-inputs (list gobject-introspection + python-jinja2 python-pygobject python-pillow python-pycairo diff --git a/gnu/packages/fsf.scm b/gnu/packages/fsf.scm deleted file mode 100644 index 33181e5927..0000000000 --- a/gnu/packages/fsf.scm +++ /dev/null @@ -1,72 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2023 宋文武 <iyzsong@envs.net> -;;; -;;; 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 (gnu packages fsf) - #:use-module (gnu packages tex) - #:use-module (guix build-system copy) - #:use-module (guix download) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module ((guix licenses) #:prefix license:)) - -(define-public book-faif - (package - (name "book-faif") - (version "2.0") - (source (origin - (method url-fetch) - (uri (string-append "https://www.fsf.org/faif/faif-" version - ".tar.bz2")) - (sha256 - (base32 - "0qf14d0n6k1dn9z0fdnx9qkhn4iq685xd443w7l7w54bm931p7dw")))) - (build-system copy-build-system) - (native-inputs - (list (texlive-local-tree - (list texlive-caption - texlive-endnotes - texlive-etoolbox - texlive-fncychap - texlive-helvetic - texlive-times - texlive-ucs)))) - (arguments - (list - #:install-plan #~'(("faif-2.0.pdf" "share/doc/faif/")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'writable-texmfvar - ;; Generating font shapes require a writable TEXMFVAR directory. - (lambda _ (setenv "TEXMFVAR" "/tmp"))) - (add-before 'install 'build - (lambda _ - (invoke "pdflatex" "faif-2.0.tex")))))) - (home-page "https://www.fsf.org/faif") - (synopsis "Free as in Freedom (2.0)") - (description - "In 2002, Sam Williams wrote Free as in Freedom, a biography of Richard -M. Stallman. In its epilogue, Williams expressed hope that choosing to -distribute his book under the GNU Free Documentation License would enable and -encourage others to share corrections and their own perspectives through -modifications to his work. Free as in Freedom (2.0) is Stallman's revision of -the original biography. While preserving Williams's viewpoint, it includes -factual corrections and extensive new commentary by Stallman, as well as new -prefaces by both authors written for the occasion. It is a rare kind of -biography, where the reader has the benefit of both the biographer's original -words and the subject's response.") - (license license:fdl1.3+))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e03fab8b53..72b26faedd 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -9252,136 +9252,6 @@ You can save humanity and get programming skills!") (home-page "https://colobot.info") (license license:gpl3+))) -(define-public gzdoom - (package - (name "gzdoom") - (version "4.3.2") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/coelckers/gzdoom") - (commit (string-append "g" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0i4hyg72z84fc6ca2ic9q82q5cbgrbd7bynl3kpkypxvyasq08wz")) - (patches (search-patches "gzdoom-search-in-installed-share.patch" - "gzdoom-find-system-libgme.patch")) - (modules '((guix build utils) - (ice-9 regex))) - (snippet - '(begin - ;; Remove files which mustn't be commercially redistributed. See - ;; <https://zdoom.org/wiki/License#Commercial_use>, the ‘Contribution - ;; Guidelines’ at <https://github.com/ZDoom>, and Guix issue #73435. - (for-each - (lambda (directory) - (delete-file-recursively directory) - (substitute* "CMakeLists.txt" - (((string-append "add_subdirectory\\([[:blank:]]*" - directory - "[[:blank:]]*\\)")) - ""))) - '( ;; "wadsrc_extra" ;game_support.pk3 - "wadsrc_bm")) ;brightmaps.pk3 - - ;; Removing game_support.pk3 entirely would break Freedoom & remove - ;; users' ability to play commercial games, despite owning (only) the - ;; non-functional data. That can't be right. Out of an abundance of - ;; caution, remove anything from the PK3 that could conceivably be - ;; derived from copyrightable data that's not freely redistributable. - (display "Keeping only the following game_support.pk3 files:\n") - (let* ((regexps (list "/font\\.inf$" - "/harmony/.*\\.(txt|zs)$" - "/(iwadinfo|mapinfo|sprofs)\\.txt$" - "\\.z$")) - (regexp* (format #f "(~{~a~^|~})" regexps)) - (regexp (make-regexp regexp* regexp/icase))) - (define (keep-file? file stat) - (let ((keep? (regexp-exec regexp file))) - (when keep? - (format #t " ~a~%" file)) - keep?)) - - (for-each delete-file (find-files "wadsrc_extra/static" - (negate keep-file?)))) - - ;; Remove some bundled libraries. XXX There are more, but removing - ;; them would require, at least, patching the build system. - (with-directory-excursion "libraries" - (delete-file-recursively "bzip2") - (delete-file-recursively "game-music-emu") - (delete-file-recursively "jpeg") - (delete-file-recursively "zlib")))))) - (arguments - (list - #:tests? #f - #:configure-flags - #~(list - (string-append - "-DCMAKE_CXX_FLAGS:=" - "-DSHARE_DIR=\\\"" #$output "/share/\\\" " - "-DGUIX_OUT_PK3=\\\"" #$output "/share/games/doom\\\"") - - ;; The build requires some extra convincing not to use the bundled - ;; libgme previously deleted in the soure snippet. - "-DFORCE_INTERNAL_GME=OFF" - - ;; Link libraries at build time instead of loading them at run time. - "-DDYN_OPENAL=OFF" - "-DDYN_FLUIDSYNTH=OFF" - "-DDYN_GTK=OFF" - "-DDYN_MPG123=OFF" - "-DDYN_SNDFILE=OFF") - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'fix-file-names - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/CMakeLists.txt" - (("COMMAND /bin/sh") - (string-append "COMMAND " (which "sh")))) - (substitute* - "libraries/zmusic/mididevices/music_fluidsynth_mididevice.cpp" - (("/usr/share/sounds/sf2/FluidR3_GM.sf2") - (search-input-file inputs - "share/soundfonts/FluidR3Mono_GM.sf3"))) - (substitute* - "libraries/zmusic/mididevices/music_timiditypp_mididevice.cpp" - (("(exename = \")(timidity)(\".*)" _ prefix exe suffix) - (string-append prefix - (search-input-file inputs - (string-append "bin/" exe)) - suffix)))))))) - (build-system cmake-build-system) - (inputs (list bzip2 - fluid-3 - fluidsynth - gtk+ - libgme - libjpeg-turbo - libsndfile - mesa - mpg123 - openal - sdl2 - timidity++ - zlib)) - (native-inputs (list pkg-config unzip)) - (synopsis "Modern Doom 2 source port") - (description "GZdoom is a port of the Doom 2 game engine, with a modern -renderer. It improves modding support with ZDoom's advanced mapping features -and the new ZScript language. In addition to Doom, it supports Heretic, Hexen, -Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.") - (home-page "https://zdoom.org/index") - ;; The source uses x86 assembly - (supported-systems '("x86_64-linux" "i686-linux")) - (license (list license:gpl3+ ; gzdoom game - license:lgpl3+ ; gzdoom renderer - license:expat ; gdtoa - (license:non-copyleft ; modified dumb - "file://dumb/licence.txt" - "Dumb license, explicitly GPL compatible."))))) - (define-public odamex (package (name "odamex") diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 57b81a43eb..67573cf50f 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1574,28 +1574,6 @@ provides the GNU compiler for the Go programming language.") (("(defaultGOROOTValue.*?return `)[^`]+" _ start) (string-append start "/nonexistent")))))))))))) -(define-public gccgo-4.9 - (custom-gcc (package - (inherit gcc-4.9) - (synopsis "Go frontend to GCC") - (description - "This package is part of the GNU Compiler Collection and -provides the GNU compiler for the Go programming language.")) - "gccgo" '("go") - %generic-search-paths - ;; Suppress the separate "lib" output, because otherwise the - ;; "lib" and "out" outputs would refer to each other, creating - ;; a cyclic dependency. <http://debbugs.gnu.org/18101> - #:separate-lib-output? #f)) - -;; Provides go-1.14.6 -(define-public gccgo-10 - (make-gccgo gcc-10)) - -;; Provides go-1.16.5 -(define-public gccgo-11 - (make-gccgo gcc-11)) - ;; Provides go-1.18 (define-public gccgo-12 (make-gccgo gcc-12)) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index fb46ad2acf..daffe656e6 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -240,19 +240,7 @@ color, font attributes (weight, posture), or underlining.") (sha256 (base32 "0kgbm0af7jwpfspa2xxiy9nc2l1r2s1rhbhz4r229zcqv49ak6sq")))) (build-system python-build-system) - (native-inputs - (list python-bump2version - python-flake8 - python-flake8-implicit-str-concat - python-flake8-print - python-isort - python-pytest - python-pytest-cov - python-sphinx - python-sphinx-argparse - python-sphinx-rtd-theme - python-twine - python-yamllint)) + (native-inputs (list python-bump2version python-pytest python-yamllint)) (propagated-inputs (list python-polib python-pymd4c)) (home-page "https://github.com/mondeja/mdpo") diff --git a/gnu/packages/golang-apps.scm b/gnu/packages/golang-apps.scm index d544481391..00cdfaf0e2 100644 --- a/gnu/packages/golang-apps.scm +++ b/gnu/packages/golang-apps.scm @@ -132,6 +132,9 @@ that handle none of the event types.") ;; The TestGoDef/Modules test fails, because of the lack of Go modules ;; support. #:test-flags #~(list "-skip" "TestGoDef/GOPATH|TestGoDef/Modules"))) + (native-inputs + ;; XXX: Remove in the next refresh cycle. + (list go-golang-org-x-tools-go-packages-packagestest)) (inputs (list go-golang-org-x-tools go-ninefans-net-go)) diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm index 445059447d..d21391eb8a 100644 --- a/gnu/packages/golang-build.scm +++ b/gnu/packages/golang-build.scm @@ -91,7 +91,7 @@ interoperate.") (define-public go-github-com-ebitengine-purego (package (name "go-github-com-ebitengine-purego") - (version "0.8.4") + (version "0.9.0") (source (origin (method git-fetch) @@ -100,14 +100,14 @@ interoperate.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0sy5cn56wxwv1qpl6vg5160hlk004m5wdlf18rfnj63573f5kivh")))) + (base32 "0qkjn7xswbfrly8bwryww0jwfdasig9bfx24dnwryz8iakkyww6f")))) (build-system go-build-system) (arguments (list #:import-path "github.com/ebitengine/purego" ;; TODO: This failed test should be proper checked. ;; ld: - ;; /tmp/guix-build-go-github-com-ebitengine-purego-0.8.4.drv-0/ccguQKNs.o: + ;; /tmp/guix-build-go-github-com-ebitengine-purego-0.9.0.drv-0/ccguQKNs.o: ;; relocation R_X86_64_32 against `.bss' can not be used when making a ;; shared object; recompile with -fPIC ld: failed to set dynamic section ;; sizes: bad value collect2: error: ld returned 1 exit status @@ -384,6 +384,34 @@ replace a file or symbolic link.") 1.1: Authentication and Security Services.") (license license:bsd-3))) +(define-public go-github-com-matttproud-golang-protobuf-extensions + (package + (name "go-github-com-matttproud-golang-protobuf-extensions") + (version "1.0.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/matttproud/golang_protobuf_extensions") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xqsf9vpcrd4hp95rl6kgmjvkv1df4aicfw4l5vfcxcwxknfx2xs")))) + (build-system go-build-system) + (arguments + (list + #:skip-build? #t + #:import-path "github.com/matttproud/golang_protobuf_extensions")) + (propagated-inputs + (list go-github-com-golang-protobuf)) + (home-page "https://github.com/matttproud/golang_protobuf_extensions") + (synopsis "Support for streaming Protocol Buffer messages for Golang") + (description + "This package provides various Protocol Buffer extensions for the Go +language (golang), namely support for record length-delimited message +streaming.") + (license license:asl2.0))) + (define-public go-github-com-mmcloughlin-avo (package (name "go-github-com-mmcloughlin-avo") @@ -450,16 +478,17 @@ primitives in Go.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/twitchyliquid64/golang-asm") - (commit (string-append "v" version)))) + (url "https://github.com/twitchyliquid64/golang-asm") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1akw41i0snxqw9lqzmnn4gx6hd5js5dr1vmfkm49wxans4k14vw4")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/twitchyliquid64/golang-asm")) + #:import-path "github.com/twitchyliquid64/golang-asm" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/twitchyliquid64/golang-asm") (synopsis "Assembler from the Go compiler, in library form") (description @@ -471,16 +500,16 @@ library.") (define-public go-github-com-yuin-goldmark (package (name "go-github-com-yuin-goldmark") - (version "1.7.12") + (version "1.7.13") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/yuin/goldmark") - (commit (string-append "v" version)))) + (url "https://github.com/yuin/goldmark") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1qc665b8clfvah62l8bkk473ybng7qzwwibxsq5wskfswv5yaj94")))) + (base32 "183v5bzgwr7ibbj6srnaaq7n98xqifaswa0c01yf693p5l6q3q6m")))) (build-system go-build-system) (arguments (list @@ -529,7 +558,7 @@ library.") (define-public go-golang-org-x-arch (package (name "go-golang-org-x-arch") - (version "0.17.0") + (version "0.22.0") (source (origin (method git-fetch) @@ -538,7 +567,7 @@ library.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "02qwvciikyrssifdp50zbjgqvpkb6sj09jzjvyl1n9v5fvg7mxba")))) + (base32 "14s32fhg9wxvnsnl9szfsbhkxyxcql6dg2qwli055wfly8wly26m")))) (build-system go-build-system) (arguments (list @@ -563,28 +592,47 @@ toolchain. The parts needed in the main Go repository are copied in.") (define-public go-golang-org-x-crypto (package (name "go-golang-org-x-crypto") - (version "0.38.0") + (version "0.43.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/crypto") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/crypto") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1wx7wf3ifb10cx2yckm925a9ydy5bw3iv664cma27abkfssj07ba")) + (base32 "1d49g86ndfzj40nrichhhsknn6lgl1gh8862dmgsx0l0885kik9i")) (modules '((guix build utils))) (snippet #~(begin ;; Submodules with their own go.mod files and packaged separately: ;; - ;; - olang.org/x/crypto/x509roots/fallback - (for-each delete-file-recursively (list "x509roots/fallback")))))) + ;; - golang.org/x/crypto/argon2/_asm + ;; - golang.org/x/crypto/blake2b/_asm/AVX2 + ;; - golang.org/x/crypto/blake2b/_asm/standard + ;; - golang.org/x/crypto/blake2s/_asm + ;; - golang.org/x/crypto/chacha20poly1305/_asm + ;; - golang.org/x/crypto/internal/poly1305/_asm + ;; - golang.org/x/crypto/salsa20/salsa/_asm + ;; - golang.org/x/crypto/sha3/_asm + ;; - golang.org/x/crypto/x509roots/fallback + (for-each delete-file-recursively + (list "argon2/_asm" + "blake2b/_asm/AVX2" + "blake2b/_asm/standard" + "blake2s/_asm" + "chacha20poly1305/_asm" + "internal/poly1305/_asm" + "salsa20/salsa/_asm" + "sha3/_asm" + "x509roots/fallback")))))) (build-system go-build-system) (arguments (list #:skip-build? #t #:import-path "golang.org/x/crypto" + ;; panic: testing: test using t.Setenv or t.Chdir can not use t.Parallel + #:test-flags #~(list "-skip" "TestWithPebble") #:phases #~(modify-phases %standard-phases ;; Network access required: go mod download -json @@ -611,7 +659,8 @@ toolchain. The parts needed in the main Go repository are copied in.") (list go-golang-org-x-net-bootstrap go-golang-org-x-text-bootstrap)) (propagated-inputs - (list go-golang-org-x-sys go-golang-org-x-term)) + (list go-golang-org-x-sys + go-golang-org-x-term)) (home-page "https://go.googlesource.com/crypto/") (synopsis "Supplementary cryptographic libraries in Go") (description @@ -634,8 +683,9 @@ language.") (package (name "go-golang-org-x-exp") ;; Note: Beware, the updater gets this wrong. Take the latest version - ;; string from <https://pkg.go.dev/golang.org/x/exp?tab=versions>. - (version "0.0.0-20250531010427-b6e5de432a8b") + ;; string from <https://pkg.go.dev/golang.org/x/exp?tab=versions>, or try + ;; "guix import go golang.org/x/exp". + (version "0.0.0-20250911091902-df9299821621") (source (origin (method git-fetch) @@ -644,7 +694,7 @@ language.") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0vszjiblb7i79dp9x1zvfpjidnmkzsaq6ij2jfh63hv9ph7yz3hf")) + (base32 "0jmpq16f2d8i3bnwxa78j384vi5gynfajh34m2nh3vhji3d35777")) (modules '((guix build utils))) (snippet #~(begin @@ -667,25 +717,14 @@ language.") #~(list "-skip" (string-join (list - ;; Disable failing tests: error running `go mod init`: - ;; go: modules disabled by GO111MODULE=off. + ;; gorelease_test.go:310: error running `go mod init`: go: + ;; modules disabled by GO111MODULE=off; see 'go help modules' "TestRelease_gitRepo_uncommittedChanges" - "TestFailure" - ;; Delete: want nil discarded elements, got - ;; 0xc000012858, 0xc000012860 - "TestDeleteClearTail" - ;; DeleteFunc: want nil discarded elements, got - ;; 0xc000012910, 0xc000012918 - "TestDeleteFuncClearTail" - ;; Compact: want nil discarded elements, got - ;; 0xc000012b30, 0xc000012b38 - "TestCompactClearTail" - ;; CompactFunc: want nil discarded elements, got - ;; 0xc000012be8, 0xc000012bf0 - "TestCompactFuncClearTail" - ;; Replace: want nil discarded element, got - ;; 0xc000013058 - "TestReplaceClearTail") + ;; constraints_test.go:104: + ;; /gnu/store/vr0097qq0kl1ansn6iv5smysjh9v7ycd-go-1.24.3/lib/go/bin/go + ;; mod tidy: exit status 1 go: modules disabled by + ;; GO111MODULE=off; see 'go help modules' + "TestFailure") "|")) #:phases #~(modify-phases %standard-phases @@ -693,6 +732,8 @@ language.") (lambda* (#:key import-path #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) (delete-file-recursively "slog/benchmarks"))))))) + (native-inputs + (list go-golang-org-x-tools-go-packages-packagestest)) (propagated-inputs (list go-github-com-google-go-cmp go-golang-org-x-mod @@ -721,7 +762,7 @@ directory) packages.") ;; Note: Beware, the updater gets this wrong. Take the latest version ;; string from ;; <https://pkg.go.dev/golang.org/x/exp/typeparams?tab=versions>. - (version "0.0.0-20250531010427-b6e5de432a8b") + (version "0.0.0-20251009144603-d2f985daa21b") (source (origin (method git-fetch) @@ -730,7 +771,7 @@ directory) packages.") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0vszjiblb7i79dp9x1zvfpjidnmkzsaq6ij2jfh63hv9ph7yz3hf")))) + (base32 "0kn9bcbrkdvg4f8kvc0cdahyyy72w2jf9v9c95k67k0b46fwh3i6")))) (build-system go-build-system) (arguments (list @@ -757,23 +798,23 @@ compile does not support generics.") (define-public go-golang-org-x-image (package (name "go-golang-org-x-image") - (version "0.27.0") + (version "0.32.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/image") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/image") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0kc75lbfb0m9xp0idcqlpcis6xahblw2q7cj6vg9lmblxzqy5nvh")))) + (base32 "174mwxshc6idwihajb05h68ynf63ppfqw5zi6cm5ja08dsfbk43b")))) (build-system go-build-system) (arguments (list + #:skip-build? #t #:import-path "golang.org/x/image" #:phases #~(modify-phases %standard-phases - (delete 'build) ; no go files in project's root (add-after 'unpack 'remove-examples (lambda* (#:key import-path #:allow-other-keys) (delete-file-recursively @@ -800,20 +841,16 @@ compile does not support generics.") (define-public go-golang-org-x-mod (package (name "go-golang-org-x-mod") - ;; XXX: To update to 0.22.0+ go-1.23 is required, wich provides - ;; "go/version" module, see - ;; <https://cs.opensource.google/go/go/+/refs/tags/ - ;; go1.23.0:src/go/version/version.go>. - (version "0.24.0") + (version "0.29.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/mod") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/mod") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "17sjk98d3qwh9s6gqjmfy07z0gyj5hyv5a9kyg4si3yjfzbnwhx7")))) + (base32 "1cc79540hc7yjwmqi6574808i3i3p0n8q49fp7vccb86qgms1rcc")))) (build-system go-build-system) (arguments (list @@ -851,7 +888,7 @@ loading algorithms.") (define-public go-golang-org-x-net (package (name "go-golang-org-x-net") - (version "0.40.0") + (version "0.46.0") (source (origin (method git-fetch) @@ -860,7 +897,7 @@ loading algorithms.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0zsh08wbamzlvlwvlw6slgcqhaa59rwz9pq01lbyjigw6cfww406")))) + (base32 "0zb45fmiwsi8nq56wfzk83q7ksqk8jaw8rlpnxv929c419gi8h0s")))) (build-system go-build-system) (arguments (list @@ -895,16 +932,16 @@ loading algorithms.") (define-public go-golang-org-x-sync (package (name "go-golang-org-x-sync") - (version "0.14.0") + (version "0.17.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/sync") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/sync") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1gpa1v6wnp1bszk5iyiakq1j37icgxswj3iysdrdyp0yadw0pm30")))) + (base32 "0bga9sfiwqxs7g913p7b355hg30agw58h5f5k7rzgpsai37nbkik")))) (build-system go-build-system) (arguments (list @@ -939,7 +976,7 @@ cancellation for groups of goroutines working on subtasks of a common task (define-public go-golang-org-x-sys (package (name "go-golang-org-x-sys") - (version "0.33.0") + (version "0.37.0") (source (origin (method git-fetch) @@ -948,7 +985,7 @@ cancellation for groups of goroutines working on subtasks of a common task (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "19m090xd3abysvk1y07fhhd025k3s456i71ww0pq0b2pzsva5ra2")))) + (base32 "0cjq8n66i9cccigi204mkhqmrb9mdirxjxl0nk7c8s6w70fifbby")))) (build-system go-build-system) (arguments (list @@ -1004,16 +1041,16 @@ low-level interaction with the operating system.") (name "go-golang-org-x-telemetry") ;; Beware: the updater gets this wrong. Use the latest commit and its ;; matching date. - (version "0.0.0-20250529002037-25d2f7894191") + (version "0.0.0-20251009181524-91c411e14f39") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/telemetry") - (commit (go-version->git-ref version)))) + (url "https://go.googlesource.com/telemetry") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0ymqig10vyrmzkali1wqhxrrb3fjvl7z9wmzf5g0dydb9a8ng42l")) + (base32 "0v5427r8il5bj9h86d7dy1k1g9jag9c7vmbq0kmrzhfn6l0c310c")) (modules '((guix build utils))) (snippet #~(begin @@ -1029,20 +1066,26 @@ low-level interaction with the operating system.") #~(list "-skip" (string-join ;; Tests fail with error: failed to download config ;; module. - (list "TestConcurrentStart" + (list "TestConcurrentStart" ;got 0 report dates, want 3 + "TestStart" ;no upload occurred on 2786 "TestDownload" + ;; got err clone: checking out + ;; https://go.googlesource.com/tools: fork/exec + ;; /bin/sh: no such file or directory + "TestReadPCLineTable" + "TestUpdateIssues" + ;; querying go info: listing toolchain versions: + ;; listing versions: exit status 1 (stderr: go: + ;; list -m cannot be used with GO111MODULE=off + "TestLoadedChartsAreValid" "TestRun_Basic" - "TestRun_Concurrent" - "TestRun_DebugLog" + "TestRun_Retries" + "TestRun_MultipleUploads" "TestRun_EmptyUpload" "TestRun_MissingDate" - "TestRun_ModeHandling/on" - "TestRun_MultipleUploads" - "TestRun_Retries" - "TestStart" ;no upload occurred on 2786 - ;; TestLoadedChartsAreValid fails with "go: list - ;; -cannot be used with GO111MODULE=off" - "TestLoadedChartsAreValid") + "TestRun_ModeHandling" + "TestRun_DebugLog" + "TestRun_Concurrent") "|")) #:import-path "golang.org/x/telemetry")) (propagated-inputs @@ -1060,7 +1103,7 @@ Go toolchain programs with opt-in telemetry.") (define-public go-golang-org-x-telemetry-config (package (name "go-golang-org-x-telemetry-config") - (version "0.48.0") + (version "0.68.0") (source (origin (method git-fetch) @@ -1070,7 +1113,7 @@ Go toolchain programs with opt-in telemetry.") #:subdir "config")))) (file-name (git-file-name name version)) (sha256 - (base32 "0lzybsdibr71y6n3x8qh37yh9vfwdmmdb6vksqimg4ayys373q7x")))) + (base32 "0v5427r8il5bj9h86d7dy1k1g9jag9c7vmbq0kmrzhfn6l0c310c")))) (build-system go-build-system) (arguments (list @@ -1090,7 +1133,7 @@ telemetry uploads: GOOS, GOARCH, Go version, and per-program counters.") (define-public go-golang-org-x-term (package (name "go-golang-org-x-term") - (version "0.32.0") + (version "0.36.0") (source (origin (method git-fetch) @@ -1099,7 +1142,7 @@ telemetry uploads: GOOS, GOARCH, Go version, and per-program counters.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "09q25x265yyy4jfjqpm10x8jai30wcbhb7bqgkjll4gw2sz3zhz1")))) + (base32 "13xd1frw2jzqbd8743m5zhrq6asz9ar1maxd3cbk3rzybc9wx0p5")))) (build-system go-build-system) (arguments '(#:import-path "golang.org/x/term")) (propagated-inputs @@ -1124,7 +1167,7 @@ terminals, as commonly found on Unix systems.") (define-public go-golang-org-x-text (package (name "go-golang-org-x-text") - (version "0.25.0") + (version "0.30.0") (source (origin (method git-fetch) @@ -1133,7 +1176,7 @@ terminals, as commonly found on Unix systems.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1r9532ml0psfby89agf20q23qzwfikhydl8q77ad5y73xvdx89lf")))) + (base32 "0pgpfzk86wqf6k2fbrxa80pz1jx6y4dfr4dr26pwsw6j7l3s5pby")))) (build-system go-build-system) (arguments (list @@ -1174,16 +1217,16 @@ processing.") (define-public go-golang-org-x-time (package (name "go-golang-org-x-time") - (version "0.11.0") + (version "0.14.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/time") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/time") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1bqgxv7b3n69h4mi4hwr51pfr1hr6s1h6k7nb3dl32dryy7xwr12")))) + (base32 "0xinpch5wm57hrf3d8iasxyszibqclsr911l7527al4y92myjn3x")))) (build-system go-build-system) (arguments (list @@ -1199,80 +1242,60 @@ time.") (define-public go-golang-org-x-tools (package (name "go-golang-org-x-tools") - (version "0.33.0") + (version "0.37.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/tools") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/tools") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1lbb4y1c5b4719pdhfcb90sdzagzsb2lw5hx8gizsba3cj0r0f25")) + (base32 "0l0srynl2cikmz089q5vqgifz6ll2ic1762fbfvak26vqbcx0knz")) (modules '((guix build utils))) (snippet '(begin - ;; gopls versions are tagged separately, and it is a - ;; separate Guix package. - (delete-file-recursively "gopls"))))) + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - golang.org/x/tools/cmd/auth + ;; - golang.org/x/tools/gopls + (delete-file-recursively "gopls") + (delete-file-recursively "cmd/auth"))))) (build-system go-build-system) (arguments (list + #:skip-build? #t #:import-path "golang.org/x/tools" - #:phases - #~(modify-phases %standard-phases - ;; XXX: Workaround for go-build-system's lack of Go modules - ;; support. - (delete 'build) - (replace 'check - (lambda* (#:key tests? import-path #:allow-other-keys) - (when tests? - (with-directory-excursion (string-append "src/" import-path) - (invoke "go" "test" "-v" - ;; TODO: They contain final project executable builds, - ;; would be packed separately. - ;; - cmd - ;; - godoc - - ;; FIXME: Figure out why they are failing: - ;; "./go/analysis/..." - ;; "./go/callgraph/..." - ;; "./go/packages/..." - ;; "./go/ssa/..." - ;; "./internal/..." - ;; "./present/..." - ;; "./refactor/eg/..." - - "./blog/..." ; - "./container/..." - "./copyright/..." - "./cover/..." - "./go/ast/..." - "./go/buildutil/..." - "./go/cfg/..." - "./go/expect/..." - "./go/gccgoexportdata/..." - "./go/gcexportdata/..." - "./go/internal/..." - "./go/loader/..." - "./go/types/..." - "./imports/..." - "./playground/..." - "./refactor/importgraph/..." - "./refactor/rename/..." - "./refactor/satisfy/..." - "./txtar/..." - "-skip" - (string-join - (list - ;; The GenericPaths test fails with "invalid - ;; memory address or nil pointer dereference". - "TestGenericPaths" - ;; The ordering and paths tests fails because they - ;; can't find test packages (perhaps because we do - ;; not support Go modules). - "TestOrdering" "TestPaths") - "|"))))))))) + #:test-subdirs + #~(list "./blog/..." + "./container/..." + "./copyright/..." + "./cover/..." + "./go/ast/..." + "./go/buildutil/..." + "./go/cfg/..." + "./go/gccgoexportdata/..." + "./go/gcexportdata/..." + "./go/internal/..." + "./go/loader/..." + "./go/types/..." + "./imports/..." + "./playground/..." + "./refactor/importgraph/..." + "./refactor/rename/..." + "./refactor/satisfy/..." + "./txtar/...") + #:test-flags + #~(list "-skip" (string-join + (list + ;; The GenericPaths test fails with "invalid memory + ;; address or nil pointer dereference". + "TestGenericPaths" + ;; The ordering and paths tests fails because they + ;; can't find test packages (perhaps because we do not + ;; support Go modules). + "TestOrdering" "TestPaths") + "|")))) (native-inputs (list gccgo-14 go-github-com-google-go-cmp)) @@ -1299,6 +1322,130 @@ Go programming language.") (native-inputs '()) (propagated-inputs '())))) +(define-public go-golang-org-x-tools-go-expect + (package + (name "go-golang-org-x-tools-go-expect") + (version "0.1.1-deprecated") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://go.googlesource.com/tools") + (commit (go-version->git-ref version + #:subdir "go/expect")))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sjvngpahkb5x573i855fjlb1fdmr6n269nmb5xxnbabjb27mnvg")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-26))) + (snippet + #~(begin + (define (delete-all-but directory . preserve) + (with-directory-excursion directory + (let* ((pred (negate (cut member <> + (cons* "." ".." preserve)))) + (items (scandir "." pred))) + (for-each (cut delete-file-recursively <>) items)))) + (delete-all-but "go" "expect") + (delete-all-but "." "go"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "golang.org/x/tools/go/expect" + #:unpack-path "golang.org/x/tools")) + (propagated-inputs (list go-golang-org-x-mod)) + (home-page "https://golang.org/x/tools") + (synopsis "Interpreting structured comments in Golang") + (description + "Package expect provides support for interpreting structured comments in +Go source code (including go.mod and go.work files) as test expectations.") + (license license:bsd-3))) + +(define-public go-golang-org-x-tools-go-packages-packagestest + (package + (name "go-golang-org-x-tools-go-packages-packagestest") + (version "0.1.1-deprecated") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://go.googlesource.com/tools") + (commit (go-version->git-ref version + #:subdir "go/packages/packagestest")))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0sjvngpahkb5x573i855fjlb1fdmr6n269nmb5xxnbabjb27mnvg")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-26))) + (snippet + #~(begin + (define (delete-all-but directory . preserve) + (with-directory-excursion directory + (let* ((pred (negate (cut member <> + (cons* "." ".." preserve)))) + (items (scandir "." pred))) + (for-each (cut delete-file-recursively <>) items)))) + (delete-all-but "go" "packages") + (delete-all-but "go/packages" "packagestest") + (delete-all-but "." "go"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "golang.org/x/tools/go/packages/packagestest" + #:unpack-path "golang.org/x/tools")) + (propagated-inputs + (list go-golang-org-x-tools + go-golang-org-x-tools-go-expect)) + (home-page "https://golang.org/x/tools") + (synopsis "Temporary testing projects for Golang") + (description + "Package packagestest creates temporary projects on disk for testing go +tools on.") + (license license:bsd-3))) + +(define-public go-golang-org-x-tools-godoc + (package + (name "go-golang-org-x-tools-godoc") + (version "0.1.0-deprecated") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://go.googlesource.com/tools") + (commit (go-version->git-ref version + #:subdir "godoc")))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1blk22apy424j9v58lfy4pxnrgh93yqchqhxsnf78dmx4vx5yi9r")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-26))) + (snippet + #~(begin + (define (delete-all-but directory . preserve) + (with-directory-excursion directory + (let* ((pred (negate (cut member <> + (cons* "." ".." preserve)))) + (items (scandir "." pred))) + (for-each (cut delete-file-recursively <>) items)))) + (delete-all-but "." "godoc"))))) + (build-system go-build-system) + (arguments + (list + #:import-path "golang.org/x/tools/godoc" + #:unpack-path "golang.org/x/tools")) + (propagated-inputs + (list go-golang-org-x-tools + go-github-com-yuin-goldmark)) + (home-page "https://golang.org/x/tools") + (synopsis "Code for running a godoc server.") + (description + "This package provides most of the code for running a @code{godoc} + server.") + (license license:bsd-3))) + (define-public go-golang-org-x-vuln (package (name "go-golang-org-x-vuln") @@ -1325,6 +1472,8 @@ Go programming language.") ;; go: modules disabled by GO111MODULE=off #:test-flags #~(list "-skip" "TestVet|TestGoModTidy|Test58509") #:test-subdirs #~(list "internal/..." "scan/..." "."))) + (native-inputs + (list go-golang-org-x-tools-go-packages-packagestest)) (propagated-inputs (list go-github-com-google-go-cmdtest go-github-com-google-go-cmp @@ -1365,8 +1514,8 @@ values.") (define-public go-google-golang-org-genproto-googleapis-rpc ;; No release or verion tags, use the latest commit. - (let ((commit "e70fdf4c4cb4151b7aa3579ce8a3fb662bafe335") - (revision "0")) + (let ((commit "49b9836ed3ff1e1dd329d17e442987447e931c7d") + (revision "1")) (package (name "go-google-golang-org-genproto-googleapis-rpc") (version (git-version "0.0.0" revision commit)) @@ -1374,11 +1523,11 @@ values.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/googleapis/go-genproto") - (commit commit))) + (url "https://github.com/googleapis/go-genproto") + (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 "0jf332yxgf1c6nj76b1p52907g786gynzd78g899m3vrfa45wswz")))) + (base32 "0pr2qvmrg9f3nrbvmw8ir37mki92nkb9km8zlpxslzmxbjmiwjxb")))) (build-system go-build-system) (arguments (list @@ -1397,23 +1546,21 @@ values.") (define-public go-google-golang-org-protobuf (package (name "go-google-golang-org-protobuf") - (version "1.36.6") + (version "1.36.10") (source (origin (method git-fetch) (uri (git-reference - (url "https://go.googlesource.com/protobuf") - (commit (string-append "v" version)))) + (url "https://go.googlesource.com/protobuf") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0lp1a6bcwdiil4my0aq85ranxf2k757m8q0ss9658jyrh5g7av79")))) + (base32 "1509n0gvzqq8mr2377lzg70hfzwrijv069z094rnghif9b0hh07g")))) (build-system go-build-system) (arguments (list - #:import-path "google.golang.org/protobuf" - #:phases - #~(modify-phases %standard-phases - (delete 'build)))) ; no go files in project's root + #:skip-build? #t + #:import-path "google.golang.org/protobuf")) (propagated-inputs (list go-github-com-google-go-cmp)) (home-page "https://google.golang.org/protobuf") (synopsis "Go library for Protocol Buffers") diff --git a/gnu/packages/golang-check.scm b/gnu/packages/golang-check.scm index 0951bcbd2b..7724d6c7e4 100644 --- a/gnu/packages/golang-check.scm +++ b/gnu/packages/golang-check.scm @@ -2753,28 +2753,43 @@ the end of a test.") (define-public go-go-uber-org-mock (package (name "go-go-uber-org-mock") - (version "0.4.0") + (version "0.6.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/uber-go/mock") - (commit (string-append "v" version)))) + (url "https://github.com/uber-go/mock") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0mz1cy02m70mdh7hyaqks8bkh9iyv4jgj6h4psww52nr3b9pnyyy")))) + (base32 "0svwxxdaix45hy3j4p9r27pqqfk8ghdp20ylp7f0ja97wzx0p1c1")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/uber-go/mock/bazel + ;; - github.com/uber-go/mock/mockgen/internal/tests/generics + ;; - github.com/uber-go/mock/mockgen/internal/tests/typed + ;; - github.com/uber-go/mock/tools + (for-each delete-file-recursively + (list"bazel" + "mockgen/internal/tests/generics" + "mockgen/internal/tests/typed" + "tools")))))) (build-system go-build-system) (arguments (list - ;; XXX: The project contains subdirectory which complicate it's testing - ;; and it does not produce any binary. - #:tests? #f + #:skip-build? #t #:import-path "go.uber.org/mock" - #:phases - #~(modify-phases %standard-phases - (delete 'build)))) + #:test-flags + ;; Assertions fail in two tests. + #~(list "-skip" "Test_packageModeParser_parsePackage|TestAliases"))) + (native-inputs + (list go-github-com-stretchr-testify)) (propagated-inputs - (list go-golang-org-x-mod go-golang-org-x-tools)) + (list go-golang-org-x-mod + go-golang-org-x-tools)) (home-page "https://pkg.go.dev/go.uber.org/mock") (synopsis "Mocking framework for the Golang") (description @@ -2996,18 +3011,19 @@ used to skip the test (origin (method git-fetch) (uri (git-reference - (url "https://github.com/dominikh/go-tools") - (commit (string-append "v" version)))) + (url "https://github.com/dominikh/go-tools") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "0y4xbb91mv1rj7aps5g7hz1mhf5pbdc8yp5bxz6dq5ajlmfqwi3s")))) + (base32 "0y4xbb91mv1rj7aps5g7hz1mhf5pbdc8yp5bxz6dq5ajlmfqwi3s")))) (build-system go-build-system) (arguments (list #:skip-build? #t #:import-path "honnef.co/go/tools" #:unpack-path "honnef.co/go/tools")) + (native-inputs + (list go-golang-org-x-tools-go-expect)) ;XXX: Remove with a new release (propagated-inputs (list go-github-com-burntsushi-toml go-golang-org-x-exp diff --git a/gnu/packages/golang-vcs.scm b/gnu/packages/golang-vcs.scm index 23d43e635c..be72ac412e 100644 --- a/gnu/packages/golang-vcs.scm +++ b/gnu/packages/golang-vcs.scm @@ -268,7 +268,6 @@ supported yet.") (build-system go-build-system) (arguments (list - #:go go-1.23 #:import-path "github.com/nektos/act" #:embed-files #~(list ".*\\.json") #:test-flags diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index c1cf6b7de9..53693c8eaa 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -164,7 +164,7 @@ alternative fork of https://git.autistici.org/ale/lb.") go-github-com-spf13-viper)) (propagated-inputs (list go-github-com-labstack-echo-v4 - go-github-com-quic-go-quic-go + go-github-com-quic-go-quic-go-0.52 go-github-com-sirupsen-logrus go-github-com-xtaci-kcp-go-v5 go-gitlab-com-yawning-obfs4-git @@ -4930,6 +4930,84 @@ the Go standard library, but returns a client that does not share any state with other clients.") (license license:mpl2.0))) +(define-public go-github-com-hashicorp-go-metrics + ;; v0.5.0 of the library renamed the Go module from + ;; "github.com/armon/go-metrics" to "github.com/hashicorp/go-metrics". While + ;; this did not introduce any breaking changes to the API, the change did + ;; subtly break backwards compatibility. + ;; + ;; Eventually all usage of "armon/go-metrics" should be replaced with usage + ;; of "hashicorp/go-metrics" + (package + (name "go-github-com-hashicorp-go-metrics") + (version "0.5.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/go-metrics") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0rw8251w6lkpbm6qhbdi37jbjknmlw1ampqicfyk32mfq3grn0ar")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Module name has been changed upstream. + (substitute* (find-files "." "\\.go$") + (("armon/go-metrics") "hashicorp/go-metrics")))))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/hashicorp/go-metrics" + #:test-flags + #~(list "-skip" (string-join + ;; Networking and runnint Prometheus are required. + (list "TestAddSample" + "TestMetricSink" + "TestSetGauge" + "TestSetPrecisionGauge" + "TestStatsd_Conn" + "TestStatsite_Conn" + "TestTaggableMetrics") + "|")))) + (native-inputs + (list go-github-com-golang-protobuf + go-github-com-pascaldekloe-goe + go-github-com-prometheus-client-model + go-github-com-prometheus-common)) + (propagated-inputs + (list go-github-com-circonus-labs-circonus-gometrics + go-github-com-datadog-datadog-go + go-github-com-hashicorp-go-immutable-radix + go-github-com-prometheus-client-golang)) + (home-page "https://github.com/hashicorp/go-metrics") + (synopsis "Export performance and runtime metrics to external systems") + (description + "This package implements a functionality which can be used in instrument +code, expose application metrics, and profile runtime performance in a +flexible manner. It makes use of a @code{MetricSink} interface to support +delivery to any type of backend. + +Currently the following sinks are provided: +@itemize +@item StatsiteSink : Sinks to a @url{https://github.com/statsite/statsite/, +statsite} instance (TCP) +@item StatsdSink: Sinks to a @url{https://github.com/statsd/statsd/, StatsD} / +statsite instance (UDP) +@item PrometheusSink: Sinks to a @url{http://prometheus.io/, Prometheus} +metrics endpoint (exposed via HTTP for scrapes) +@item InmemSink : Provides in-memory aggregation, can be used to export stats +@item FanoutSink : Sinks to multiple sinks. Enables writing to multiple +statsite instances for example +@item BlackholeSink : Sinks to nowhere +@end itemize") + (license license:expat))) + +;; To make importer happy. +(define-public go-github-com-armon-go-metrics + go-github-com-hashicorp-go-metrics) + (define-public go-github-com-hashicorp-go-retryablehttp (package (name "go-github-com-hashicorp-go-retryablehttp") @@ -5005,6 +5083,50 @@ API.") types and related helper functions.") (license license:mpl2.0))) +(define-public go-github-com-hashicorp-memberlist + (package + (name "go-github-com-hashicorp-memberlist") + (version "0.5.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/memberlist") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "09vb2zny0scsr65rp8ibj51diqiv818cwnfbn2xxyzssi5jcpgjv")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/hashicorp/memberlist")) + (native-inputs + (list go-github-com-stretchr-testify)) + (propagated-inputs + (list go-github-com-google-btree + go-github-com-hashicorp-go-metrics + go-github-com-hashicorp-go-msgpack-v2 + go-github-com-hashicorp-go-multierror + go-github-com-hashicorp-go-sockaddr + go-github-com-miekg-dns + go-github-com-sean--seed)) + (home-page "https://github.com/hashicorp/memberlist") + (synopsis "Gossip based cluster membership and failure detection") + (description + "memberlist is a Go library that manages cluster membership and member +failure detection using a gossip based protocol. + +The use cases for such a library are far-reaching: all distributed systems +require membership, and memberlist is a re-usable solution to managing cluster +membership and node failure detection. + +memberlist is eventually consistent but converges quickly on average. The +speed at which it converges can be heavily tuned via various knobs on the +protocol. Node failures are detected and network partitions are partially +tolerated by attempting to communicate to potentially dead nodes through +multiple routes.") + (license license:mpl2.0))) + (define-public go-github-com-hashicorp-yamux (package (name "go-github-com-hashicorp-yamux") @@ -9248,31 +9370,27 @@ throughout the @url{https://github.com/pion, Pion} modules.") go-github-com-pion-transport-v2) ((#:import-path _) "github.com/pion/transport/v3"))))) -(define-public go-github-com-pion-turn +(define-public go-github-com-pion-turn-v2 (package - (name "go-github-com-pion-turn") - (version "1.4.0") + (name "go-github-com-pion-turn-v2") + (version "2.1.6") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pion/turn/") - (commit (string-append "v" version)))) + (url "https://github.com/pion/turn/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "16lkgmrlks0qdzbk8jj0c0j66qfxhb54cvzgrfn4imvm56dbxp2n")))) + (base32 "0iw7nvqsxpqy90k5a8mq3dyask272391m59cbiy30aak1y2wwaac")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/pion/turn" + #:import-path "github.com/pion/turn/v2" #:test-flags - #~(list "-skip" - (string-join - ;; Tests requiring networking setup. - (list "TestClientWithSTUN/SendBindingRequest" - "TestClientWithSTUN/SendBindingRequestTo_Parallel") - "|")) + ;; panic: runtime error: invalid memory address or nil pointer + ;; dereference + #~(list "-skip" "TestClientWithSTUN") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-examples @@ -9283,9 +9401,10 @@ throughout the @url{https://github.com/pion, Pion} modules.") (list go-github-com-stretchr-testify)) (propagated-inputs (list go-github-com-pion-logging + go-github-com-pion-randutil go-github-com-pion-stun - go-github-com-pion-transport - go-github-com-pkg-errors)) + go-github-com-pion-transport-v2 + go-golang-org-x-sys)) (home-page "https://github.com/pion/turn/") (synopsis "API for building TURN clients and servers in Golang") (description @@ -9307,35 +9426,9 @@ it like any library. The quickest way to get started is to look at the @url{https://godoc.org/github.com/pion/turn, GoDoc}.") (license license:expat))) -(define-public go-github-com-pion-turn-v2 - (package - (inherit go-github-com-pion-turn) - (name "go-github-com-pion-turn-v2") - (version "2.1.6") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pion/turn/") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0iw7nvqsxpqy90k5a8mq3dyask272391m59cbiy30aak1y2wwaac")))) - (arguments - (substitute-keyword-arguments (package-arguments - go-github-com-pion-turn) - ((#:import-path flags ''()) - "github.com/pion/turn/v2"))) - (propagated-inputs - (list go-github-com-pion-logging - go-github-com-pion-randutil - go-github-com-pion-stun - go-github-com-pion-transport-v2 - go-golang-org-x-sys)))) - (define-public go-github-com-pion-turn-v3 (package - (inherit go-github-com-pion-turn) + (inherit go-github-com-pion-turn-v2) (name "go-github-com-pion-turn-v3") (version "3.0.3") (source @@ -9349,7 +9442,7 @@ it like any library. The quickest way to get started is to look at the (base32 "0l78m9ym0sv1zfalbv95lwblmr789fc53d957ph5mdznhjx89lyx")))) (arguments (substitute-keyword-arguments (package-arguments - go-github-com-pion-turn) + go-github-com-pion-turn-v2) ((#:import-path flags ''()) "github.com/pion/turn/v3"))) (propagated-inputs @@ -9363,7 +9456,7 @@ it like any library. The quickest way to get started is to look at the (package (inherit go-github-com-pion-turn-v3) (name "go-github-com-pion-turn-v4") - (version "4.0.0") + (version "4.1.1") (source (origin (method git-fetch) @@ -9372,7 +9465,7 @@ it like any library. The quickest way to get started is to look at the (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1yd0v6ijwl62qd2sz7imq9pd2grcrw4dhwnn4302m1k89pxr52wx")))) + (base32 "0ajkd63nkif2izblf8bnvs15126bdm4y8qymy2m8vwdbl70swsfv")))) (arguments (substitute-keyword-arguments (package-arguments go-github-com-pion-turn-v3) @@ -9692,7 +9785,7 @@ characters incorrectly escaped by net/url.") (define-public go-github-com-quic-go-qpack (package (name "go-github-com-quic-go-qpack") - (version "0.4.0") + (version "0.5.1") (source (origin (method git-fetch) @@ -9701,78 +9794,74 @@ characters incorrectly escaped by net/url.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "00mjz445hhx4yar5l8p21bpp4d06jyg2ajw0ax7bh64d37l4kx39")))) + (base32 "0aj0vv89l94y3clhsjcm1ham6mysmls4yhv7602cwlyag61hfrh3")))) (build-system go-build-system) (arguments (list - ;; Tests require ginkgo v2. - #:tests? #f - #:import-path "github.com/quic-go/qpack")) + #:import-path "github.com/quic-go/qpack" + ;; XXX: integrationtests/interop contains git submodule of + ;; <https://github.com/qpackers/qifs>. + #:test-subdirs #~(list "."))) + (native-inputs + (list go-github-com-stretchr-testify)) (propagated-inputs - (list go-github-com-onsi-ginkgo - go-github-com-onsi-gomega - go-golang-org-x-net)) + (list go-golang-org-x-net)) (home-page "https://github.com/quic-go/qpack") (synopsis "Minimal QPACK (RFC 9204) implementation for Go") (description - "A minimal QPACK (RFC 9204) implementation in Go. It is minimal in the sense -that it doesn't use the dynamic table at all, but just the static table and (Huffman -encoded) string literals. Wherever possible, it reuses code from the -@url{https://github.com/golang/net/tree/master/http2/hpack, HPACK implementation in -the Go standard library}.") + "A minimal QPACK (RFC 9204) implementation in Go. It is minimal in the +sense that it doesn't use the dynamic table at all, but just the static table +and (Huffman encoded) string literals. Wherever possible, it reuses code from +the @url{https://github.com/golang/net/tree/master/http2/hpack, HPACK +implementation in the Go standard library}.") (license license:expat))) (define-public go-github-com-quic-go-quic-go (package (name "go-github-com-quic-go-quic-go") - (version "0.52.0") + (version "0.54.1") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/quic-go/quic-go") - (commit (string-append "v" version)))) + (url "https://github.com/quic-go/quic-go") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0frcjzrarvk3ck6dhqp88a1cbazw7jb26gxq1wp3lhgmxv4v4m2m")))) + (base32 "025klj0pvnz5c1gbz4i3wb8fxbnyf4q5vz08l7xa7204qzl5njlk")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - test + (delete-file-recursively "integrationtests/gomodvendor"))))) (build-system go-build-system) (arguments (list - #:go go-1.23 #:import-path "github.com/quic-go/quic-go" #:phases #~(modify-phases %standard-phases - ;; Test steps are taken from GitHub Actions - - ;; <https://github.com/quic-go/quic-go/blob/v0.42.0/ - ;; .github/workflows/unit.yml>. - (replace 'check + (add-after 'unpack 'remove-examples (lambda* (#:key tests? import-path #:allow-other-keys) - (when tests? - (with-directory-excursion (string-append "src/" import-path) - (setenv "TIMESCALE_FACTOR" "10") - (invoke "ginkgo" "-r" "-v" "--no-color" - (string-append - "--procs=" (number->string - ;; All tests passed on 16 threads - ;; mathine, but fail on - ;; ci.guix.gnu.org. - (if (> (parallel-job-count) 17) - 16 - (parallel-job-count)))) - "--skip-package=integrationtests")))))))) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "example")))) + (add-before 'check 'pre-check + (lambda* (#:key tests? import-path #:allow-other-keys) + (setenv "TIMESCALE_FACTOR" "10")))))) (native-inputs - (list go-ginkgo - go-github-com-onsi-ginkgo-v2 - go-github-com-stretchr-testify + (list go-github-com-stretchr-testify go-go-uber-org-mock)) (propagated-inputs (list go-github-com-francoispqt-gojay + go-github-com-prometheus-client-golang go-github-com-quic-go-qpack go-golang-org-x-crypto go-golang-org-x-exp go-golang-org-x-net go-golang-org-x-sync - go-golang-org-x-sys)) + go-golang-org-x-sys + go-golang-org-x-tools)) (home-page "https://github.com/quic-go/quic-go") (synopsis "QUIC in Go") (description @@ -9780,23 +9869,40 @@ the Go standard library}.") protocol.") (license license:expat))) +(define-public go-github-com-quic-go-quic-go-0.52 + (hidden-package + (package + (inherit go-github-com-quic-go-quic-go) + (name "go-github-com-quic-go-quic-go") + (version "0.52.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/quic-go/quic-go") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0frcjzrarvk3ck6dhqp88a1cbazw7jb26gxq1wp3lhgmxv4v4m2m")))) + (arguments + (list + #:skip-build? #t + #:tests? #f + #:import-path "github.com/quic-go/quic-go"))))) + (define-public go-github-com-quic-go-webtransport-go - ;; XXX: The latest commits contains comparability with Go@1.24 and QUICK - ;; 0.48+, revert back to version tag when released. - (let ((commit "0a9e2ee55f751e48eb03c4675d873edff3b69c05") - (revision "0")) (package (name "go-github-com-quic-go-webtransport-go") - (version (git-version "0.8.0" revision commit)) + (version "0.9.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/quic-go/webtransport-go") - (commit commit))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "048qf7glv3zgz43qvi1smwsh1khhzyfrid6hp5dnp799p3s3vk13")))) + (base32 "061mr55dq80kf3422vfranqlfb0416vix3wl7rb78ndmrcgvmr86")))) (build-system go-build-system) (arguments (list @@ -9817,7 +9923,7 @@ protocol, based on @@url{https://github.com/quic-go/quic-go,quic-go}. It currently implements @@url{https://www.ietf.org/archive/id/draft-ietf-webtrans-http3-02.html,draft-02} of the specification.") - (license license:expat)))) + (license license:expat))) (define-public go-github-com-rcrowley-go-metrics (package @@ -10310,26 +10416,18 @@ API v4.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/shurcooL/httpfs") - (commit (go-version->git-ref version)))) + (url "https://github.com/shurcooL/httpfs") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1m0jjnfzr8372cjx0zjm2zm695kwaz8l1yk7gzgn05biadsklprm")))) (build-system go-build-system) (arguments (list - #:import-path "github.com/shurcooL/httpfs" - #:phases - #~(modify-phases %standard-phases - ;; XXX: Replace when go-build-system supports nested path. - (delete 'build) - (replace 'check - (lambda* (#:key import-path tests? #:allow-other-keys) - (when tests? - (with-directory-excursion (string-append "src/" import-path) - (invoke "go" "test" "-v" "./...")))))))) + #:skip-build? #t + #:import-path "github.com/shurcooL/httpfs")) (native-inputs - (list go-golang-org-x-tools)) + (list go-golang-org-x-tools-godoc)) (propagated-inputs (list go-github-com-shurcool-httpgzip)) (home-page "https://github.com/shurcooL/httpfs") @@ -10357,7 +10455,7 @@ interface.") (list #:import-path "github.com/shurcooL/httpgzip")) (native-inputs - (list go-golang-org-x-tools)) + (list go-golang-org-x-tools-godoc)) (propagated-inputs (list go-golang-org-x-net)) (home-page "https://github.com/shurcooL/httpgzip") @@ -10385,7 +10483,7 @@ use gzip compression when serving HTTP requests.") (list #:import-path "github.com/shurcooL/vfsgen")) (native-inputs - (list go-golang-org-x-tools)) + (list go-golang-org-x-tools-godoc)) (propagated-inputs (list go-github-com-shurcool-httpfs)) (home-page "https://github.com/shurcooL/vfsgen") @@ -11030,23 +11128,31 @@ extract data from those paths.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ugorji/go") - (commit (string-append "v" version)))) + (url "https://github.com/ugorji/go") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1mny5gm5gr82hz4y6k5ljaa0khjw647ys278wq750fgrbzp6fs8h")))) + (base32 "1mny5gm5gr82hz4y6k5ljaa0khjw647ys278wq750fgrbzp6fs8h")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Submodules with their own go.mod files and packaged separately: + ;; + ;; - github.com/ugorji/go/codec/codecgen + (delete-file-recursively "codec/codecgen"))))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/ugorji/go/codec" - #:unpack-path "github.com/ugorji/go" + #:skip-build? #t + #:import-path "github.com/ugorji/go" + #:test-flags + #~(list "-vet=off") ;Go@1.24 forces vet, but tests are not ready yet. #:phases #~(modify-phases %standard-phases (add-after 'unpack 'remove-benchmarks (lambda* (#:key import-path #:allow-other-keys) (delete-file-recursively (string-append "src/" import-path - "/bench"))))))) + "/codec/bench"))))))) (propagated-inputs (list go-golang-org-x-tools)) (home-page "https://github.com/ugorji/go") (synopsis "Codec and encoding library for various serialization formats") @@ -11748,7 +11854,7 @@ connection management for @url{https://github.com/xtaci/kcp-go,kcp-go}.") go-github-com-hjson-hjson-go-v4 go-github-com-kardianos-minwinsvc go-github-com-olekukonko-tablewriter-0.0.5 - go-github-com-quic-go-quic-go + go-github-com-quic-go-quic-go-0.52 go-github-com-vishvananda-netlink go-github-com-wlynxg-anet go-golang-org-x-crypto @@ -12001,14 +12107,15 @@ Go.") (build-system go-build-system) (arguments (list - #:go go-1.23 ;; TODO: Project provides a Go library and also CLI builds for service, ;; client and proxy. #:skip-build? #t #:import-path "gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2" - ;; panic: empty transcript [recovered] - #:test-flags #~(list "-skip" "TestQueuePacketConnWriteToKCP"))) + #:test-flags + #~(list "-vet=off" ;Go@1.24 forces vet, but tests are not ready yet + ;; panic: empty transcript [recovered] + "-skip" "TestQueuePacketConnWriteToKCP"))) (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs @@ -12145,6 +12252,8 @@ lists) @end itemize") (license license:mpl2.0))) +;; XXX: This project was archived by the owner on Jul 31, 2023. It is now +;; read-only. Consider to remove when nothing depends on it. (define-public go-go-opencensus-io (package (name "go-go-opencensus-io") @@ -12153,16 +12262,32 @@ lists) (origin (method git-fetch) (uri (git-reference - (url "https://github.com/census-instrumentation/opencensus-go") - (commit (string-append "v" version)))) + (url "https://github.com/census-instrumentation/opencensus-go") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1923j8v214fyk9qlw0lfva6ah8p7s8cfkrysiada5pp4jim4k4xi")))) (build-system go-build-system) (arguments (list - #:go go-1.23 #:import-path "go.opencensus.io" + #:test-subdirs + #~(list "exporter/stackdriver/propagation" + "internal" + "metric" + "metric/metricexport" + "metric/metricproducer" + "metric/test" + "plugin/ochttp/propagation/b3" + "plugin/ochttp/propagation/tracecontext" + "plugin/runmetrics" + "resource" + "stats" + "stats/view" + "tag" + "trace" + "trace/propagation" + "trace/tracestate") #:test-flags #~(list "-skip" (string-join @@ -13343,6 +13468,36 @@ generate Go code.") ((#:tests? _ #t) #f) ((#:import-path _) "gopkg.in/jcmturner/rpc.v2"))))) +(define-public go-gopkg-in-telebot-v3 + (package + (name "go-gopkg-in-telebot-v3") + (version "3.3.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/go-telebot/telebot") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0l6gl31jd1i5im037ra5qd0sd2acwk09idh89b7d97j34y2a8bv6")))) + (build-system go-build-system) + (arguments + (list + #:import-path "gopkg.in/telebot.v3")) + (native-inputs + (list go-github-com-stretchr-testify)) + (propagated-inputs + (list go-github-com-goccy-go-yaml + go-github-com-spf13-viper)) + (home-page "https://github.com/go-telebot/telebot") + (synopsis "Telegram bot framework in Golang") + (description + "Telebot is a bot framework for @url{https://core.telegram.org/bots/api, +Telegram Bot API}. This package provides the best of its kind API for command +routing, inline query requests and keyboards, as well as callbacks.") + (license license:expat))) + (define-public go-k8s-io-cri-api (package (name "go-k8s-io-cri-api") @@ -13379,7 +13534,7 @@ docs}.") (define-public go-k8s-io-kube-openapi (package (name "go-k8s-io-kube-openapi") - (version "0.0.0-20250905212525-66792eed8611") + (version "0.0.0-20250910181357-589584f1c912") ;; XXX: Unbundle third_party in pkg. (source (origin @@ -13389,32 +13544,27 @@ docs}.") (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1979alrrlym968jxdcxc1lpm3b13bnkyayg042gk6xn0kb97mqma")) - ;; XXX: test/integration contains submodule with it's own go.mod. + (base32 "1appaqgllddcl6kxkz3azix0xhlzy093vvxi6y3im1mkf5zblwl7")) (modules '((guix build utils))) (snippet #~(begin - ;; Keeping just testdata. - (for-each delete-file-recursively - (list "test/integration/builder" - "test/integration/builder3" - "test/integration/openapiconv" - "test/integration/pkg/generated" - "test/integration/testutil" - "test/integration/import.go" - "test/integration/integration_suite_test.go")))))) + (delete-file-recursively "test"))))) (build-system go-build-system) (arguments (list #:skip-build? #t #:import-path "k8s.io/kube-openapi" - ;; Tests are not copatible with Go 1.24+. - #:test-flags #~(list "-vet=off"))) + #:test-flags + ;; Go@1.24 forces vet, but tests are not ready yet. + #~(list "-vet=off" + ;; It tries to regenerate the test data. + "-skip" "TestGenerators"))) (native-inputs (list go-github-com-onsi-ginkgo-v2 go-github-com-onsi-gomega go-github-com-stretchr-testify - ;; go-golang-org-x-tools-go-packages-packagestest + go-golang-org-x-tools-go-packages-packagestest + go-k8s-io-kube-openapi-test-integration go-sigs-k8s-io-yaml)) (propagated-inputs (list go-github-com-emicklei-go-restful-v3 @@ -13446,6 +13596,50 @@ but implement that subset with little to no assumption about the structure of the code or routes.") (license license:asl2.0))) +(define-public go-k8s-io-kube-openapi-test-integration + (package + (name "go-k8s-io-kube-openapi-test-integration") + (version "0.0.0-20250910181357-589584f1c912") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kubernetes/kube-openapi") + (commit (go-version->git-ref version + #:subdir "test/integration")))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1appaqgllddcl6kxkz3azix0xhlzy093vvxi6y3im1mkf5zblwl7")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-26))) + (snippet + #~(begin + (define (delete-all-but directory . preserve) + (with-directory-excursion directory + (let* ((pred (negate (cut member <> + (cons* "." ".." preserve)))) + (items (scandir "." pred))) + (for-each (cut delete-file-recursively <>) items)))) + (delete-all-but "." "test"))))) + (build-system go-build-system) + (arguments + (list + #:skip-build? #t + #:tests? #f + #:import-path "k8s.io/kube-openapi/test/integration" + #:unpack-path "k8s.io/kube-openapi")) + (propagated-inputs + (list go-github-com-emicklei-go-restful-v3 + go-github-com-getkin-kin-openapi + go-k8s-io-utils)) + (home-page "https://k8s.io/kube-openapi") + (synopsis "Kube OpenAPI Integration Tests") + (description + "This package providies itegration tests module for +@code{k8s.io/kube-openapi}.") + (license license:asl2.0))) + (define-public go-maunium-net-go-mautrix (package (name "go-maunium-net-go-mautrix") @@ -13689,7 +13883,6 @@ protocol.") (build-system go-build-system) (arguments (list - #:go go-1.23 #:build-flags #~(list (string-append "-ldflags=" "-X main.lyrebirdVersion=" #$version " -s -w")) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 8f99b38017..fe97132332 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -153,9 +153,10 @@ (build-system go-build-system) (arguments (list - #:go go-1.23 #:skip-build? #t #:import-path "9fans.net/go" + #:test-flags + #~(list "-vet=off") ;Go@1.24 forces vet, but tests are not ready yet. #:test-subdirs #~(list "acme/..." ;; "cmd/..." ; missing packages ;; @@ -519,16 +520,17 @@ file along with an index.html file.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/darccio/mergo") - (commit (string-append "v" version)))) + (url "https://github.com/darccio/mergo") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1q61904rd858ac19vsmmhz69b1hvn0y9rjfb9d2gc4abg64dva57")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "dario.cat/mergo")) + #:import-path "dario.cat/mergo" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-gopkg-in-yaml-v3)) (home-page "https://github.com/darccio/mergo") @@ -638,16 +640,17 @@ commands.") (origin (method git-fetch) (uri (git-reference - (url "https://git.sr.ht/~rockorager/tcell-term") - (commit (string-append "v" version)))) + (url "https://git.sr.ht/~rockorager/tcell-term") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1z64yzr2l5j5r5rqi89jk4madn3ak8hw95lva5ra7gnlyhh2vs05")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "git.sr.ht/~rockorager/tcell-term")) + #:import-path "git.sr.ht/~rockorager/tcell-term" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs @@ -669,16 +672,17 @@ Go library.") (origin (method git-fetch) (uri (git-reference - (url "https://git.sr.ht/~rockorager/vaxis") - (commit (string-append "v" version)))) + (url "https://git.sr.ht/~rockorager/vaxis") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "09n2vafkb4mfxq4fiwf7ir3557q0h91n0s7imhh0789fj19g9j30")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "git.sr.ht/~rockorager/vaxis")) + #:import-path "git.sr.ht/~rockorager/vaxis" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs @@ -786,16 +790,17 @@ Golang.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/a8m/envsubst") - (commit (string-append "v" version)))) + (url "https://github.com/a8m/envsubst") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0pkvza3dr3bs2r8y8gfbckijcpl4w3llxd7zy8hw45zznynb273q")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/a8m/envsubst")) + #:import-path "github.com/a8m/envsubst" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/a8m/envsubst") (synopsis "Environment variables substitution for Go") (description @@ -1132,8 +1137,8 @@ prompts on terminals supporting ANSI escape sequences.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/alecthomas/chroma") - (commit (string-append "v" version)))) + (url "https://github.com/alecthomas/chroma") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0hjzb61m5lzx95xss82wil9s8f9hbw1zb3jj73ljfwkq5lqk76zq")) @@ -1144,8 +1149,9 @@ prompts on terminals supporting ANSI escape sequences.") ;; TODO: Build cmd/chroma and cmd/chromad commands. (arguments (list - #:go go-1.23 - #:import-path "github.com/alecthomas/chroma")) + #:import-path "github.com/alecthomas/chroma" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-alecthomas-kong go-github-com-alecthomas-kong-hcl @@ -1547,16 +1553,17 @@ environment and runtime configuration.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/AndreasBriese/bbloom") - (commit (go-version->git-ref version)))) + (url "https://github.com/AndreasBriese/bbloom") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "021c0pl7r4pc9yslqhbjg9wr6dm03lnzf94a0b9c0hmg0bhhkln9")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/AndreasBriese/bbloom")) + #:import-path "github.com/AndreasBriese/bbloom" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/AndreasBriese/bbloom") (synopsis "Bitset Bloom filter for Golang") (description @@ -1909,16 +1916,17 @@ cluster segmentation algorithm.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/arbovm/levenshtein") - (commit (go-version->git-ref version)))) + (url "https://github.com/arbovm/levenshtein") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0nmx2iip8xpnbmy6gvqpc9ikizr33dr40xgv746h0b0by8n7rv7y")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/arbovm/levenshtein")) + #:import-path "github.com/arbovm/levenshtein" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/arbovm/levenshtein") (synopsis "Levenshtein Distance in Golang") (description @@ -2063,8 +2071,9 @@ for Go.") (build-system go-build-system) (arguments (list - #:go go-1.23 #:import-path "github.com/asaskevich/govalidator" + #:test-flags + #~(list "-vet=off") ;Go@1.24 forces vet, but tests are not ready yet. #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-failing-tests @@ -2619,18 +2628,18 @@ based on murmurhash.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/bmatcuk/doublestar") - (commit (string-append "v" version)))) + (url "https://github.com/bmatcuk/doublestar") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0bk5bixl6rqa8znxghyp6zndbccx9kdyrymjahgyp6qsrp7rk144")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - ;; This test fails with Go 1.16. - #:test-flags #~(list "-skip" "TestMatch") - #:import-path "github.com/bmatcuk/doublestar")) + #:import-path "github.com/bmatcuk/doublestar" + #:test-flags + #~(list "-vet=off" ;Go@1.24 forces vet, but tests are not ready yet. + "-skip" "TestMatch"))) (home-page "https://github.com/bmatcuk/doublestar/") (synopsis "Path pattern matching and globbing supporting doublestar") (description @@ -2673,8 +2682,9 @@ matching and globbing with support for \"doublestar\" patterns.") (base32 "0jskh3dp9xmh1bf1a7dh5ykv0pk2v4pxh5bynsl33cmw61dkd6s0")))) (arguments (list - #:go go-1.23 - #:import-path "github.com/bmatcuk/doublestar/v4")))) + #:import-path "github.com/bmatcuk/doublestar/v4" + #:test-flags + #~(list "-vet=off"))))) ;Go@1.24 forces vet, but tests are not ready yet. (define-public go-github-com-bmizerany-perks-quantile (package @@ -2923,16 +2933,17 @@ strings into words like a POSIX or Windows shell would.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/BurntSushi/toml") - (commit (string-append "v" version)))) + (url "https://github.com/BurntSushi/toml") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "075ay86gn99wlz26x7hp40s4lpc9r026pd2r0ap0pcrvb88inzy1")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/BurntSushi/toml")) + #:import-path "github.com/BurntSushi/toml" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/BurntSushi/toml") (synopsis "Toml parser and encoder for Go") (description @@ -5488,16 +5499,17 @@ gist (https://gist.github.com/kballard/272720).") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/dave/jennifer") - (commit (string-append "v" version)))) + (url "https://github.com/dave/jennifer") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1a0zg8cdnhyqfgrz7jbgpnnz75g5ps1c8cnmbxvfldmy973ziaml")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/dave/jennifer")) + #:import-path "github.com/dave/jennifer" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/dave/jennifer") (synopsis "Code generator for Go") (description "This package provides functionality to generate Go code.") @@ -7028,16 +7040,17 @@ protoc-generated code to validate such constraints.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ergochat/readline") - (commit (string-append "v" version)))) + (url "https://github.com/ergochat/readline") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "16zyk1dzwix5l9iph61img6qn5kryq3kb03dk2lwmrwyr1xdsip3")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/ergochat/readline")) + #:import-path "github.com/ergochat/readline" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-golang-org-x-text go-golang-org-x-sys)) (home-page "https://github.com/ergochat/readline") (synopsis "Readline implementation in pure Go") @@ -7177,8 +7190,8 @@ cases (e.g. snake_case, camelCase, kebab-case, etc).") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/expr-lang/expr") - (commit (string-append "v" version)))) + (url "https://github.com/expr-lang/expr") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0kcpgycdy9fm4g2i4mhp6hprzkg75r0lfrvc0gbwd2wiir460222")) @@ -7194,8 +7207,9 @@ cases (e.g. snake_case, camelCase, kebab-case, etc).") (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/expr-lang/expr")) + #:import-path "github.com/expr-lang/expr" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://expr-lang.org/") (synopsis "Expression language and expression evaluation for Go") (description @@ -7815,16 +7829,17 @@ also favors portability, and includes support for all POSIX systems.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/gdey/errors") - (commit (go-version->git-ref version)))) + (url "https://github.com/gdey/errors") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0mg33xckg5i529jnv6jxvmp36innz0xl5gbkmnww9paak5yvfjb3")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/gdey/errors")) + #:import-path "github.com/gdey/errors" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/gdey/errors") (synopsis "Augmentation of std @code{errors} library") (description @@ -7863,16 +7878,17 @@ library in go standard library.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/ghemawat/stream") - (commit (go-version->git-ref version)))) + (url "https://github.com/ghemawat/stream") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0i0cjvhn2zfnvm9dc9nd9yyq27nmv8j2s7sa0lvcdvv2mbcdvvq8")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/ghemawat/stream")) + #:import-path "github.com/ghemawat/stream" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/ghemawat/stream") (synopsis "UNIX pipe-like chained filters") (description @@ -8048,10 +8064,11 @@ to build @code{delve} - debugger for the Go programming language.") (build-system go-build-system) (arguments (list - #:go go-1.23 #:import-path "github.com/go-errors/errors" - ;; Stack trace does not contain source line: 'a: b(5)'. - #:test-flags #~(list "-skip" "TestStackFormat"))) + #:test-flags + #~(list "-vet=off" ;Go@1.24 forces vet, but tests are not ready yet. + ;; Stack trace does not contain source line: 'a: b(5)'. + "-skip" "TestStackFormat"))) (home-page "https://github.com/go-errors/errors") (synopsis "Errors with stacktraces for Golang") (description @@ -8395,8 +8412,8 @@ professionally translated (origin (method git-fetch) (uri (git-reference - (url "https://github.com/go-spatial/proj") - (commit (string-append "v" version)))) + (url "https://github.com/go-spatial/proj") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0sdjms403rr1smm63p21k95m1dfis06i52y1962jnxidcywzm6i5")) @@ -8406,8 +8423,9 @@ professionally translated (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/go-spatial/proj")) + #:import-path "github.com/go-spatial/proj" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-stretchr-testify)) (home-page "https://github.com/go-spatial/proj") @@ -8613,8 +8631,8 @@ native Go structure.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/gobwas/glob") - (commit (string-append "v" version)))) + (url "https://github.com/gobwas/glob") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 @@ -8622,8 +8640,9 @@ native Go structure.") (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/gobwas/glob")) + #:import-path "github.com/gobwas/glob" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/gobwas/glob") (synopsis "Go globbing library") (description @@ -8837,16 +8856,17 @@ execution.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/gogs/chardet") - (commit (go-version->git-ref version)))) + (url "https://github.com/gogs/chardet") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "12j8q5wc9m4n51v2j2m40nahqdl9bh3hzpdp26clzq91kc2amiz0")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/gogs/chardet")) + #:import-path "github.com/gogs/chardet" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/gogs/chardet") (synopsis "Character set detection for Go") (description @@ -9440,16 +9460,17 @@ provides a buffered io.Writer that is flushed at a timed interval.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/goverter/patherr") - (commit (string-append "v" version)))) + (url "https://github.com/goverter/patherr") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1zjcyva959ir23rgk2rvc7ivlyan9dh2rqw7hl03h6xq935zznjq")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/goverter/patherr")) + #:import-path "github.com/goverter/patherr" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/goverter/patherr") (synopsis "Implementation for Goverter's wrapErrorsUsing") (description @@ -9767,6 +9788,39 @@ single @code{Tree} implementation, optimized for sparse nodes.") (replace "go-github-com-hashicorp-golang-lru" go-github-com-hashicorp-golang-lru-v2))))) +(define-public go-github-com-hashicorp-go-msgpack-v2 + (package + (name "go-github-com-hashicorp-go-msgpack-v2") + (version "2.1.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hashicorp/go-msgpack") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1y87vqmzysbsvdi6di7dq8az4fswm8lsbxxcq54dnhrg40g4y3nd")))) + (build-system go-build-system) + (arguments + (list + #:skip-build? #t + #:import-path "github.com/hashicorp/go-msgpack/v2")) + (propagated-inputs + (list go-golang-org-x-tools)) + (home-page "https://github.com/hashicorp/go-msgpack") + (synopsis "MessagePack implementation in Golang") + (description + "This package provides a High Performance, Feature-Rich Idiomatic +codec/encoding library for msgpack, JSON. + +Supported Serialization formats are: +@itemize +@item msgpack: https://github.com/msgpack/msgpack +@item json: http://json.org http://tools.ietf.org/html/rfc7159 +@end itemize") + (license license:expat))) + (define-public go-github-com-hashicorp-go-multierror (package (name "go-github-com-hashicorp-go-multierror") @@ -9853,16 +9907,17 @@ their component bytes.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/hashicorp/go-version") - (commit (string-append "v" version)))) + (url "https://github.com/hashicorp/go-version") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "04kb102igwnp03rcjjlg7w2lb2dbr7h0w751w72v6imid51kyrsj")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/hashicorp/go-version")) + #:import-path "github.com/hashicorp/go-version" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/hashicorp/go-version") (synopsis "Parsing and verifying versions for Golang") (description @@ -12059,16 +12114,17 @@ using reflink operations on compatible filesystems such as btrfs and xfs.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/karrick/godirwalk") - (commit (string-append "v" version)))) + (url "https://github.com/karrick/godirwalk") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0jyvai5vpmx86l71hg9j6lxc2b4v32ajvcmjlz40zimfb9ip11q9")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/karrick/godirwalk")) + #:import-path "github.com/karrick/godirwalk" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. ;; To build all examples as a test scenario. (native-inputs (list go-github-com-karrick-golf @@ -12953,16 +13009,17 @@ structure. It's a stable fork of https://github.com/mndrix/ps.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/layeh/gopher-luar") - (commit (string-append "v" version)))) + (url "https://github.com/layeh/gopher-luar") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0zfafqy2jwjmrr0gl3h2ivn0iixb0bvslcwcly9bcmc5yxq35m89")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "layeh.com/gopher-luar")) + #:import-path "layeh.com/gopher-luar" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-github-com-yuin-gopher-lua)) (home-page "https://github.com/layeh/gopher-luar") (synopsis "Simplifies data passing to and from gopher-lua") @@ -13013,8 +13070,8 @@ specified by @uref{https://tools.ietf.org/html/rfc2141, IETF RFC 2141}.") (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/leonelquinteros/gotext")) + #:import-path "github.com/leonelquinteros/gotext" + #:test-flags #~(list "-vet=off"))) (propagated-inputs (list go-golang-org-x-tools)) (home-page "https://github.com/leonelquinteros/gotext") @@ -13652,16 +13709,17 @@ generation.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/magiconair/properties") - (commit (string-append "v" version)))) + (url "https://github.com/magiconair/properties") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1cmbh9y51lbn2q2i2jzjfd14spwclg88hfsj4k1kkj1xc2bkwqdj")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/magiconair/properties")) + #:import-path "github.com/magiconair/properties" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/magiconair/properties") (synopsis "Java properties scanner for Go") (description "Java properties scanner for Go") @@ -13675,16 +13733,17 @@ generation.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/makenowjust/heredoc") - (commit (string-append "v" version)))) + (url "https://github.com/makenowjust/heredoc") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "18f21zm8n2wlnkz1ylw8rcxmqxyv2rlz8749yfqggm2m0m2884pj")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/MakeNowJust/heredoc")) + #:import-path "github.com/MakeNowJust/heredoc" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/MakeNowJust/heredoc") (synopsis "Here-documents with indent") (description @@ -13753,16 +13812,17 @@ implementing features like: (origin (method git-fetch) (uri (git-reference - (url "https://github.com/Masterminds/goutils") - (commit (string-append "v" version)))) + (url "https://github.com/Masterminds/goutils") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "09m4mbcdlv9ng3xcrmjlxi0niavby52y9nl2jhjnbx1xxpjw0jrh")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/Masterminds/goutils")) + #:import-path "github.com/Masterminds/goutils" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/Masterminds/goutils/") (synopsis "Utility functions to manipulate strings") (description @@ -15190,16 +15250,17 @@ values pointed to. Unexported field values are not copied.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/motemen/go-quickfix") - (commit (go-version->git-ref version)))) + (url "https://github.com/motemen/go-quickfix") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "0j14k6kfzvfn8v21gf2ssaypicrwb4pvh7yzfa5m1jcc9581j2ad")))) (build-system go-build-system) (arguments (list - #:go go-1.23 ;minimum required version - #:import-path "github.com/motemen/go-quickfix")) + #:import-path "github.com/motemen/go-quickfix" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-golang-org-x-tools)) (home-page "https://github.com/motemen/go-quickfix") (synopsis "Go ASTs fixing library") @@ -15393,16 +15454,17 @@ Authentication Modules, PAM} application API.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/muesli/cancelreader") - (commit (string-append "v" version)))) + (url "https://github.com/muesli/cancelreader") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0157mgpk0z45xizrgrz73swhky0d8nyk6fhwb089n1290k7yjhxq")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/muesli/cancelreader")) + #:import-path "github.com/muesli/cancelreader" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-golang-org-x-sys)) (home-page "https://github.com/muesli/cancelreader") @@ -16229,8 +16291,8 @@ which produce colorized output using github.com/fatih/color.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/nxadm/tail") - (commit (string-append "v" version)))) + (url "https://github.com/nxadm/tail") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0s8lawq661g8qqf7c1cip5l60cm2138b125jgmv9h548ji9g5yqx")) @@ -16240,8 +16302,9 @@ which produce colorized output using github.com/fatih/color.") (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/nxadm/tail")) + #:import-path "github.com/nxadm/tail" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-github-com-fsnotify-fsnotify go-gopkg-in-tomb-v1)) @@ -17003,16 +17066,17 @@ composable way such that accurate error can be reasoned about.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/orisano/pixelmatch") - (commit (go-version->git-ref version)))) + (url "https://github.com/orisano/pixelmatch") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1lplxfif5mfqnd0jjph2vd25c3bpr3idfs2axh8z0ib0zdkwca32")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/orisano/pixelmatch")) + #:import-path "github.com/orisano/pixelmatch" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/orisano/pixelmatch") (synopsis "Pixelmatch port to Go") (description @@ -17181,8 +17245,8 @@ processes.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pborman/getopt") - (commit (string-append "v" version)))) + (url "https://github.com/pborman/getopt") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1sa66n392hzqbahn47grbjyaasvpklnn4s1wkzs1kdwrfdd62kfa")) @@ -17196,8 +17260,9 @@ processes.") (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/pborman/getopt")) + #:import-path "github.com/pborman/getopt" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/pborman/getopt") (synopsis "Getopt style option parsing for Go") (description @@ -17262,16 +17327,17 @@ package (which is based off an earlier version of this package).") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pelletier/go-toml") - (commit (string-append "v" version)))) + (url "https://github.com/pelletier/go-toml") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1wypjrr1axkrkzp4n5gvams94f2sd7dq1pdpd2i35sgpdz6r2m6g")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/pelletier/go-toml")) + #:import-path "github.com/pelletier/go-toml" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-github-com-burntsushi-toml go-github-com-davecgh-go-spew @@ -17588,20 +17654,21 @@ alternative fork of https://github.com/pkg/errors project.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pion/logging/") - (commit (string-append "v" version)))) + (url "https://github.com/pion/logging/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "13c8pkn6nyhayjax77bcysmv9fsyb63gllk2ns880b3hgdcl2l1a")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/pion/logging")) + #:import-path "github.com/pion/logging" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/pion/logging/") (synopsis "Logging library for Golang projects") (description -"This package provides a logging library used by @url{https://github.com/pion, + "This package provides a logging library used by @url{https://github.com/pion, Pion}.") (license license:expat))) @@ -17613,16 +17680,17 @@ Pion}.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pkg/diff") - (commit (go-version->git-ref version)))) + (url "https://github.com/pkg/diff") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1iwaa6g3mbbi1k6rw7fn85sg6lm6rlnjz07yb91hq1kll6494s18")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/pkg/diff")) + #:import-path "github.com/pkg/diff" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/pkg/diff/") (synopsis "Create and print diffs") (description @@ -17728,16 +17796,17 @@ https://en.wikipedia.org/wiki/Extended_file_attributes}.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/polydawn/refmt/") - (commit (string-append "v" version)))) + (url "https://github.com/polydawn/refmt/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1v4av75nlgvps5q2h3q6w3cmry0gg316l82zmj6sph9bp2c87621")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/polydawn/refmt")) + #:import-path "github.com/polydawn/refmt" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-github-com-go-yaml-yaml go-github-com-smartystreets-goconvey @@ -19276,16 +19345,17 @@ GNU/Linux, this is a proxy for the @command{xdg-open} command.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/smacker/go-tree-sitter") - (commit (go-version->git-ref version)))) + (url "https://github.com/smacker/go-tree-sitter") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "15c7w5dv7zvhvgrf71fp5l74mjkiniqgz2cbv024pmkcwsvv48yj")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/smacker/go-tree-sitter")) + #:import-path "github.com/smacker/go-tree-sitter" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-stretchr-testify)) (home-page "https://github.com/smacker/go-tree-sitter") (synopsis "Golang bindings for tree-sitter") @@ -19553,16 +19623,17 @@ a few advantages over using the standard log library alone. (origin (method git-fetch) (uri (git-reference - (url "https://github.com/spf13/pflag") - (commit (string-append "v" version)))) + (url "https://github.com/spf13/pflag") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0ckdaa5q3afhgx5hi45czxn2pcc5fd0sz4axh4hqxyvgsjfjvmg0")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/spf13/pflag")) + #:import-path "github.com/spf13/pflag" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/spf13/pflag") (synopsis "Replacement for Go's @code{flag} package") (description @@ -21025,16 +21096,17 @@ datastore connectivity and testing (viant/dsc, viant/dsunit).") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/viant/xunsafe") - (commit (string-append "v" version)))) + (url "https://github.com/viant/xunsafe") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0q9zqz6p8spf7nq9r75yv9zizxf80mg0i6w0y9a0qxcgpnji0a3z")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/viant/xunsafe")) + #:import-path "github.com/viant/xunsafe" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-github-com-stretchr-testify)) (propagated-inputs @@ -21138,16 +21210,17 @@ weighted moving averages}.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/vmihailenco/msgpack") - (commit (string-append "v" version)))) + (url "https://github.com/vmihailenco/msgpack") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "08jdq8wh6i1f2avl46l5ndfrvhfl4l276hz4y1xq6agwbwrvycdy")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/vmihailenco/msgpack/v4")) + #:import-path "github.com/vmihailenco/msgpack/v4" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (native-inputs (list go-gopkg-in-check-v1)) (propagated-inputs @@ -21298,16 +21371,17 @@ Redis.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/warpfork/go-fsx") - (commit (string-append "v" version)))) + (url "https://github.com/warpfork/go-fsx") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1yhh42vp12hnkhlfimcab4a2df2apprnlg3ll75yr2pd0b001p5b")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "github.com/warpfork/go-fsx")) + #:import-path "github.com/warpfork/go-fsx" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/warpfork/go-fsx") (synopsis "Extended filesystem interface for Golang") (description @@ -23443,53 +23517,23 @@ distributions of benchmark measurements (list #:import-path "gopkg.in/alecthomas/kingpin.v2")))) -(define-public go-gopkg-in-inconshreveable-log15-v1 - (package - (name "go-gopkg-in-inconshreveable-log15-v1") - (version "1.2") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/inconshreveable/log15") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1hz7vnzn4cbiqra443mhmp63ifzq15xsfnyc9jmxh2p1ngwxp2n2")))) - (build-system go-build-system) - (arguments - (list - #:test-flags #~(list "-skip" "TestFailoverHandler|TestLazy") - #:import-path "gopkg.in/inconshreveable/log15.v1")) - (native-inputs - (list go-github-com-stretchr-testify)) - (home-page "https://pkg.go.dev/github.com/inconshreveable/log15") - (synopsis "Structured, composable logging for Golang") - (description - "This package provides a toolkit for logging that is both human and -machine readable. It is modeled after the Go standard library's @code{io} and -@code{net/http} packages and is an alternative to the standard library's -@code{log} package.") - (license license:asl2.0))) - (define-public go-gopkg-in-inconshreveable-log15-v2 (package - (inherit go-gopkg-in-inconshreveable-log15-v1) (name "go-gopkg-in-inconshreveable-log15-v2") (version "2.16.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/inconshreveable/log15") - (commit (string-append "v" version)))) + (url "https://github.com/inconshreveable/log15") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "117ivm1asxw2hlwb3zf72q553ywjk00bsn21bpwi99q784ghr4wd")))) + (build-system go-build-system) (arguments (list #:import-path "gopkg.in/inconshreveable/log15.v2" - #:test-flags #~(list "-skip" "TestCallerStackHandler") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-import-path @@ -23497,10 +23541,20 @@ machine readable. It is modeled after the Go standard library's @code{io} and (with-directory-excursion (string-append "src/" import-path) (substitute* (find-files "." "\\.go$") (("github.com/inconshreveable/log15") import-path)))))))) + (native-inputs + (list go-github-com-stretchr-testify)) (propagated-inputs (list go-github-com-go-stack-stack go-github-com-mattn-go-colorable - go-golang-org-x-term)))) + go-golang-org-x-term)) + (home-page "https://pkg.go.dev/github.com/inconshreveable/log15") + (synopsis "Structured, composable logging for Golang") + (description + "This package provides a toolkit for logging that is both human and +machine readable. It is modeled after the Go standard library's @code{io} and +@code{net/http} packages and is an alternative to the standard library's +@code{log} package.") + (license license:asl2.0))) (define-public go-gopkg-in-inconshreveable-log15-v3 (package @@ -23921,7 +23975,7 @@ without direct type dependencies. Its first consumers are (define-public go-k8s-io-gengo-v2 (package (name "go-k8s-io-gengo-v2") - (version "2.0.0-20240911193312-2b36238f13e9") + (version "2.0.0-20250604051438-85fd79dbfd9f") (source (origin (method git-fetch) @@ -23930,7 +23984,7 @@ without direct type dependencies. Its first consumers are (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0ffwigrg92ivyb5r6g0alb4z8iydp9lkdviz3vm62gr89yw28yc7")))) + (base32 "198nq5ndb5cawsrp90rab0m3vyhrnv7q3bxpqz7l926d15vqbvsd")))) (build-system go-build-system) (arguments (list @@ -24713,16 +24767,17 @@ It allows one to safely call Unveil / Pledge on non-OpenBSD operating systems.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/arp242/jfmt") - (commit (go-version->git-ref version)))) + (url "https://github.com/arp242/jfmt") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "1nc3n3lf0ixzpk85sadp2w4yg9v39pdb2z0i1rpxksdayax009wa")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "zgo.at/jfmt")) + #:import-path "zgo.at/jfmt" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (propagated-inputs (list go-zgo-at-termtext go-zgo-at-zli @@ -24796,16 +24851,17 @@ terminals.") (origin (method git-fetch) (uri (git-reference - (url "https://github.com/arp242/zli") - (commit (go-version->git-ref version)))) + (url "https://github.com/arp242/zli") + (commit (go-version->git-ref version)))) (file-name (git-file-name name version)) (sha256 (base32 "120nlnxhzdmk1lh7cfgajkl85n8mfd00cn5csyislris9q2n2rxb")))) (build-system go-build-system) (arguments (list - #:go go-1.23 - #:import-path "zgo.at/zli")) + #:import-path "zgo.at/zli" + #:test-flags + #~(list "-vet=off"))) ;Go@1.24 forces vet, but tests are not ready yet. (home-page "https://github.com/arp242/zli") (synopsis "Go library for writing command line interface programs") (description diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index ed9a32e610..30409de09d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -117,10 +117,6 @@ (guix build utils) (srfi srfi-1)) #:tests? #f ; Tests are run by the all.bash script. - ,@(if (string-prefix? "aarch64-linux" (or (%current-system) - (%current-target-system))) - '(#:system "armhf-linux") - '()) #:phases (modify-phases %standard-phases (delete 'configure) @@ -235,7 +231,7 @@ (inputs `(("tzdata" ,tzdata) ("pcre" ,pcre) - ("gcc:lib" ,(canonical-package gcc) "lib"))) + ("gcc:lib" ,gcc "lib"))) (native-inputs (list pkg-config which net-base perl)) @@ -246,233 +242,9 @@ programming language designed primarily for systems programming. Go is a compiled, statically typed language in the tradition of C and C++, but adds garbage collection, various safety features, and concurrent programming features in the style of communicating sequential processes (@dfn{CSP}).") - (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux")) + (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) (license license:bsd-3))) -(define-public go-1.16 - (package - (inherit go-1.4) - (name "go") - (version "1.16.15") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/golang/go") - (commit (string-append "go" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0vlk0r4600ah9fg5apdd93g7i369k0rkzcgn7cs8h6qq2k6hpxjl")))) - (arguments - (substitute-keyword-arguments - (strip-keyword-arguments '(#:tests? #:system) (package-arguments go-1.4)) - ((#:phases phases) - `(modify-phases ,phases - ;; Time bomb in TLS tests: "Most of the test certificates - ;; (e.g. testRSACertificate, testRSACertificateIssuer, - ;; testRSA2048CertificateIssuer) have a not after of Jan 1 - ;; 00:00:00 2025 GMT." - ;; https://github.com/golang/go/issues/71077 - ;; https://github.com/golang/go/issues/71103 - ;; https://github.com/golang/go/issues/71104 - (add-after 'unpack 'skip-crypto-tls-tests - (lambda _ - (substitute* (list "src/crypto/tls/handshake_client_test.go" - "src/crypto/tls/handshake_server_test.go") - (("TestVerifyConnection.*" all) - (string-append all "\n t.Skip(\"golang.org/issue/71077\")\n")) - (("TestResumptionKeepsOCSPAndSCT.*" all) - (string-append all "\n t.Skip(\"golang.org/issue/71077\")\n")) - (("TestCrossVersionResume.*" all) - (string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))))) - (add-after 'unpack 'remove-unused-sourcecode-generators - (lambda _ - ;; Prevent perl from inclusion in closure through unused files - (for-each delete-file (find-files "src" "\\.pl$")))) - (replace 'prebuild - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib")) - (net-base (assoc-ref inputs "net-base")) - (tzdata-path - (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) - - ;; Having the patch in the 'patches' field of <origin> breaks - ;; the 'TestServeContent' test due to the fact that - ;; timestamps are reset. Thus, apply it from here. - (invoke "patch" "-p2" "--force" "-i" - (assoc-ref inputs "go-skip-gc-test.patch")) - (invoke "patch" "-p2" "--force" "-i" - (assoc-ref inputs "go-fix-script-tests.patch")) - - (for-each make-file-writable (find-files ".")) - - (substitute* "os/os_test.go" - (("/usr/bin") (getcwd)) - (("/bin/sh") (which "sh"))) - - (substitute* "cmd/go/testdata/script/cgo_path_space.txt" - (("/bin/sh") (which "sh"))) - - ;; Add libgcc to runpath - (substitute* "cmd/link/internal/ld/lib.go" - (("!rpath.set") "true")) - (substitute* "cmd/go/internal/work/gccgo.go" - (("cgoldflags := \\[\\]string\\{\\}") - (string-append "cgoldflags := []string{" - "\"-Wl,-rpath=" gcclib "\"" - "}")) - (("\"-lgcc_s\", ") - (string-append - "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", "))) - (substitute* "cmd/go/internal/work/gc.go" - (("ldflags = setextld\\(ldflags, compiler\\)") - (string-append - "ldflags = setextld(ldflags, compiler)\n" - "ldflags = append(ldflags, \"-r\")\n" - "ldflags = append(ldflags, \"" gcclib "\")\n"))) - - ;; Disable failing tests: these tests attempt to access - ;; commands or network resources which are neither available - ;; nor necessary for the build to succeed. - (for-each - (match-lambda - ((file regex) - (substitute* file - ((regex all before test_name) - (string-append before "Disabled" test_name))))) - '(("net/net_test.go" "(.+)(TestShutdownUnix.+)") - ("net/dial_test.go" "(.+)(TestDialTimeout.+)") - ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPort.+)") - ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPortWithCancel.+)") - ;; 127.0.0.1 doesn't exist - ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTR.+)") - ;; 127.0.0.1 doesn't exist - ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTRWithCancel.+)") - ;; /etc/services doesn't exist - ("net/parse_test.go" "(.+)(TestReadLine.+)") - ("os/os_test.go" "(.+)(TestHostname.+)") - ;; The user's directory doesn't exist - ("os/os_test.go" "(.+)(TestUserHomeDir.+)") - ("time/format_test.go" "(.+)(TestParseInSydney.+)") - ("time/format_test.go" "(.+)(TestParseInLocation.+)") - ("os/exec/exec_test.go" "(.+)(TestEcho.+)") - ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)") - ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)") - ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)") - ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)") - ("os/exec/exec_test.go" "(.+)(TestPipes.+)") - ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)") - ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)") - ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)") - ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)") - ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)") - ("cmd/go/go_test.go" "(.+)(TestTwoPkgConfigs.+)") - ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)") - ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)") - ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)") - ("net/lookup_test.go" "(.+)(TestLookupPort.+)") - ("syscall/exec_linux_test.go" - "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)"))) - - ;; These tests fail on aarch64-linux - (substitute* "cmd/dist/test.go" - (("t.registerHostTest\\(\"testsanitizers/msan.*") "")) - - ;; fix shebang for testar script - ;; note the target script is generated at build time. - (substitute* "../misc/cgo/testcarchive/carchive_test.go" - (("#!/usr/bin/env") (string-append "#!" (which "env")))) - - (substitute* "net/lookup_unix.go" - (("/etc/protocols") (string-append net-base "/etc/protocols"))) - (substitute* "net/port_unix.go" - (("/etc/services") (string-append net-base "/etc/services"))) - (substitute* "time/zoneinfo_unix.go" - (("/usr/share/zoneinfo/") tzdata-path))))) - (add-before 'build 'set-bootstrap-variables - (lambda* (#:key outputs inputs #:allow-other-keys) - ;; Tell the build system where to find the bootstrap Go. - (let ((go (assoc-ref inputs "go"))) - (setenv "GOROOT_BOOTSTRAP" go) - (setenv "GOGC" "400")))) - (replace 'build - (lambda* (#:key inputs outputs (parallel-build? #t) - #:allow-other-keys) - ;; FIXME: Some of the .a files are not bit-reproducible. - ;; (Is this still true?) - (let* ((njobs (if parallel-build? (parallel-job-count) 1)) - (output (assoc-ref outputs "out")) - (loader (string-append (assoc-ref inputs "libc") - ,(glibc-dynamic-linker)))) - (setenv "CC" (which "gcc")) - (setenv "GO_LDSO" loader) - (setenv "GOOS" "linux") - (setenv "GOROOT" (dirname (getcwd))) - (setenv "GOROOT_FINAL" output) - (setenv "GOCACHE" "/tmp/go-cache") - (setenv "GOMAXPROCS" (number->string njobs)) - (invoke "sh" "make.bash" "--no-banner")))) - (replace 'check - (lambda* (#:key target (tests? (not target)) (parallel-tests? #t) - #:allow-other-keys) - (let* ((njobs (if parallel-tests? (parallel-job-count) 1))) - (when tests? - (setenv "GOMAXPROCS" (number->string njobs)) - (invoke "sh" "run.bash" "--no-rebuild"))))) - (add-before 'install 'unpatch-perl-shebangs - (lambda _ - ;; Rewrite references to perl input in test scripts - (substitute* "net/http/cgi/testdata/test.cgi" - (("^#!.*") "#!/usr/bin/env perl\n")))) - (replace 'install - ;; TODO: Most of this could be factorized with Go 1.4. - (lambda* (#:key outputs #:allow-other-keys) - (let* ((output (assoc-ref outputs "out")) - (doc_out (assoc-ref outputs "doc")) - (docs (string-append doc_out "/share/doc/" ,name "-" ,version)) - (src (string-append - (assoc-ref outputs "tests") "/share/" ,name "-" ,version))) - ;; Prevent installation of the build cache, which contains - ;; store references to most of the tools used to build Go and - ;; would unnecessarily increase the size of Go's closure if it - ;; was installed. - (delete-file-recursively "../pkg/obj") - - (mkdir-p src) - (copy-recursively "../test" (string-append src "/test")) - (delete-file-recursively "../test") - (mkdir-p docs) - (copy-recursively "../api" (string-append docs "/api")) - (delete-file-recursively "../api") - (copy-recursively "../doc" (string-append docs "/doc")) - (delete-file-recursively "../doc") - - (for-each - (lambda (file) - (let* ((filein (string-append "../" file)) - (fileout (string-append docs "/" file))) - (copy-file filein fileout) - (delete-file filein))) - ;; Note the slightly different file names compared to 1.4. - '("README.md" "CONTRIBUTORS" "AUTHORS" "PATENTS" - "LICENSE" "VERSION" "CONTRIBUTING.md" "robots.txt")) - - (copy-recursively "../" output)))))))) - (native-inputs - `(,@(if (member (%current-system) (package-supported-systems go-1.4)) - `(("go" ,go-1.4)) - `(("go" ,gccgo-12))) - ("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch")) - ,@(match (%current-system) - ((or "armhf-linux" "aarch64-linux") - `(("gold" ,binutils-gold))) - (_ `())) - ("go-fix-script-tests.patch" ,(search-patch "go-fix-script-tests.patch")) - ,@(package-native-inputs go-1.4))) - (supported-systems (fold delete %supported-systems - (list "powerpc-linux" "i586-gnu" "x86_64-gnu"))))) - ;; https://github.com/golang/go/wiki/MinimumRequirements#microarchitecture-support (define %go-1.17-arm-micro-architectures (list "armv5" "armv6" "armv7")) @@ -482,7 +254,6 @@ in the style of communicating sequential processes (@dfn{CSP}).") (define-public go-1.17 (package - (inherit go-1.16) (name "go") (version "1.17.13") (source @@ -496,13 +267,14 @@ in the style of communicating sequential processes (@dfn{CSP}).") (base32 "05m8gr050kagvn22lfnjrgms03l5iphd1m4v6z7yqlhn9gdp912d")))) (outputs '("out" "tests")) ; 'tests' contains distribution tests. + (build-system gnu-build-system) (arguments `(#:modules ((ice-9 match) (guix build gnu-build-system) (guix build utils)) ;; TODO: Disable the test(s) in misc/cgo/test/cgo_test.go ;; that cause segfaults in the test suite. - #:tests? ,(not (or (target-aarch64?) (target-riscv64?))) + #:tests? ,(not (or (target-arm32?) (target-riscv64?))) #:phases (modify-phases %standard-phases (replace 'configure @@ -571,30 +343,26 @@ in the style of communicating sequential processes (@dfn{CSP}).") (string-append net-base "/etc/services"))) (substitute* "src/time/zoneinfo_unix.go" (("/usr/share/zoneinfo/") tzdata-path))))) - ;; Keep this synchronized with the package inputs. - ;; Also keep syncthonized with later versions of go. - ,@(if (or (target-arm?) (target-ppc64le?)) - '((add-after 'unpack 'patch-gcc:lib - (lambda* (#:key inputs #:allow-other-keys) - (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))) - ;; Add libgcc to runpath - (substitute* "src/cmd/link/internal/ld/lib.go" - (("!rpath.set") "true")) - (substitute* "src/cmd/go/internal/work/gccgo.go" - (("cgoldflags := \\[\\]string\\{\\}") - (string-append "cgoldflags := []string{" - "\"-Wl,-rpath=" gcclib "\"" - "}")) - (("\"-lgcc_s\", ") - (string-append - "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", "))) - (substitute* "src/cmd/go/internal/work/gc.go" - (("ldflags = setextld\\(ldflags, compiler\\)") - (string-append - "ldflags = setextld(ldflags, compiler)\n" - "ldflags = append(ldflags, \"-r\")\n" - "ldflags = append(ldflags, \"" gcclib "\")\n"))))))) - '()) + (add-after 'unpack 'patch-gcc:lib + (lambda* (#:key inputs #:allow-other-keys) + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))) + ;; Add libgcc to runpath + (substitute* "src/cmd/link/internal/ld/lib.go" + (("!rpath.set") "true")) + (substitute* "src/cmd/go/internal/work/gccgo.go" + (("cgoldflags := \\[\\]string\\{\\}") + (string-append "cgoldflags := []string{" + "\"-Wl,-rpath=" gcclib "\"" + "}")) + (("\"-lgcc_s\", ") + (string-append + "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", "))) + (substitute* "src/cmd/go/internal/work/gc.go" + (("ldflags = setextld\\(ldflags, compiler\\)") + (string-append + "ldflags = setextld(ldflags, compiler)\n" + "ldflags = append(ldflags, \"-r\")\n" + "ldflags = append(ldflags, \"" gcclib "\")\n")))))) ;; Backported from later versions of go to workaround 64k page sizes. ,@(if (target-ppc64le?) '((add-after 'unpack 'adjust-test-suite @@ -713,85 +481,87 @@ in the style of communicating sequential processes (@dfn{CSP}).") (install-file file (string-append out "/share/doc/go"))) '("AUTHORS" "CONTRIBUTORS" "CONTRIBUTING.md" "PATENTS" "README.md" "SECURITY.md")))))))) - (inputs (if (not (or (target-arm?) (target-ppc64le?))) - (alist-delete "gcc:lib" (package-inputs go-1.16)) - (package-inputs go-1.16))) + (inputs + `(("tzdata" ,tzdata) + ("pcre" ,pcre) + ("gcc:lib" ,gcc "lib"))) + (native-inputs + `(,@(if (member (%current-system) (package-supported-systems go-1.4)) + `(("go" ,go-1.4)) + `(("go" ,gccgo-12))) + ("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch")) + ("go-fix-script-tests.patch" ,(search-patch "go-fix-script-tests.patch")) + ,@(package-native-inputs go-1.4) + ;; For plugin.test which requires "-fuse-ld=gold" + ,@(match (%current-system) + ((or "armhf-linux" "aarch64-linux") + `(("gold" ,binutils-gold))) + (_ `())))) + (home-page "https://go.dev/") + (synopsis "Compiler and libraries for Go, a statically-typed language") + (description "Go, also commonly referred to as golang, is an imperative +programming language designed primarily for systems programming. Go is a +compiled, statically typed language in the tradition of C and C++, but adds +garbage collection, various safety features, and concurrent programming features +in the style of communicating sequential processes (@dfn{CSP}).") + (supported-systems (fold delete %supported-systems + (list "powerpc-linux" "i586-gnu" "x86_64-gnu"))) (properties `((compiler-cpu-architectures ("armhf" ,@%go-1.17-arm-micro-architectures) - ("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures)))))) + ("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures)))) + (license license:bsd-3))) (define %go-1.18-x86_64-micro-architectures ;; GOAMD defaults to 'v1' so we match the default elsewhere. (list "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4")) -(define-public go-1.18 +(define-public go-1.20 (package (inherit go-1.17) (name "go") - (version "1.18.10") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/golang/go") - (commit (string-append "go" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0ph3ajfq5q8j3nd91pfb25pm21aiphc58zf7fwis0h3a6nqbdyq9")))) + (version "1.20.14") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/golang/go") + (commit (string-append "go" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1aqhc23705q76dca3g0fzq98kxkhyq628s0811qgzgz4wmngsjfm")))) (arguments (substitute-keyword-arguments (package-arguments go-1.17) - ((#:phases phases) - `(modify-phases ,phases - (delete 'adjust-test-suite) - ,@(if (or (target-arm?) (target-ppc64le?)) - '((replace 'patch-gcc:lib - (lambda* (#:key inputs #:allow-other-keys) - (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))) - ;; Add libgcc to runpath - (substitute* "src/cmd/link/internal/ld/lib.go" - (("!rpath.set") "true")) - (substitute* "src/cmd/go/internal/work/gccgo.go" - (("cgoldflags := \\[\\]string\\{\\}") - (string-append "cgoldflags := []string{" - "\"-Wl,-rpath=" gcclib "\"" - "}")) - (("\"-lgcc_s\", ") - (string-append - "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", "))) - (substitute* "src/cmd/go/internal/work/gc.go" - (("ldflags, err := setextld\\(ldflags, compiler\\)") - (string-append - "ldflags, err := setextld(ldflags, compiler)\n" - "ldflags = append(ldflags, \"-r\")\n" - "ldflags = append(ldflags, \"" gcclib "\")\n"))))))) - '()))))) - (properties - `((compiler-cpu-architectures - ("armhf" ,@%go-1.17-arm-micro-architectures) - ("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures) - ("x86_64" ,@%go-1.18-x86_64-micro-architectures)))))) - -(define-public go-1.19 - (package - (inherit go-1.18) - (name "go") - (version "1.19.7") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/golang/go") - (commit (string-append "go" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0rrpfhv6vdwqs0jnld0iqsky5wlirir05czf34kvsf2db21nzdi9")))) - (arguments - (substitute-keyword-arguments (package-arguments go-1.18) + ((#:parallel-tests? _ #t) + (not (target-riscv64?))) + ;; TODO: Disable the test(s) in misc/cgo/test/cgo_test.go + ;; that cause segfaults in the test suite. + ((#:tests? _ (not (%current-target-system))) + (and (not (%current-target-system)) + (not (target-riscv64?)))) ((#:phases phases) #~(modify-phases #$phases + (delete 'adjust-test-suite) + (replace 'patch-gcc:lib + (lambda* (#:key inputs #:allow-other-keys) + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))) + ;; Add libgcc to runpath + (substitute* "src/cmd/link/internal/ld/lib.go" + (("!rpath.set") "true")) + (substitute* "src/cmd/go/internal/work/gccgo.go" + (("cgoldflags := \\[\\]string\\{\\}") + (string-append "cgoldflags := []string{" + "\"-Wl,-rpath=" gcclib "\"" + "}")) + (("\"-lgcc_s\", ") + (string-append + "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", "))) + (substitute* "src/cmd/go/internal/work/gc.go" + (("ldflags, err := setextld\\(ldflags, compiler\\)") + (string-append + "ldflags, err := setextld(ldflags, compiler)\n" + "ldflags = append(ldflags, \"-r\")\n" + "ldflags = append(ldflags, \"" gcclib "\")\n")))))) ;; These are recurring test failures, depending on having a new ;; enough version of gccgo. gccgo-12.2 fails with go-1.19.7. ;; https://github.com/golang/go/issues/22224 @@ -809,31 +579,68 @@ in the style of communicating sequential processes (@dfn{CSP}).") (install-file file (string-append #$output "/share/doc/go"))) '("CONTRIBUTING.md" "PATENTS" "README.md" - "SECURITY.md")))))))))) - -(define-public go-1.20 - (package - (inherit go-1.19) - (name "go") - (version "1.20.2") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/golang/go") - (commit (string-append "go" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0ir0x17i9067i48ffskwlmbx1j4kfhch46zl8cwl88y23aw59qa2")))) + "SECURITY.md")))) + (add-after 'disable-failing-tests 'disable-more-tests + (lambda _ + ;; Unclear why this test fails on x86_64. + (substitute* "misc/cgo/testsanitizers/asan_test.go" + ((".*arena_fail.*") "") + ((".*asan_global1_fail.*") "")) + ;; error while loading shared libraries: libgcc_s.so.1: + ;; cannot open shared object file: No such file or directory + (for-each delete-file + '("test/fixedbugs/bug514.go" + "test/fixedbugs/issue40954.go" + "test/fixedbugs/issue42032.go" + "test/fixedbugs/issue42076.go" + "test/fixedbugs/issue51733.go")) + #$@(cond + ((target-aarch64?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 and is enabled and + ;; disabled upstream with some regularity. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "// +build !linux linux,!arm64\n\n" + "package plugin_test"))) + ;; collect2: fatal error: cannot find ‘ld’ + (substitute* "src/cmd/dist/test.go" + ((".*testcshared.*") "") + ((".*testshared.*") "")))) + ((target-arm32?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 so we disable + ;; it on armhf also since we emulate armhf on aarch64. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "// +build !linux linux,!arm\n\n" + "package plugin_test"))) + ;; collect2: fatal error: cannot find ‘ld’ + (substitute* "src/cmd/dist/test.go" + ((".*testcshared.*") "") + ((".*testshared.*") "")))) + ((target-riscv64?) + #~((substitute* "src/runtime/lockrank_test.go" + (("TestLockRankGenerated.*" all) + (string-append + all "\n " + "t.Skip(\"golang.org/issue/22224\")\n"))))) + (else #~())))))))) (native-inputs ;; Go 1.20 and later requires Go 1.17 as the bootstrap toolchain. ;; See 'src/cmd/dist/notgo117.go' in the source code distribution, ;; as well as the upstream discussion of this topic: ;; https://go.dev/issue/44505 ;; We continue to use gccgo-12 since it provides go-1.18. + ;; We remove gold since it causes test failures on aarch64-linux. (if (member (%current-system) (package-supported-systems go-1.4)) (alist-replace "go" (list go-1.17) (package-native-inputs go-1.17)) - (package-native-inputs go-1.17))))) + (alist-delete "gold" (package-native-inputs go-1.17)))) + (properties + `((compiler-cpu-architectures + ("armhf" ,@%go-1.17-arm-micro-architectures) + ("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures) + ("x86_64" ,@%go-1.18-x86_64-micro-architectures)))))) (define-public go-1.21 (package @@ -850,7 +657,9 @@ in the style of communicating sequential processes (@dfn{CSP}).") (base32 "0x4qdib1d3gzgz620aysi1rrg682g93710dar4ga32b0j0w5kbhj")))) (arguments - (substitute-keyword-arguments (package-arguments go-1.20) + (substitute-keyword-arguments + (strip-keyword-arguments '(#:tests?) + (package-arguments go-1.20)) ;; Source patching phases are broken up into discrete steps to allow ;; future versions to discard individual phases without having to ;; discard all source patching. @@ -858,6 +667,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") #~(modify-phases #$phases (delete 'skip-TestGoPathShlibGccgo-tests) (delete 'patch-source) + (delete 'disable-more-tests) (add-after 'unpack 'patch-os-tests (lambda _ (substitute* "src/os/os_test.go" @@ -978,7 +788,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (define-public go-1.22 (package - (inherit go-1.21) + (inherit go-1.20) (name "go") (version "1.22.12") (source @@ -991,9 +801,159 @@ in the style of communicating sequential processes (@dfn{CSP}).") (sha256 (base32 "0f0fr92z3l3szmxf3wvh20w1sqayvd927gawdp5d44cc44pd6c0n")))) (arguments - (substitute-keyword-arguments (package-arguments go-1.21) + (substitute-keyword-arguments (package-arguments go-1.20) + ((#:parallel-tests? _ #t) + (or (not (target-riscv64?)) + (not (target-arm32?)))) ((#:phases phases) #~(modify-phases #$phases + ;; Source patching phases are broken up into discrete steps to allow + ;; future versions to discard individual phases without having to + ;; discard all source patching. + (delete 'skip-TestGoPathShlibGccgo-tests) + (delete 'patch-source) + (add-after 'unpack 'patch-os-tests + (lambda _ + (substitute* "src/os/os_test.go" + (("/usr/bin") (getcwd)) + (("/bin/sh") (which "sh"))))) + + (add-after 'unpack 'apply-patches + (lambda* (#:key inputs #:allow-other-keys) + ;; Having the patch in the 'patches' field of <origin> breaks + ;; the 'TestServeContent' test due to the fact that timestamps + ;; are reset. Thus, apply it from here. + (invoke "patch" "-p1" "--force" "-i" + (assoc-ref inputs "go-fix-script-tests.patch")))) + + (add-after 'unpack 'patch-src/net + (lambda* (#:key inputs #:allow-other-keys) + (let ((net-base (assoc-ref inputs "net-base"))) + (substitute* "src/net/lookup_unix.go" + (("/etc/protocols") + (string-append net-base "/etc/protocols"))) + (substitute* "src/net/port_unix.go" + (("/etc/services") + (string-append net-base "/etc/services")))))) + + (add-after 'unpack 'patch-zoneinfo + (lambda* (#:key inputs #:allow-other-keys) + ;; Add the path to this specific version of tzdata's zoneinfo + ;; file to the top of the list to search. We don't want to + ;; replace any sources because it will affect how binaries + ;; compiled with this Go toolchain behave on non-guix + ;; platforms. + (substitute* "src/time/zoneinfo_unix.go" + (("var platformZoneSources.+" all) + (format #f "~a~%\"~a/share/zoneinfo\",~%" + all + (assoc-ref inputs "tzdata")))))) + + (add-after 'unpack 'patch-cmd/go/testdata/script + (lambda _ + (substitute* "src/cmd/go/testdata/script/cgo_path_space.txt" + (("/bin/sh") (which "sh"))))) + + (add-after 'unpack 'remove-failing-test + (lambda _ + ;; This test fails with newer gcc's + ;; https://github.com/golang/go/issues/57691 + (substitute* "src/cmd/cgo/internal/testsanitizers/asan_test.go" + ((".*arena_fail.*") "")))) + + (add-after 'enable-external-linking 'enable-external-linking-1.21 + (lambda _ + ;; Invoke GCC to link any archives created with GCC (that is, + ;; any packages built using 'cgo'), because Go doesn't know + ;; how to handle the runpaths but GCC does. Use substitute* + ;; rather than a patch since these files are liable to change + ;; often. + ;; + ;; XXX: Replace with GO_EXTLINK_ENABLED=1 or similar when + ;; <https://github.com/golang/go/issues/31544> and/or + ;; <https://github.com/golang/go/issues/43525> are resolved. + (substitute* "src/cmd/link/internal/ld/config.go" + (("\\(iscgo && \\(.+\\)") "iscgo")) + (substitute* "src/internal/testenv/testenv.go" + (("!CanInternalLink.+") "true {\n")) + (substitute* "src/syscall/exec_linux_test.go" + (("testenv.MustHaveExecPath\\(t, \"whoami\"\\)") + "t.Skipf(\"no passwd file present\")")))) + + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + ;; Notably, we do not install archives (180M), which Go will + ;; happily recompile quickly (and cache) if needed, almost + ;; surely faster than they could be substituted. + ;; + ;; The main motivation for pre-compiled archives is to use + ;; libc-linked `net' or `os' packages without a C compiler, + ;; but on Guix a C compiler is necessary to properly link the + ;; final binaries anyway. Many build flags also invalidate + ;; these pre-compiled archives, so in practice Go often + ;; recompiles them anyway. + ;; + ;; Upstream is also planning to no longer install these + ;; archives: <https://github.com/golang/go/issues/47257>. + ;; + ;; When necessary, a custom pre-compiled library package can + ;; be created with `#:import-path "std"' and used with + ;; `-pkgdir'. + ;; + ;; When moving files into place, any files that come from + ;; GOROOT should remain in GOROOT to continue functioning. If + ;; they need to be referenced from some other directory, they + ;; need to be symlinked from GOROOT. For more information, + ;; please see <https://github.com/golang/go/issues/61921>. + (let* ((out (assoc-ref outputs "out")) + (tests (assoc-ref outputs "tests"))) + (for-each + (lambda (file) + (copy-recursively file (string-append out "/lib/go/" file))) + '("bin" "go.env" "lib" "VERSION" "pkg/include" "pkg/tool")) + + (symlink "lib/go/bin" (string-append out "/bin")) + + (for-each + (match-lambda + ((file dest output) + ;; Copy to output/dest and symlink from + ;; output/lib/go/file. + (let ((file* (string-append output "/lib/go/" file)) + (dest* (string-append output "/" dest))) + (copy-recursively file dest*) + (mkdir-p (dirname file*)) + (symlink (string-append "../../" dest) file*)))) + `(("src" "share/go/src" ,out) + ("misc" "share/go/misc" ,out) + ("doc" "share/doc/go/doc" ,out) + ("api" "share/go/api" ,tests) + ("test" "share/go/test" ,tests)))))) + + ;; Some architectures need more time for the test suite. + #$@(if (or (target-riscv64?) + (target-arm?)) + #~((add-after 'unpack 'extend-test-timeout + (lambda _ + (setenv "GO_TEST_TIMEOUT_SCALE" "10")))) + #~()) + (replace 'disable-more-tests + (lambda _ + #$@(cond + ((target-aarch64?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 and is enabled and + ;; disabled upstream with some regularity. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "// +build !linux linux,!arm64\n\n" + "package plugin_test"))) + ;; These tests "run too slowly". + (substitute* "src/go/printer/printer_test.go" + ((".*go2numbers\\.input.*") "") + ((".*generics\\.input.*") "") + ((".*gobuild1\\.input.*") "")))) + (else (list #t))))) (replace 'unpatch-perl-shebangs (lambda _ ;; Avoid inclusion of perl in closure by rewriting references @@ -1008,9 +968,8 @@ in the style of communicating sequential processes (@dfn{CSP}).") (substitute* "src/cmd/cgo/internal/testsanitizers/tsan_test.go" ((".*tsan1[34].*") "")))))))) (native-inputs - ;; Go 1.22 and later requires Go 1.20 (min. 1.20.6, which we don't have) - ;; as the bootstrap toolchain. - (alist-replace "go" (list go-1.21) (package-native-inputs go-1.21))))) + ;; Go 1.22 and later requires Go 1.20 as the bootstrap toolchain. + (alist-replace "go" (list go-1.20) (package-native-inputs go-1.20))))) (define %go-1.23-arm64-micro-architectures ;; https://go.dev/wiki/MinimumRequirements#arm64 @@ -1037,6 +996,22 @@ in the style of communicating sequential processes (@dfn{CSP}).") (file-name (git-file-name name version)) (sha256 (base32 "06c5cjjqk95p16cb6p8fgqqsddc1a1kj3w2m0na5v91gvwxbd0pq")))) + (arguments + (substitute-keyword-arguments (package-arguments go-1.22) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'disable-more-tests + (lambda _ + #$@(cond + ((target-aarch64?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 and is enabled and + ;; disabled upstream with some regularity. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "// +build !linux linux,!arm64\n\n" + "package plugin_test"))))) + (else (list #t))))))))) (properties `((compiler-cpu-architectures ("aarch64" ,@%go-1.23-arm64-micro-architectures) @@ -1046,7 +1021,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (define-public go-1.24 (package - (inherit go-1.23) + (inherit go-1.22) (name "go") (version "1.24.3") (source @@ -1058,9 +1033,31 @@ in the style of communicating sequential processes (@dfn{CSP}).") (file-name (git-file-name name version)) (sha256 (base32 "1b24pdsxrarw22gffv85sghpgvgamafvwwrvvhmyv3hqf89m97zk")))) + (arguments + (substitute-keyword-arguments (package-arguments go-1.22) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'disable-more-tests + (lambda _ + #$@(cond + ((target-aarch64?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 and is enabled and + ;; disabled upstream with some regularity. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "// +build !linux linux,!arm64\n\n" + "package plugin_test"))))) + (else (list #t))))))))) (native-inputs ;; Go 1.24 and later requires Go 1.22+ as the bootstrap toolchain. - (alist-replace "go" (list go-1.22) (package-native-inputs go-1.23))))) + (alist-replace "go" (list go-1.22) (package-native-inputs go-1.22))) + (properties + `((compiler-cpu-architectures + ("aarch64" ,@%go-1.23-arm64-micro-architectures) + ("armhf" ,@%go-1.17-arm-micro-architectures) + ("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures) + ("x86_64" ,@%go-1.18-x86_64-micro-architectures)))))) ;; ;; Default Golang version used in guix/build-system/go.scm to build packages. @@ -1101,10 +1098,7 @@ in the style of communicating sequential processes (@dfn{CSP}).") (export make-go-std) ;; Make those public so they have a corresponding Cuirass job. -(define-public go-std-1.16 (make-go-std go-1.16)) (define-public go-std-1.17 (make-go-std go-1.17)) -(define-public go-std-1.18 (make-go-std go-1.18)) -(define-public go-std-1.19 (make-go-std go-1.19)) (define-public go-std-1.20 (make-go-std go-1.20)) (define-public go-std-1.21 (make-go-std go-1.21)) (define-public go-std-1.22 (make-go-std go-1.22)) diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index 4e2cbab38d..c0c0e01428 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -124,7 +124,7 @@ JSONMarshal/JSONUnmarshal to store/reload the Bloom filter.") (define-public go-github-com-ipfs-boxo (package (name "go-github-com-ipfs-boxo") - (version "0.30.0") + (version "0.33.0") (source (origin (method git-fetch) @@ -133,7 +133,7 @@ JSONMarshal/JSONUnmarshal to store/reload the Bloom filter.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1siicb0bs4shc220xk2i5d4p5myrh3yg64hm3yl796gjbcqgs66d")) + (base32 "03lr70406w95xqiin07ph0d2x8hcfdj1k1r3f1yq8lv3g5j9wapp")) (modules '((guix build utils))) (snippet #~(begin @@ -189,7 +189,6 @@ JSONMarshal/JSONUnmarshal to store/reload the Bloom filter.") go-github-com-ipfs-go-peertaskqueue go-github-com-ipfs-go-test go-github-com-ipfs-go-unixfsnode - go-github-com-ipld-go-car go-github-com-ipld-go-car-v2 go-github-com-ipld-go-codec-dagpb go-github-com-ipld-go-ipld-prime @@ -1887,7 +1886,7 @@ specified in @url{https://datatracker.ietf.org/doc/html/rfc8484, RFC 8484}.") (define-public go-github-com-libp2p-go-libp2p (package (name "go-github-com-libp2p-go-libp2p") - (version "0.41.1") + (version "0.43.0") (source (origin (method git-fetch) @@ -1896,7 +1895,7 @@ specified in @url{https://datatracker.ietf.org/doc/html/rfc8484, RFC 8484}.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1sxx27hgryg93a03n08vasycaj76iwclzdskajjy8bivk5z9ls9p")) + (base32 "02708nf651cx1ls9k4k0275w8ld4349kzp1yyv35m45phbvzd2zf")) (modules '((guix build utils))) (snippet #~(begin @@ -1937,8 +1936,6 @@ specified in @url{https://datatracker.ietf.org/doc/html/rfc8484, RFC 8484}.") go-github-com-huin-goupnp go-github-com-ipfs-go-cid go-github-com-ipfs-go-datastore - go-github-com-ipfs-go-ds-badger - go-github-com-ipfs-go-ds-leveldb go-github-com-ipfs-go-log-v2 go-github-com-jackpal-go-nat-pmp go-github-com-jbenet-go-temp-err-catcher @@ -1975,12 +1972,12 @@ specified in @url{https://datatracker.ietf.org/doc/html/rfc8484, RFC 8484}.") go-github-com-prometheus-client-model go-github-com-quic-go-quic-go go-github-com-quic-go-webtransport-go - go-github-com-raulk-go-watchdog go-go-uber-org-fx go-go-uber-org-zap go-golang-org-x-crypto go-golang-org-x-sync go-golang-org-x-sys + go-golang-org-x-time go-golang-org-x-tools go-google-golang-org-protobuf)) (home-page "https://github.com/libp2p/go-libp2p") @@ -2136,6 +2133,7 @@ kab-dht}. This DHT is modeled after Kademlia with S/Kademlia modifications.") #:import-path "github.com/libp2p/go-libp2p-kad-dht")) (propagated-inputs (list go-github-com-libp2p-go-libp2p-kbucket + go-github-com-hashicorp-golang-lru go-github-com-whyrusleeping-go-keyspace go-gonum-org-v1-gonum))))) @@ -2446,7 +2444,7 @@ types.") (define-public kubo (package (name "kubo") - (version "0.35.0") + (version "0.36.0") (source (origin (method git-fetch) @@ -2455,7 +2453,7 @@ types.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "18xkgxy07dz3zxvvrpaiv5m46slcl6hh07qbmmnfihcnx34431qa")))) + (base32 "080ixpahm2hsc7vsipcjlymxagvz9s3n1dc7nn7zfl2z4fwwhdhm")))) (build-system go-build-system) (arguments (list @@ -2479,6 +2477,7 @@ types.") "commands" "completion" "bash"))))))))) (inputs (list go-bazil-org-fuse go-contrib-go-opencensus-io-exporter-prometheus + go-github-com-anmitsu-go-shlex go-github-com-blang-semver-v4 go-github-com-caddyserver-certmagic go-github-com-cenkalti-backoff-v4 @@ -2510,7 +2509,6 @@ types.") go-github-com-ipfs-go-ipld-format go-github-com-ipfs-go-ipld-git go-github-com-ipfs-go-ipld-legacy - go-github-com-ipfs-go-log go-github-com-ipfs-go-log-v2 go-github-com-ipfs-go-metrics-interface go-github-com-ipfs-go-metrics-prometheus @@ -2518,7 +2516,6 @@ types.") go-github-com-ipfs-go-unixfsnode go-github-com-ipfs-shipyard-nopfs go-github-com-ipfs-shipyard-nopfs-ipfs - go-github-com-ipld-go-car go-github-com-ipld-go-car-v2 go-github-com-ipld-go-codec-dagpb go-github-com-ipld-go-ipld-prime diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm index 000ea057b3..0755e99b47 100644 --- a/gnu/packages/iso-codes.scm +++ b/gnu/packages/iso-codes.scm @@ -240,20 +240,3 @@ concerned with representation of names for languages and language groups.") It includes a copy from Debian’s pkg-isocodes and makes the data accessible through a Python API.") (license license:lgpl2.1+))) - -(define-public python-pycountry-20.7.3 - (hidden-package - (package - (inherit python-pycountry) - (name "python-pycountry") - (version "20.7.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pycountry/pycountry") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1aqzbdqvy3pg0x33ay099vriazs28v6kw7fwc8ajg3avdcws2mgm")))) - (native-inputs (list python-pytest python-pytest-cov python-setuptools))))) diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index efeea491a0..ec0f7872d7 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -761,10 +761,8 @@ JavaScript build steps.") (list #:test-flags '(list "-k" "not test_hatch_build"))) (propagated-inputs (list python-hatchling)) (native-inputs (list python-pytest - python-pytest-cov python-pytest-mock - python-tomli - python-twine)) + python-tomli)) (home-page "https://github.com/jupyterlab/hatch-jupyter-builder") (synopsis "Hatch plugin to help build Jupyter packages") (description diff --git a/gnu/packages/kde-internet.scm b/gnu/packages/kde-internet.scm index 6d75b6b219..17c012041a 100644 --- a/gnu/packages/kde-internet.scm +++ b/gnu/packages/kde-internet.scm @@ -884,14 +884,14 @@ protocol, supporting end-to-end encryption. Its features include: (define-public ruqola (package (name "ruqola") - (version "2.5.3") + (version "2.6.0") (source (origin (method url-fetch) (uri (string-append "mirror://kde//stable/ruqola/ruqola-" version ".tar.xz")) (sha256 (base32 - "18brrxwn5dh5xj20znmg3v2044m3bw2jyv8abfwa45qk32qjyzi9")))) + "09wcqmnl6v6p56633djrszy7znb2zdmd5xlnr8njz0dk2ps7grmm")))) (build-system qt-build-system) (arguments (list #:qtbase qtbase diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 529841aad4..4f3f740745 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4943,20 +4943,18 @@ in the audio domain.") python-sympy))))) (define-public python-pytorch-geometric - (let ((commit "85cf9fc12b1138c1f2adbed8a761356c3f4197e7") - (revision "0")) (package (name "python-pytorch-geometric") - (version (git-version "2.6.1" revision commit)) + (version "2.7.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/pyg-team/pytorch_geometric/") - (commit commit))) + (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "104v3w9yv7akyxpyd8aq85mw1mncql8mvr1p1b34ph09csqh68hq")))) + "0w6gpw0wf9w6h317mbqcf3iidx9yqjba34348p44g80ihskb6ly6")))) (build-system pyproject-build-system) (arguments (list @@ -5031,7 +5029,7 @@ in the audio domain.") (description "PyG is a library built upon PyTorch to easily write and train Graph Neural Networks for a wide range of applications related to structured data.") - (license license:expat)))) + (license license:expat))) (define-public python-lightning-cloud (package @@ -5191,20 +5189,18 @@ feedback.") (license license:expat))) (define-public python-pytorch-lightning - (let ((commit "1617f70428a791b2d81c392d6a0b8a078d8e7fb1") - (revision "0")) (package (name "python-pytorch-lightning") - (version (git-version "2.5.2" revision commit)) + (version "2.5.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Lightning-AI/pytorch-lightning") - (commit commit))) + (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "1i11n4094a8ysb7cj1lww23nh0mk3d9licw9c9pgzws2m0qy70yd")))) + "1xjib19kk8nfncr7cmd0j1czazvjzrprayarw275b75i0szda87h")))) (build-system pyproject-build-system) (arguments (list @@ -5283,7 +5279,7 @@ feedback.") (description "PyTorch Lightning is just organized PyTorch; Lightning disentangles PyTorch code to decouple the science from the engineering.") - (license license:asl2.0)))) + (license license:asl2.0))) (define-public python-torchmetrics (package @@ -5345,7 +5341,7 @@ implementations and an easy-to-use API to create custom metrics. It offers: (define-public python-torchvision (package (name "python-torchvision") - (version "0.23.0") + (version "0.24.0") (source (origin (method git-fetch) (uri (git-reference @@ -5355,7 +5351,7 @@ implementations and an easy-to-use API to create custom metrics. It offers: (file-name (git-file-name name version)) (sha256 (base32 - "1d09xwblldgzmzfdlrsyx6mgv939z4yi1hqanm9yx63cs2mr7w85")) + "1s5ga00shsw1kn23mmvvpllmmniay383csn0mjdasx60cxvky80k")) (modules '((guix build utils))) (snippet '(begin @@ -5384,7 +5380,6 @@ implementations and an easy-to-use API to create custom metrics. It offers: python-typing-extensions python-requests python-pillow - python-pillow-simd python-pytorch)) (native-inputs (list pybind11 diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 842fa5bc04..fead73f57f 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -3282,11 +3282,11 @@ designed for experienced users.") (build-system go-build-system) (arguments (list - #:go go-1.23 ;; It helps to resolve <golang.org/x/net/publicsuffix/table.go:63:12>: ;; pattern data/children: cannot embed irregular file data/children #:embed-files #~(list "children" "nodes" "text") - #:import-path "github.com/42wim/matterbridge")) + #:import-path "github.com/42wim/matterbridge" + #:test-flags #~(list "-vet=off"))) (inputs (list ;; golang.org go-golang-org-x-crypto diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index fb585008c2..23c4f77814 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -5027,7 +5027,7 @@ implementing them.") go-github-com-hjson-hjson-go-v4 go-github-com-kardianos-minwinsvc go-github-com-olekukonko-tablewriter-0.0.5 - go-github-com-quic-go-quic-go + go-github-com-quic-go-quic-go-0.52 go-github-com-vishvananda-netlink go-github-com-wlynxg-anet go-golang-org-x-crypto diff --git a/gnu/packages/oneapi.scm b/gnu/packages/oneapi.scm new file mode 100644 index 0000000000..d17f918a20 --- /dev/null +++ b/gnu/packages/oneapi.scm @@ -0,0 +1,213 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.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 (gnu packages oneapi) + #:use-module (gnu packages) + #:use-module (gnu packages check) + #:use-module (gnu packages cpp) + #:use-module (gnu packages llvm) + #:use-module (gnu packages python) + #:use-module (gnu packages swig) + #:use-module (guix build-system cmake) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) + +;;; Updates and replaces oneapi-dnnl in (gnu packages machine-learning) +(define-public onednn + ;; See doc/build/build.md. + (package + (name "onednn") + (version "3.9.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/uxlfoundation/oneDNN/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ybq8zb4dcd2g139gdq4bpv20v9jgws5d7ln3x4s0ydrmbgm2qwj")) + (modules '((guix build utils) + (ice-9 rdelim))) + ;; Copyright date used by code generation script + (snippet + '(for-each + (lambda (file) + (with-atomic-file-replacement + file + (lambda (in out) + (let loop ((line (read-line in 'concat))) + (if (string-contains line "Copyright") + (display line out) + (loop (read-line in 'concat))))))) + '("include/oneapi/dnnl/dnnl_debug.h" + "src/common/dnnl_debug_autogenerated.cpp" + "tests/benchdnn/dnnl_debug_autogenerated.cpp" + "tests/benchdnn/dnnl_debug.hpp"))))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags ;see doc/build/build_options.md + #~(list + #$@(if (target-riscv64?) + (list "-DDNNL_CPU_RUNTIME=SEQ") + ;; Default; also tbb and sycl. + (list "-DDNNL_CPU_RUNTIME=OMP")) + "-DDNNL_EXPERIMENTAL_UKERNEL=ON" ;Used in PyTorch + "-DONEDNN_BUILD_GRAPH=OFF") ;See scripts/README.md + #:phases + #~(modify-phases %standard-phases + ;; This test times out after 3600 seconds. + (add-after 'unpack 'disable-matmul-testing + (lambda _ + (substitute* "tests/benchdnn/benchdnn.cpp" + (("matmul::bench.*") ";\n")))) + ;; See scripts/README.md. + (add-after 'configure 'codegen + (lambda _ + (with-directory-excursion "../source" + ;; Generate types.xml. + (invoke "castxml" "--castxml-cc-gnu-c" "clang" + "--castxml-output=1" "-Iinclude" "-I../build/include" + "include/oneapi/dnnl/dnnl_types.h" "-o" "types.xml") + ;; Run generate_dnnl_debug.py. + (invoke + "python3" "scripts/generate_dnnl_debug.py" "types.xml") + ;; Generating format tags. + ;; Modifies include/oneapi/dnnl/dnnl.hpp + (invoke "python3" "scripts/generate_format_tags.py"))))))) + (native-inputs + (list castxml clang-17 googletest python-minimal-wrapper)) + (home-page "https://uxlfoundation.github.io/oneDNN/") + (synopsis "Deep neural network library") + (description + "@acronym{OneDNN, OneAPI Deep Neural Network Library} is a cross-platform +performance library of basic building blocks for deep learning applications.") + (supported-systems %64bit-supported-systems) + (license license:asl2.0))) + +;;; Updates and replaces tbb in (gnu packages tbb) +(define-public onetbb + (package + (name "onetbb") + (version "2022.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/uxlfoundation/oneTBB/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04hjgc0yg0kdwr5qssl4y7hqv4wgcrlmblvbiaxqlyxrd400y901")) + (patches (search-patches "onetbb-other-arches.patch")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list #$@(if (or (target-riscv64?) + (target-ppc32?)) + '(list "-DTBB_TEST_LINK_FLAGS=-latomic") + '()) + #$@(if (or (target-arm32?) + (target-ppc32?)) + '("-DTBB_TEST_COMPILE_FLAGS=-DTBB_TEST_LOW_WORKLOAD") + '()) + ;; Don't fail on warnings. + "-DTBB_STRICT=OFF") + #:phases + #~(modify-phases %standard-phases + #$@(cond + ((target-arm32?) + `((add-after 'unpack 'adjust-test-suite + (lambda _ + (substitute* "test/CMakeLists.txt" + ;; Bus error, skipped on mips. + ((".*test_malloc_pools.*") "")))))) + ((target-ppc32?) + `((add-after 'unpack 'adjust-test-suite + (lambda _ + (substitute* "test/CMakeLists.txt" + ;; These tests hang forever. + ((".*test_function_node.*") "") + ((".*test_multifunction_node.*") "") + ((".*test_async_node.*") "")))))) + ((target-riscv64?) + `((add-after 'unpack 'adjust-test-suite + (lambda _ + (substitute* "test/CMakeLists.txt" + ;; This tests hangs forever. + ((".*test_task_group.*") "")))))) + (else '()))))) + (home-page "https://uxlfoundation.github.io/oneTBB/") + (synopsis "C++ library for parallel programming") + (description + "@acronym{OneTBB, OneAPI Threading Building Blocks} is a C++ runtime +library that abstracts the low-level threading details necessary for optimal +multi-core performance. It uses common C++ templates and coding style to +eliminate tedious threading implementation work. It provides parallel loop +constructs, asynchronous tasks, synchronization primitives, atomic operations, +and more.") + (license license:asl2.0))) + +(define-public python-onetbb + (package + (inherit onetbb) + (name "python-onetbb") + (arguments + (list + #:configure-flags + #~(list "-DTBB4PY_BUILD=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-python-install-directory + (lambda _ + (substitute* "python/setup.py" + (("extra_link_args=tbb_flag,") + (string-append + "extra_link_args=['-Wl,-rpath=" + #$(this-package-input "onetbb") "/lib" + "', '-Wl,-rpath=" #$output "/lib'] + tbb_flag,"))))) + (replace 'build + (lambda _ + (setenv "PYTHONHASHSEED" "0") + (invoke "make" "python_build"))) + ;; The 'build phase already installs the modules + (replace 'install + (lambda _ + (with-directory-excursion "python/rml" + (invoke "make" "install")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "ctest" "-R" "python_test" "--output-on-failure"))))))) + (native-inputs (list swig python-minimal)) + (inputs (list onetbb)) + (synopsis "Python bindings for the oneTBB parallel library") + (description + "@acronym{OneTBB, OneAPI Threading Building Blocks} is a C++ runtime +library that abstracts the low-level threading details necessary for optimal +multi-core performance. It uses common C++ templates and coding style to +eliminate tedious threading implementation work. It provides parallel loop +constructs, asynchronous tasks, synchronization primitives, atomic operations, +and more. @code{python-onetbb} enables threading composability between two or +more thread-enabled Python libraries."))) diff --git a/gnu/packages/patches/onetbb-other-arches.patch b/gnu/packages/patches/onetbb-other-arches.patch new file mode 100644 index 0000000000..4802f0fb58 --- /dev/null +++ b/gnu/packages/patches/onetbb-other-arches.patch @@ -0,0 +1,27 @@ +Declare a fallback architecture not yet considered by upstream project. + +diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h +index 001d42e0..2e68f738 100644 +--- a/src/tbb/tools_api/ittnotify_config.h ++++ b/src/tbb/tools_api/ittnotify_config.h +@@ -180,6 +180,11 @@ + # define ITT_ARCH_ARM64 6 + #endif /* ITT_ARCH_ARM64 */ + ++/* Fallback for other architectures */ ++#ifndef ITT_ARCH_GENERIC ++# define ITT_ARCH_GENERIC 99 ++#endif /* ITT_ARCH_GENERIC */ ++ + #ifndef ITT_ARCH_LOONGARCH64 + # define ITT_ARCH_LOONGARCH64 7 + #endif /* ITT_ARCH_LOONGARCH64 */ +@@ -209,6 +214,8 @@ + # define ITT_ARCH ITT_ARCH_ARM64 + # elif defined __powerpc64__ + # define ITT_ARCH ITT_ARCH_PPC64 ++# elif ++# define ITT_ARCH ITT_ARCH_GENERIC + # elif defined __loongarch__ + # define ITT_ARCH ITT_ARCH_LOONGARCH64 + # elif defined __s390__ || defined __s390x__ diff --git a/gnu/packages/patches/trytond-add-guix_trytond_path.patch b/gnu/packages/patches/trytond-add-guix_trytond_path.patch index 7dc136ec46..de4b0a1d36 100644 --- a/gnu/packages/patches/trytond-add-guix_trytond_path.patch +++ b/gnu/packages/patches/trytond-add-guix_trytond_path.patch @@ -1,24 +1,21 @@ Make trytond add all paths listed in GUIX_TRYTOND_MODULES_PATH to sys.path. -*** a/trytond/modules/__init__.py 1970-01-01 01:00:01.000000000 +0100 ---- b/trytond/modules/__init__.py 2021-12-02 22:17:28.014612267 +0100 +*** a/trytond/modules/__init__.py +--- b/trytond/modules/__init__.py *************** *** 31,36 **** ---- 31,48 ---- +--- 31,45 ---- EGG_MODULES = {} + def __extend_python_path__(): -+ tryton_python_path = os.environ.get("GUIX_TRYTOND_MODULES_PATH") -+ if tryton_python_path: -+ paths = [path[:-16] # remove "/trytond/modules" -+ for path in tryton_python_path.split(os.pathsep)] -+ sys.path.extend(paths) -+ # ensure new paths are in the pkg_resources WorkingSet -+ import pkg_resources -+ list(map(pkg_resources.working_set.add_entry, paths)) ++ trytond_modules_path = os.environ.get("GUIX_TRYTOND_MODULES_PATH") ++ if trytond_modules_path: ++ # make tryton.module behave like a namespace package ++ __path__.extend(trytond_modules_path.split(os.pathsep)) + + __extend_python_path__() ++ del __extend_python_path__ + def update_egg_modules(): diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 9669c161c8..e7c729b393 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -189,7 +189,7 @@ it.") (define-public trealla (package (name "trealla") - (version "2.83.17") + (version "2.83.20") (source (origin (method git-fetch) @@ -198,7 +198,7 @@ it.") (url "https://github.com/trealla-prolog/trealla") (commit (string-append "v" version)))) (sha256 - (base32 "1c07kcl2h6bnwymf37zqllp9pnp37crh4ai3yd1jhzyihxy9m6wq")) + (base32 "0jz66ic4pm979cslnwfxrl26c1qwdlpi81d7sv5asiq2lflc8pxw")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm index c206b670bd..fa2481b8be 100644 --- a/gnu/packages/prometheus.scm +++ b/gnu/packages/prometheus.scm @@ -189,6 +189,134 @@ posts the metrics to the Prometheus client registry and just updates the registry.") (license license:asl2.0))) +(define-public go-github-com-prometheus-alertmanager + (package + (name "go-github-com-prometheus-alertmanager") + (version "0.28.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/prometheus/alertmanager") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zar5l92a0f3ghm7ndijadzjm6va1qpnxksrah7pxza95pnx0wfq")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; TODO: UI is shipped with JS/TS, CSS, and font libraries + ;; required to build CLI <cmd/alertmanager>: + ;; - ui/app/lib/bootstrap-4.0.0-alpha.6-dist/css + ;; - ui/app/lib/elm-datepicker/css + ;; - ui/app/lib/font-awesome-4.7.0 + ;; - ui/react-app + (delete-file-recursively "ui"))))) + (build-system go-build-system) + (arguments + (list + #:skip-build? #t + #:import-path "github.com/prometheus/alertmanager" + #:embed-files #~(list ".*\\.css" ".*\\.html" ".*\\.json") + ;; XXX: Enable all when UI is packaged. + #:test-subdirs #~(list "api/v2" + "cli/config" + "dispatch" + "featurecontrol" + "inhibit" + "matcher/compliance" + "matcher/parse" + "nflog" + "nflog/nflogpb" + "notify" + "notify/discord" + "notify/email" + "notify/msteams" + "notify/msteamsv2" + "notify/opsgenie" + "notify/pagerduty" + "notify/pushover" + "notify/rocketchat" + "notify/slack" + "notify/sns" + "notify/telegram" + "notify/victorops" + "notify/webex" + "notify/webhook" + "notify/wechat" + "pkg/labels" + "provider/mem" + "store" + "template" + "timeinterval" + "types") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "examples"))))))) + (native-inputs + (list go-github-com-emersion-go-smtp + go-github-com-kylelemons-godebug + go-github-com-stretchr-testify + go-go-uber-org-atomic)) + (propagated-inputs + (list go-github-com-alecthomas-kingpin-v2 + go-github-com-alecthomas-units + go-github-com-aws-aws-sdk-go + go-github-com-cenkalti-backoff-v4 + go-github-com-cespare-xxhash-v2 + go-github-com-coder-quartz + go-github-com-go-openapi-analysis + go-github-com-go-openapi-errors + go-github-com-go-openapi-loads + go-github-com-go-openapi-runtime + go-github-com-go-openapi-spec + go-github-com-go-openapi-strfmt + go-github-com-go-openapi-swag + go-github-com-go-openapi-validate + go-github-com-gofrs-uuid + go-github-com-gogo-protobuf + go-github-com-hashicorp-go-sockaddr + go-github-com-hashicorp-golang-lru-v2 + go-github-com-hashicorp-memberlist + go-github-com-jessevdk-go-flags + go-github-com-kimmachinegun-automemlimit + go-github-com-matttproud-golang-protobuf-extensions + go-github-com-oklog-run + go-github-com-oklog-ulid + go-github-com-prometheus-client-golang + go-github-com-prometheus-common + go-github-com-prometheus-common-assets + go-github-com-prometheus-exporter-toolkit + go-github-com-prometheus-sigv4 + go-github-com-rs-cors + go-github-com-shurcool-httpfs + go-github-com-shurcool-vfsgen + ;; go-github-com-trivago-tgo + go-github-com-xlab-treeprint + go-go-uber-org-automaxprocs + go-golang-org-x-mod + go-golang-org-x-net + go-golang-org-x-text + go-golang-org-x-tools + go-gopkg-in-telebot-v3 + go-gopkg-in-yaml-v2)) + (home-page "https://github.com/prometheus/alertmanager") + (synopsis "Prometheus Alertmanager") + (description + "The Alertmanager handles alerts sent by client applications such as the +Prometheus server. It takes care of deduplicating, grouping, and routing them +to the correct +@url{https://prometheus.io/docs/alerting/latest/configuration/#receiver, +receiver integrations} such as email, @code{PagerDuty}, @code{OpsGenie}, or +many other +@url{https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver, +mechanisms} thanks to the webhook receiver. It also takes care of silencing +and inhibition of alerts.") + (license license:asl2.0))) + (define-public go-github-com-prometheus-client-golang (package (name "go-github-com-prometheus-client-golang") diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 92ea235550..126b8f1c71 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1653,8 +1653,7 @@ also ensuring that the notebooks are running without errors.") (native-inputs (list python-hatchling python-jinja2 - python-pytest - python-tox)) + python-pytest)) (home-page "https://nox.thea.codes/") (synopsis "Flexible test automation") (description @@ -3126,7 +3125,6 @@ types (i.e. Convention, Warn, and Error) fail the build.") (list python-pre-commit python-setuptools python-setuptools-scm - python-tox python-wheel)) (home-page "https://github.com/pytest-dev/pytest-qt") (synopsis "Pytest support for PyQt and PySide applications") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 79e3a93489..7edbd71784 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -1351,37 +1351,6 @@ Derivation function (HKDF) defined in RFC 5869.") Password-Authenticated Key Exchange algorithm.") (license license:expat))) -(define-public python-txtorcon - (package - (name "python-txtorcon") - (version "24.8.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "txtorcon" version)) - (sha256 - (base32 - "1l4ajw4h7nay4vmllh6cs7zh3hnh8vj4yvgfnq3m734wil9ikzmy")))) - (build-system pyproject-build-system) - (native-inputs - (list python-pytest - python-setuptools - python-wheel)) - (inputs - (list lsof)) - (propagated-inputs - (list python-automat - python-idna - python-incremental - python-pyopenssl - python-service-identity - python-twisted - python-zope-interface)) - (home-page "https://github.com/meejah/txtorcon") - (synopsis "Twisted-based Tor controller client") - (description "This package provides a Twisted-based Tor controller client, -with state-tracking and configuration abstractions.") - (license license:expat))) - (define-public python-keyutils (package (name "python-keyutils") diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index d85b7267da..c514e0ab46 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2018, 2020-2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> -;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> +;;; Copyright © 2016,2024 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2016, 2021-2025 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016-2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> @@ -37,6 +37,7 @@ ;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org> ;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com> ;;; Copyright © 2025 Ghislain Vaillant <ghislain.vaillant@inria.fr> +;;; Copyright © 2025 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -1336,6 +1337,28 @@ computing in Python. It extends both the @code{concurrent.futures} and numerical software for solving convex second-order cone programs (SOCPs).") (license license:gpl3))) +(define-public python-efficient-apriori + (package + (name "python-efficient-apriori") + (version "2.0.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "efficient_apriori" version)) + (sha256 + (base32 "0vmdp8qkir7jrmwgpzajssyxh6q78m0q16pr1v657vla9x5wxn2s")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--doctest-modules" "-vv" "efficient_apriori"))) + (native-inputs (list python-setuptools python-pytest)) + (home-page "https://github.com/tommyod/Efficient-Apriori") + (synopsis "An efficient Python implementation of the Apriori algorithm.") + (description "An efficient Python implementation of the Apriori algorithm, +which uncovers hidden structures in categorical data") + (license license:expat))) + (define-public python-fast-histogram (package (name "python-fast-histogram") @@ -2929,6 +2952,11 @@ logic, also known as grey logic.") '(list "--pyargs" "skmisc") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "pyproject.toml" + (("--cov(-[^ ]*)?=[^ ]*") "")))) (add-after 'unpack 'fix-version (lambda _ (call-with-output-file "skmisc/_version.py" @@ -2944,15 +2972,13 @@ logic, also known as grey logic.") (propagated-inputs (list meson-python python-numpy python-numpydoc - python-spin - python-twine)) + python-spin)) (native-inputs (list gfortran pkg-config python-cython-3 python-meson-python python-numpy python-pytest - python-pytest-cov python-setuptools python-wheel)) (home-page "https://has2k1.github.io/scikit-misc/stable") @@ -3409,6 +3435,66 @@ its software deployment plugins.") Snakemake and its storage plugins.") (license license:expat))) +(define-public python-snakemake-executor-plugin-slurm-jobstep + (package + (name "python-snakemake-executor-plugin-slurm-jobstep") + (version "0.3.0") + (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ly15ywmbfcm5z7jy7dxiidpw3immsdd2k80vrm4pza721irxcar")))) + (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (native-inputs (list python-poetry-core + snakemake)) + (synopsis "Snakemake executor plugin: slurm-jobstep") + (description "A Snakemake executor plugin for running srun jobs inside of +SLURM jobs (meant for internal use by python-snakemake-executor-plugin-slurm).") + (license license:expat))) + +(define-public python-snakemake-executor-plugin-slurm + (package + (name "python-snakemake-executor-plugin-slurm") + (version "1.7.0") + (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm/") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x7ghrkvmxqbcjl69hxp5axa1av3s0mdc0i9xjg8qjnd3hgd82r3")))) + (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests/tests.py"))))))) + (native-inputs (list python-pandas + python-poetry-core + python-pytest + python-snakemake-executor-plugin-slurm-jobstep + snakemake)) + (synopsis "Snakemake executor plugin: slurm") + (description "A Snakemake executor plugin for running SLURM jobs.") + (license license:expat))) + (define-public python-sparse (package (name "python-sparse") @@ -5689,6 +5775,95 @@ well as key metadata and SIRENE database containing data on all French compagnies.") (license license:expat))) +(define-public python-dvc-objects + (package + (name "python-dvc-objects") + (version "5.1.1") + (home-page "https://github.com/iterative/dvc-objects") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dvc_objects" version)) + (sha256 + (base32 "1amx5z8k2v2hbsajg0dcd5dxmmlv9bnbchpas95s8sj86cm8yc4y")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-fsspec + python-funcy-1.14)) + (native-inputs + (list python-mypy + python-pytest + python-pytest-asyncio + python-pytest-benchmark + python-pytest-cov + python-pytest-mock + python-pytest-sugar + python-reflink + python-setuptools + python-setuptools-scm + python-wheel)) + (synopsis "Filesystem and object-db level abstractions for DVC") + (description "Dvc objects provides a filesystem and object-db level +abstractions to use in dvc and dvc-data.") + (license license:asl2.0))) + +(define-public python-dvc-data + (package + (name "python-dvc-data") + (version "3.16.12") + (home-page "https://github.com/iterative/dvc-data") + (source (origin + (method url-fetch) + (uri (pypi-uri "dvc_data" version)) + (sha256 + (base32 + "156iwdn7v5jhwbpwz92n28qiasgcbmcqv9vxg8xbvdfxzlzw0b7r")))) + (build-system pyproject-build-system) + (propagated-inputs + (list python-attrs + python-dictdiffer + python-diskcache + python-dvc-objects + python-fsspec + python-funcy-1.14 + python-orjson + python-pygtrie + python-sqltrie + python-tqdm)) + (native-inputs + (list python-click + python-pytest + python-pytest-benchmark + python-pytest-cov + python-pytest-mock + ;; python-pytest-servers is not packaged in Guix yet + python-setuptools + python-setuptools-scm + python-typer + python-wheel)) + (arguments + (list + #:test-flags + ;; TODO: package python-pytest-server with its transitive dependencies + #~(list "--ignore=tests/hashfile/test_db.py" + "--ignore=tests/hashfile/test_db_index.py" + "--ignore=tests/hashfile/test_obj.py" + "--ignore=tests/index/test_build.py" + "--ignore=tests/index/test_checkout.py" + "--ignore=tests/index/test_fs.py" + "--ignore=tests/index/test_index.py" + "--ignore=tests/index/test_storage.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; setuptools cannot handle both license and license-files + (substitute* "pyproject.toml" + (("^license = .*") "license = {text = \"Apache-2.0\"}\n") + (("^license-files = .*") ""))))))) + (synopsis "DVC's data management subsystem") + (description "Dvc data is DVC's data management subsystem.") + (license license:asl2.0))) + (define-public python-pyqtgraph (package (name "python-pyqtgraph") diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index ceb876ef38..0beff7d6e0 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2013, 2014, 2015, 2016, 2020, 2023 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2016, 2017, 2019-2023 Marius Bakke <marius@gnu.org> +;;; Copyright © 2016-2023 Marius Bakke <marius@gnu.org> ;;; Copyright © 2015-2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017, 2021 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu> @@ -25,12 +25,11 @@ ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org> ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org> ;;; Copyright © 2018, 2019, 2021, 2024 Nicolas Goaziou <mail@nicolasgoaziou.fr> -;;; Copyright © 2018 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2018 swedebugia <swedebugia@riseup.net> ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org> -;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot> +;;; Copyright © 2019, 2023 Brendan Tildesley <mail@brendan.scot> ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> @@ -65,6 +64,7 @@ ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr> ;;; Copyright © 2023 dan <i@dan.games> ;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com> +;;; Copyright © 2023 Juliana Sims <juli@incana.org> ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net> ;;; Copyright © 2024 Fabio Natali <me@fabionatali.com> ;;; Copyright © 2024 Steve George <steve@futurile.net> @@ -131,6 +131,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) #:use-module (gnu packages linux) + #:use-module (gnu packages lsof) #:use-module (gnu packages node) #:use-module (gnu packages openstack) #:use-module (gnu packages pcre) @@ -2443,6 +2444,35 @@ Features: @end itemize") (license license:mpl2.0))) +(define-public python-pycognito + (package + (name "python-pycognito") + (version "2024.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycognito" version)) + (sha256 + (base32 "1r1sq87spqcfgg17khgpqc2ga8m9nk10flg9h23drhy2k1kcc4g2")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: cycles with python-moto, bootstrap/minimal variant is required. + (list #:tests? #f)) + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-boto3 + python-envs + python-pyjwt + python-requests)) + (home-page "https://github.com/pvizeli/pycognito") + (synopsis "Python library for using AWS Cognito") + (description + "This package provides a Python class to integrate Boto3's Cognito +client so it is easy to login users, with @acronym{Secure Remote Password, +SRP} support.") + (license license:asl2.0))) + (define-public python-python3-saml (package (name "python-python3-saml") @@ -3845,6 +3875,167 @@ high-speed transfers via libcurl and frequently outperforms alternatives.") ;; under the terms of LGPLv2.1+ or Expat. (license (list license:lgpl2.1+ license:expat)))) +(define-public python-txacme + ;; 0.9.3 tag was placed in 2020 and there a lot of changes providing + ;; compatibility wit twisted, use the latest commit from trunk branch. + ;; + ;;See: <https://github.com/twisted/txacme/issues/165>. + (let ((commit "ac18f92f6dde971a6b38f2ecfae44665815db583") + (revision "0")) + (package + (name "python-txacme") + (version (git-version "0.9.3" revision commit)) + (source + (origin + (method git-fetch) ;no fresh release in PyPI + (uri (git-reference + (url "https://github.com/twisted/txacme") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0mgdfxldv8qflbn75ywslbarnd4i3l7c4krs4aibl2dpryclsjzs")))) + (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'custom + #:test-flags #~(list "-m" "twisted.trial" "txacme"))) + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-acme + python-attrs + python-eliot + python-josepy + python-pem + python-treq + python-twisted + python-txsni)) + (home-page "https://github.com/twisted/txacme") + (synopsis "Twisted implexmentation of the ACME protocol") + (description + "ACME is Automatic Certificate Management Environment, a protocol that +allows clients and certificate authorities to automate verification and +certificate issuance. The ACME protocol is used by the free Let's Encrypt +Certificate Authority. + +txacme is an implementation of the protocol for Twisted, the event-driven +networking engine for Python.") + (license license:expat)))) + +(define-public python-txaio + (package + (name "python-txaio") + (version "25.9.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "txaio" version)) + (sha256 + (base32 "16ch62yk2gdikkak113h6qw13ns9ksca817hky0vabn0fyh08874")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools)) + (home-page "https://github.com/crossbario/txaio") + (synopsis "Compatibility layer between Python asyncio and Twisted") + (description + "Txaio provides a compatibility layer between the Python @code{asyncio} + bsmodule and @code{Twisted}.") + (license license:expat))) + +;; XXX: Potentially abandonware since 2017, consider to remove when nothing +;; depends on it or fails to build. +(define-public python-txamqp + (package + (name "python-txamqp") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "txAMQP" version)) + (sha256 + (base32 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;all tests failed + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-six python-twisted)) + (home-page "https://github.com/txamqp/txamqp") + (synopsis "Communicate with AMQP peers and brokers using Twisted") + (description + "This package provides a Python library for communicating with AMQP peers +and brokers using the asynchronous networking framework Twisted. It contains +all the necessary code to connect, send and receive messages to/from an +AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It +also includes support for using Thrift RPC over AMQP in Twisted +applications.") + (license license:asl2.0))) + +(define-public python-txsni + (package + (name "python-txsni") + (version "0.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/glyph/txsni") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1fl8xi7vl24hwbva5v41l6nsrbkj2l2mlsgcvdjxgph61aznwywq")))) + (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'custom + #:test-flags #~(list "-m" "twisted.trial" + "--temp-directory=/tmp/_trial_temp" + "txsni"))) + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-pyopenssl + python-service-identity + python-twisted)) + (home-page "https://github.com/glyph/txsni") + (synopsis "Run TLS servers with Twisted") + (description + "This package provides an easy-to-use SNI endpoint for use with the +Twisted web framework.") + (license license:expat))) + +(define-public python-txtorcon + (package + (name "python-txtorcon") + (version "24.8.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "txtorcon" version)) + (sha256 + (base32 "1l4ajw4h7nay4vmllh6cs7zh3hnh8vj4yvgfnq3m734wil9ikzmy")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (inputs + (list lsof)) + (propagated-inputs + (list python-automat + python-idna + python-incremental + python-pyopenssl + python-service-identity + python-twisted + python-zope-interface)) + (home-page "https://github.com/meejah/txtorcon") + (synopsis "Twisted-based Tor controller client") + (description + "This package provides a Twisted-based Tor controller client,with +state-tracking and configuration abstractions.") + (license license:expat))) + (define-public python-url-normalize (package (name "python-url-normalize") @@ -3949,72 +4140,54 @@ Python’s.") (license license:bsd-3))) (define-public python-omnipath - ;; The latest release is incompatible with Numpy 2 and pretty old. A new - ;; release is expected soon. - (let ((commit "3d1613493aa1554618fb2d7297f82e034b7694ce") - (revision "0")) - (package - (name "python-omnipath") - (version (git-version "1.0.8" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/saezlab/omnipath/") - (commit commit))) - (file-name (git-file-name name commit)) - (sha256 - (base32 - "03lqbgqihglh9mmp7lwmar26fcnsb1qaidrzbmp0z2wvsrgi4fg7")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - '(list "-k" - (string-append - ;; These require internet access - "not test_download_homologene" - " and not test_complex_genes" - ;; Arrays are not equal: Mismatched elements: 4759 / 255465 (1.86%) - " and not test_import_intercell_network")) - #:phases - #~(modify-phases %standard-phases - (add-before 'build 'pretend-version - ;; The version string is usually derived via setuptools-scm, but - ;; without the git metadata available, the version string is set - ;; to '0.0.0'. - (lambda _ - (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" - #$(version-major+minor (package-version this-package))))) - (add-after 'unpack 'set-home - (lambda _ (setenv "HOME" "/tmp")))))) - (propagated-inputs - (list python-attrs - python-docrep - python-inflect - python-networkx - python-packaging - python-pandas - python-requests - python-tqdm - python-typing-extensions - python-urllib3 - python-wrapt)) - (native-inputs - (list nss-certs-for-test - python-bump2version - python-pytest - python-pytest-mock - python-pytest-socket - python-requests-mock - python-setuptools - python-setuptools-scm - python-tox - python-wheel)) - (home-page "https://omnipathdb.org/") - (synopsis "Python client for the OmniPath web service") - (description "This package provides a Python client for the OmniPath web + (package + (name "python-omnipath") + (version "1.0.10") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/saezlab/omnipath/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0jnc7nsn6n5hqx5wlk928b7xmg0mpfqy8al9w2p707ihcwh4s1rf")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags '(list "-k" + (string-append + ;; These require internet access + "not test_download_homologene" + " and not test_complex_genes")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-home + (lambda _ + (setenv "HOME" "/tmp")))))) + (propagated-inputs (list python-attrs + python-docrep + python-inflect + python-networkx + python-packaging + python-pandas + python-requests + python-tqdm + python-typing-extensions + python-urllib3 + python-wrapt)) + (native-inputs (list nss-certs-for-test + python-bump2version + python-hatchling + python-pytest + python-pytest-mock + python-pytest-socket + python-requests-mock)) + (home-page "https://omnipathdb.org/") + (synopsis "Python client for the OmniPath web service") + (description "This package provides a Python client for the OmniPath web service.") - (license license:expat)))) + (license license:expat))) (define-public python-openai (package @@ -12216,19 +12389,23 @@ your FastAPI app, manage your FastAPI project, and more.") (package (name "python-pyactiveresource") (version "2.2.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "pyactiveresource" version)) - (sha256 - (base32 - "1n7xvzh1j8fxal0gx9bgg1ayrp3q9mb1a2vb12d6s86wa93880rg")))) - (build-system python-build-system) - (native-inputs (list python-dateutil python-pyyaml)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Shopify/pyactiveresource") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03pw6fwqjn09fbd6xmng0arlz75pp6ykw25c8d1snp4bxlzkrwqf")))) + (build-system pyproject-build-system) + (native-inputs (list python-dateutil python-pytest python-pyyaml + python-setuptools)) (propagated-inputs (list python-six)) (home-page "https://github.com/Shopify/pyactiveresource/") (synopsis "ActiveResource for Python") - (description "This package provides a Python port of the ActiveResource -project. + (description + "This package provides a Python port of the ActiveResource project. Active Resource attempts to provide a coherent wrapper object-relational mapping for REST web services. It follows the same philosophy as Active @@ -12241,7 +12418,7 @@ infer complex relations and structures.") (define-public python-shopifyapi (package (name "python-shopifyapi") - (version "12.0.0") + (version "12.7.0") (source (origin (method git-fetch) @@ -12250,9 +12427,15 @@ infer complex relations and structures.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0qhs52yxwyasdigdsajsnqqb3jg78a3fm7cmx8dfq267l64xk465")))) + (base32 "11zjm3aspb247wwlmfmq6wwk6lv3xyv3lqnd78sczjg9anba3779")))) (build-system pyproject-build-system) - (native-inputs (list python-mock python-setuptools)) + (arguments + (list + #:test-flags + #~'("-k" + ;; Disable a failing test. + "not test_raises_if_aud_doesnt_match_api_key"))) + (native-inputs (list python-mock python-pytest python-setuptools)) (propagated-inputs (list python-pyactiveresource python-pyjwt python-pyyaml python-six)) (home-page "https://github.com/Shopify/shopify_python_api") @@ -12288,7 +12471,6 @@ list, create, update, or delete resources (e.g. Order, Product, Collection).") (propagated-inputs (list python-jinja2 python-requests)) (native-inputs (list python-flask python-fonttools - python-nox python-pillow python-pytest python-setuptools diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b5680bef04..b5aa148e14 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -783,6 +783,29 @@ implemented in pure Python, and most of them are also implemented in C.") packaging tasks.") (license license:expat))) +(define-public python-envs + (package + (name "python-envs") + (version "1.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "envs" version)) + (sha256 + (base32 "160358zskyg6g606lndjcv7yd2nv5f7ca14y55lds72xk333b14x")))) + (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'unittest)) + (native-inputs + (list python-poetry-core)) + (home-page "https://github.com/capless/envs") + (synopsis "Easy access of environment variables from Python") + (description + "This package implements a functionality to access of environment +variables from Python with support for strings, booleans, list, tuples, and +dicts.") + (license license:asl2.0))) + (define-public python-exitcode (package (name "python-exitcode") @@ -4980,13 +5003,13 @@ Unicode-to-LaTeX conversion.") (define-public python-cftime (package (name "python-cftime") - (version "1.6.4") + (version "1.6.5") (source (origin (method url-fetch) (uri (pypi-uri "cftime" version)) (sha256 - (base32 "1p5fw25hjqpzwxw3662f72ga30kpf8pbbph8fgb7x2kmjdhl09g3")))) + (base32 "07p8s5a0xacn404x6l0i04q1gz2h0h9m5azbhdvbhgxlp7bgw9c2")))) (build-system pyproject-build-system) (arguments (list #:phases @@ -5004,7 +5027,6 @@ Unicode-to-LaTeX conversion.") (list python-cython python-pytest python-setuptools - python-twine python-wheel)) (home-page "https://unidata.github.io/cftime/") (synopsis "Library for time handling") @@ -7029,25 +7051,6 @@ developed by the Astropy project but is intended to be general and usable by any Python package.") (license license:bsd-3))) -(define-public python-types-colorama - (package - (name "python-types-colorama") - (version "0.4.15.20250801") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_colorama" version)) - (sha256 - (base32 "1xapqdq6450ngzp18nvvkwbs68nnxksk1wyk6wid2qw9sq9msmh2")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs - (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for colorama") - (description "This package provides typing stubs for colorama.") - (license license:asl2.0))) - (define-public python-milc (package (name "python-milc") @@ -7939,23 +7942,29 @@ memory usage and transliteration quality.") (define-public python-pyjwt (package (name "python-pyjwt") - (version "2.6.0") + (version "2.10.1") (source (origin (method url-fetch) - (uri (pypi-uri "PyJWT" version)) + (uri (pypi-uri "pyjwt" version)) (sha256 - (base32 - "1z85kwr945rbzrn5wabrsmck5x8disa9wc7b3y5gci7w65z5qa39")))) + (base32 "0lqr73wnrnxflbh8wr768hxp493qayhdis86mwy26280n8p7gi9w")))) (build-system pyproject-build-system) + (arguments + (list + ;; tests: 286 passed, 4 skipped, 1 deselected + ;; + ;; jwt.exceptions.PyJWKClientConnectionError: Fail to fetch data from + ;; the url, err: "<urlopen error [Errno -3] Temporary failure in name + ;; resolution>" + #:test-flags #~(list "-k" "not test_get_jwt_set_sslcontext_default"))) (native-inputs - (list python-coverage - python-cryptography - python-pytest - python-sphinx - python-sphinx-rtd-theme - python-setuptools - python-wheel)) + (list python-pytest + python-setuptools)) + (propagated-inputs + (if (supported-package? python-cryptography) + (list python-cryptography) + '())) (home-page "https://github.com/progrium/pyjwt") (synopsis "JSON Web Token implementation in Python") (description @@ -11017,6 +11026,18 @@ readable format.") ;; GPL2.0 only, with linking exception. (license license:gpl2))) +(define-public python-pygit2-1.18 + (package/inherit python-pygit2 + (name "python-pygit2") + (version "1.18.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pygit2" version)) + (sha256 + (base32 "0m8g8s72c0xwwayykpj1hf8c1wldhmg1sj8kgxdp2rf9c837xa7c")))) + (propagated-inputs (list python-cffi libgit2-1.9)))) + (define-public python-patiencediff (package (name "python-patiencediff") @@ -12491,62 +12512,6 @@ a general image processing tool.") and a plugin for Pillow.") (license license:bsd-3))) -(define-public python-pillow-simd - (package - (name "python-pillow-simd") - (version "10.0.1.post0") - (source - (origin - (method git-fetch) ;no tests in PyPI tarball - (uri (git-reference - (url "https://github.com/uploadcare/pillow-simd") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "16pr4qifb661spf58b7g2lyraask9wf944v4kwk3llg32djvb09b")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - ;; Got different content. - '(list "-k" (string-append "not test_open" - " and not test_consistency_3x3" - " and not test_consistency_5x5" - " and not test_close")) - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'patch-ldconfig - (lambda _ - (substitute* "setup.py" - (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))))) - (native-inputs - (list python-check-manifest - python-defusedxml - python-markdown2 - python-olefile - python-packaging - python-pytest - python-pytest-timeout - python-setuptools - python-trove-classifiers)) - (inputs - (list freetype - lcms - libimagequant - libjpeg-turbo - libraqm - libtiff - libwebp - openjpeg - zlib)) - (home-page "https://github.com/uploadcare/pillow-simd") - (synopsis "Fork of the Python Imaging Library (Pillow)") - (description "This package is a fork of Pillow which adds support for SIMD -parallelism.") - (license (license:x11-style - "http://www.pythonware.com/products/pil/license.htm" - "The PIL Software License")))) - (define-public python-pixelmatch (package (name "python-pixelmatch") @@ -15984,15 +15949,33 @@ as possible in order to be comprehensible and easily extensible.") (define-public python-q (package (name "python-q") - (version "2.6") + (properties '((commit . "cbad74095e20017f33d3ab75aa8375aa046ee697") + (revision . "0"))) + (version (git-version "2.7" + (assoc-ref properties 'revision) + (assoc-ref properties 'commit))) (source (origin - (method url-fetch) - (uri (pypi-uri "q" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/zestyping/q") + (commit (assoc-ref properties 'commit)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy")))) - (build-system python-build-system) + (base32 "17bzi4xma4313waxanz5lly0cf0k6h33qrpy24sra2frh7gp0j0j")))) + (build-system pyproject-build-system) + (arguments + (list + ;; Deduced from the makefile. + #:test-backend #~'custom + #:test-flags #~(list "test/test_basic.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'configure-tests + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "TMPDIR" "/tmp"))))))) + (native-inputs (list python-setuptools)) (home-page "https://github.com/zestyping/q") (synopsis "Quick-and-dirty debugging output for tired programmers") (description @@ -17207,10 +17190,23 @@ the @code{sendfile(2)} system call.") (build-system pyproject-build-system) ;; Using Pytest instead of the Makefile causes the command line tests to ;; fail on unknown Pytest arguments. - (arguments (list #:test-flags #~(list "-k" "not TestCommandLineParser"))) - (native-inputs (list python-psutil python-pytest python-setuptools - python-wheel)) - (propagated-inputs (list python-pyopenssl python-pysendfile)) + (arguments + (list + #:test-flags + #~(list "-k" "not TestCommandLineParser" + #$@(if (target-aarch64?) + ;; TimeoutError: timed out + '((string-append "--deselect=pyftpdlib/test/test_functional.py" + "::TestTimeouts::test_idle_data_timeout2")) + '())))) + (native-inputs + (list python-psutil + python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-pyopenssl + python-pysendfile)) (home-page "https://github.com/giampaolo/pyftpdlib/") (synopsis "Asynchronous and scalable Python FTP server library") (description "The Python FTP server library provides a high-level @@ -17243,33 +17239,41 @@ It has a flexible system of @samp{authorizers} able to manage both (source (origin (method git-fetch) - (uri (git-reference (url - "https://github.com/PyFilesystem/pyfilesystem2/") - (commit (string-append "v" version)))) + (uri (git-reference + (url "https://github.com/PyFilesystem/pyfilesystem2/") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) - (sha256 (base32 "1wrkhsv57kv4jcadn7w330mgbjjsimgzfvicni8cka6y1a8chbjs")))) + (sha256 + (base32 "1wrkhsv57kv4jcadn7w330mgbjjsimgzfvicni8cka6y1a8chbjs")))) (build-system pyproject-build-system) (arguments (list + ;; tests: 1995 passed, 21 skipped, 411 deselected, 14 warnings + #:test-flags #~(list "-m" "not slow") #:tests? (and (not (%current-target-system)) (->bool (this-package-native-input "python-pytest"))) - #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "HOME" "/tmp") - (invoke "pytest" "-m" "not slow"))))))) - (propagated-inputs - (list python-appdirs python-pytz python-six)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" "/tmp")))))) (native-inputs - ;; 'python-pyftpdlib' is needed for tests but it indirectly depends Rust, - ;; which is currently unavailable on aarch64-linux. Remove all the test - ;; dependencies in that case. - (if (and (not (%current-target-system)) - (supported-package? python-pyftpdlib)) - (list python-mock python-parameterized python-pyftpdlib - python-pytest python-setuptools) - '())) + (append + (list python-setuptools) + ;; 'python-pyftpdlib' is needed for tests but it indirectly depends Rust, + ;; which is currently unavailable on aarch64-linux. Remove all the test + ;; dependencies in that case. + (if (and (not (%current-target-system)) + (supported-package? python-pyftpdlib)) + (list python-mock + python-parameterized + python-pyftpdlib + python-pytest) + '()))) + (propagated-inputs + (list python-appdirs + python-pytz + python-six)) ;still hard itegrated (home-page "https://github.com/PyFilesystem/pyfilesystem2/") (synopsis "File system abstraction layer for Python") (description @@ -19782,15 +19786,21 @@ be set via config files and/or environment variables.") (version "0.0.3") (source (origin - (method url-fetch) - (uri (pypi-uri "connection_pool" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/zhouyl/ConnectionPool") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1p6hfkcl4n3hhhcgjbaxn21i7b1yipag6j7dnilir4k5xxx9whmz")))) - (build-system python-build-system) + (base32 "1c6676vga0p4xxa3f0jpbwgp3n69mxjisnfcwibd9x23iyxf3sr2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; No tests. + (native-inputs (list python-setuptools)) (home-page "https://github.com/zhouyl/ConnectionPool") (synopsis "Thread-safe connection pool") - (description "This package provides a library implementing a thread-safe -connection pool.") + (description + "This package provides a library implementing a thread-safe connection +pool.") (license license:expat))) (define-public python-argparse-dataclass @@ -19847,23 +19857,20 @@ and dataclasses.") (version "1.6.4") (source (origin - (method url-fetch) - (uri (pypi-uri "texttable" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/foutaise/texttable/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1sbn821394rix6xgj3zqk743pj6nqm1qz81zgis2bcpp2ng7pvj2")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? (invoke "pytest" "-vv" "tests.py"))))))) - (native-inputs - (list python-pytest)) + (base32 "1lcn76wx6fsj8d79gs985irkqz5qbwq1v9ji9jxsra6dbb643v5j")))) + (build-system pyproject-build-system) + (arguments (list #:test-flags #~(list "tests.py"))) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/foutaise/texttable/") - (synopsis "Python module for creating simple ASCII tables") - (description "Texttable is a Python module for creating simple ASCII + (synopsis "Create simple ASCII tables in Python") + (description + "This package provides a Python module for creating simple ASCII tables.") (license license:expat))) @@ -19871,16 +19878,20 @@ tables.") (package (name "python-atomicwrites") (version "1.4.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "atomicwrites" version)) - (sha256 - (base32 - "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f")))) - (build-system python-build-system) - (arguments `(#:tests? #f)) ;avoid circular dependency with pytest + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/untitaker/python-atomicwrites") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1f21l5fyh8qmsacbsknwwgnd1b9x4i0aw0zpczr05wklkkbvd58y")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) (synopsis "Atomic file writes in Python") - (description "Library for atomic file writes using platform dependent tools + (description + "Library for atomic file writes using platform dependent tools for atomic file system operations.") (home-page "https://github.com/untitaker/python-atomicwrites") (license license:expat))) @@ -19925,17 +19936,21 @@ the construction of PyQt/PySide stylesheets.") (package (name "python-click-threading") (version "0.5.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "click-threading" version)) - (sha256 - (base32 - "0f9lmxwcq0y9lb8w0whbni7gwy12gbv74h1igh85qn9aq0iydkxd")))) - (build-system python-build-system) - (propagated-inputs - (list python-click)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/click-contrib/click-threading") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "185pzw12ap7wrjpyxhsyrkhh7i1l5qclaa3zlpn8qvm39fz0kjni")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-click)) (synopsis "Utilities for multithreading in Click") - (description "This package provides utilities for multithreading in Click + (description + "This package provides utilities for multithreading in Click applications.") (home-page "https://github.com/click-contrib/click-threading") (license license:expat))) @@ -19944,18 +19959,21 @@ applications.") (package (name "python-click-log") (version "0.3.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "click-log" version)) - (sha256 - (base32 - "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n")))) - (build-system python-build-system) - (propagated-inputs - (list python-click)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/click-contrib/click-log") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "01zpjyqnyzrx6xi7cii2180bqdcg2a6b1sdbjijri8jv755r7ray")))) + (build-system pyproject-build-system) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-click)) (synopsis "Logging for click applications") - (description "This package provides a Python library for logging Click -applications.") + (description + "This package provides a Python library for logging Click applications.") (home-page "https://github.com/click-contrib/click-log") (license license:expat))) @@ -20208,15 +20226,31 @@ output, progress bar display, and pipes.") (package (name "python-rply") (version "0.7.8") - (source (origin - (method url-fetch) - (uri (pypi-uri "rply" version)) - (sha256 - (base32 - "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a")))) - (build-system python-build-system) - (propagated-inputs - (list python-appdirs)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alex/rply") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kn8vikyf95mr8l9g3324b7gk4cgxlvvy1abqpl1h803idqg1vwq")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "--ignore=tests/test_ztranslation.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'fix-pytest-use + (lambda _ + (substitute* (find-files "tests" "\\.py$") + (("import py") + "import pytest") + (("py\\.test") + "pytest")) + (setenv "HOME" (getcwd))))))) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-appdirs)) (home-page "https://github.com/alex/rply") (synopsis "Parser generator for Python") (description @@ -20257,41 +20291,66 @@ Python at your fingertips, in Lisp form.") (define-public python-hissp (package (name "python-hissp") - (version "0.2.0") + (version "0.5.0") (source (origin - (method url-fetch) - (uri (pypi-uri "hissp" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/gilch/hissp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw")))) - (build-system python-build-system) + (base32 "03lxna935c0qs3lppb2xrvvgh0dkwz8lh5pmgqrmpddin1kxyjri")))) + (build-system pyproject-build-system) + (arguments (list #:test-backend #~'unittest)) + (native-inputs (list python-hypothesis python-setuptools)) (home-page "https://github.com/gilch/hissp") (synopsis "It's Python with a Lissp") - (description "Hissp is a modular Lisp implementation that compiles to a -functional subset of Python—Syntactic macro metaprogramming with full access -to the Python ecosystem.") + (description + "Hissp is a modular Lisp implementation that compiles to a functional +subset of Python—Syntactic macro metaprogramming with full access to the +Python ecosystem.") (license license:asl2.0))) (define-public python-promise (package (name "python-promise") - (version "0.4.2") + (version "2.3.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "promise" version)) - (sha256 - (base32 - "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h")))) - (build-system python-build-system) - ;; Tests wants python-futures, which is a python2 only program, and - ;; can't be found by python-promise at test time. - (arguments `(#:tests? #f)) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/syrusakbary/promise") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "17mq1bm78xfl0x1g50ng502m5ldq6421rzz35hlqafsj0cq8dkp6")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--ignore=tests/test_benchmark.py" + ;; Issues with pytest-asyncio + "--ignore=tests/test_awaitable.py" + "-k" (string-join + (list "not test_issue_9_safe" + ;; Stacktrace issues. + "test_thrown_exceptions_have_stacktrace" + "test_thrown_exceptions_preserve_stacktrace") + " and not ")))) + (native-inputs + (list python-mock + python-pytest + python-pytest-asyncio + python-setuptools)) + (propagated-inputs (list python-six)) (home-page "https://github.com/syrusakbary/promise") (synopsis "Promises/A+ implementation for Python") (description - "Promises/A+ implementation for Python") + "This package provides an implementation of Promises in Python. It is a +super set of Promises/A+ designed to have readable, performant code and to +provide just the extensions that are absolutely necessary for using promises +in Python.") (license license:expat))) (define-public python-progress @@ -20300,17 +20359,27 @@ to the Python ecosystem.") (version "1.6") (source (origin - (method url-fetch) - (uri (pypi-uri "progress" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/verigak/progress/") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1k9lpb7lqr6mywpnqcz71y6qny54xlgprdp327za2gy0nnc6xj69")))) - (build-system python-build-system) - (home-page "http://github.com/verigak/progress/") + (base32 "0qz5b9d3cvfdy2f1gb4r20f1qgcsihhmbc2bm2jgbvryxylp0f5k")) + (snippet #~(delete-file "demo.gif")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-backend #~'custom + #:test-flags #~(list "test_progress.py"))) + (native-inputs (list python-setuptools)) + (home-page "https://github.com/verigak/progress/") (synopsis "Progress reporting bars for Python") - (description "This Python package provides progress reporting for visual -of progress of long running operations. There are multiple choices of -progress bars and spinners, with customizable options, such as width, fill -character, and suffix.") + (description + "This Python package provides progress reporting for visual of progress +of long running operations. There are multiple choices of progress bars and +spinners, with customizable options, such as width, fill character, and +suffix.") (license license:isc))) (define-public python-progressbar2 @@ -20356,12 +20425,19 @@ visual (yet text based) progress to long running operations.") (version "2.4") (source (origin - (method url-fetch) - (uri (pypi-uri "progressbar33" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/germangh/python-progressbar") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji")))) - (build-system python-build-system) + (base32 "0vyn2l6i7fgqskqfx3nfs1dibc5v1cxydg3v3422xf41pkba282c")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-backend #~'custom + #:test-flags #~(list "examples.py"))) + (native-inputs (list python-setuptools)) (home-page "https://github.com/germangh/python-progressbar") (synopsis "Text progress bar library for Python") (description @@ -20423,87 +20499,74 @@ text.") (build-system pyproject-build-system) (arguments (list - ;; tests: 10000 passed, 16 skipped, 2 xfailed, 42 warnings + ;; tests: 10230 passed, 39 skipped, 73 deselected, 2 xfailed, 4 warnings #:test-flags - '(list "-m" "not network and not requires_docker" - "--numprocesses" (number->string (min 8 (parallel-job-count))) - ;; This needs pycognito. - "--ignore-glob=tests/test_cognitoidp/*" - ;; This needs Internet access. - "--ignore=tests/test_core/test_request_passthrough.py" - "-k" - (string-append - ;; XXX: This test is timing sensitive and may - ;; fail non-deterministically. - "not test_cancel_pending_job" - - ;; The error message is more detailed than expected. - " and not test_list_queue_tags_errors" - - ;; Unknown failure: invalid length for parameter IpAdresses. - " and not test_route53resolver_bad_create_endpoint_subnets" - " and not test_route53resolver_invalid_create_endpoint_args" - - ;; These tests require Docker. - " and not test_terminate_job" - " and not test_invoke_function_from_sqs_exception" - " and not test_create_custom_lambda_resource__verify_cfnresponse_failed" - " and not test_lambda_function" - " and not test_invoke_local_lambda_layers" - - ;; These tests also require the network. - " and not test_s3_server_post_cors_multiple_origins" - " and not test_put_record_batch_http_destination" - " and not test_put_record_http_destination" - " and not test_with_custom_request_header" - " and not test_dependencies" - " and not test_cancel_running_job" - " and not test_container_overrides" - - ;; TypeError: Got unexpected keyword argument - ;; 'account_id_endpoint_mode' - " and not test_dynamodb_with_account_id_routing" - - ;; botocore.exceptions.ParamValidationError: Parameter - ;; validation failed - " and not test_create_firewall" - " and not test_describe_logging_configuration" - " and not test_update_logging_configuration" - " and not test_list_firewalls" - ;; AttributeError: 'TimestreamInfluxDB' object has no attribute - ;; 'list_db_clusters' - - " and not test_create_db_cluster" - " and not test_get_db_cluster" - " and not test_list_db_clusters" - - ;; XXX: misc - " and not test_list_objects_v2_checksum_algo" - " and not test_upload_file_with_checksum_algorithm")) + #~(list "-m" "not network and not requires_docker" + ;; Not all of the tests are thread save, see: + ;; <https://github.com/getmoto/moto/issues/7786>. + ;; "--numprocesses" (number->string (min 8 (parallel-job-count))) + "-k" (string-join + ;; Outbound access to AWS servcies is required to reach + ;; endpoint URLs: + ;; "https://s3.amazonaws.com/" + ;; "https://realbucket.s3.amazonaws.com/" + ;; "https://s3.amazonaws.com/companyname_prod" + (list "not test_passthrough_calls_for_entire_service" + "test_passthrough_calls_for_specific_url" + "test_passthrough_calls_for_wildcard_urls" + ;; TypeError: Got unexpected keyword argument + ;; 'account_id_endpoint_mode' + "test_dynamodb_with_account_id_routing[disabled]" + "test_dynamodb_with_account_id_routing[preferred]" + "test_dynamodb_with_account_id_routing[required]" + ;; botocore.exceptions.ParamValidationError: + ;; Parameter validation failed: Missing required + ;; parameter in input: "VpcId"; Missing required + ;; parameter in input: "SubnetMappings" + "test_create_firewall" + "test_describe_logging_configuration" + "test_list_firewalls" + "test_update_logging_configuration" + ;; RuntimeError: Firehose PutRecord(Batch) to HTTP + ;; destination failed + "test_put_record_http_destination" + "test_put_record_batch_http_destination" + ;; Timed out to connect to foo.localhost:5001 + "test_with_custom_request_header" + ;; Timed out to connect to testcors.localhost:6789 + "test_s3_server_post_cors_multiple_origins" + ;; AttributeError: 'TimestreamInfluxDB' object has + ;; no attribute 'list_db_clusters' + "test_list_db_clusters" + "test_get_db_cluster" + "test_create_db_cluster" + ;; Checksum error + "test_upload_file_with_checksum_algorithm" + "test_list_objects_v2_checksum_algo") + " and not ") + "tests") #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'compatibility - (lambda _ - ;; pyparsing 3.0.6 does not support the "min" argument for - ;; DelimitedList. - (substitute* "moto/glue/utils.py" - (("DelimitedList\\(literal, min=1\\)") - "DelimitedList(literal)")))) - (add-after 'unpack 'patch-hardcoded-executable-names - (lambda* (#:key inputs #:allow-other-keys) - (let ((bash-exec (search-input-file inputs "/bin/sh"))) - (substitute* "moto/batch/models.py" - (("/bin/sh") bash-exec)) - (substitute* (find-files "tests" "\\.py$") - (("#!/bin/bash") (string-append "#!" bash-exec))))))))) + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-executable-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash-exec (search-input-file inputs "/bin/sh"))) + (substitute* "moto/batch/models.py" + (("/bin/sh") bash-exec)) + (substitute* (find-files "tests" "\\.py$") + (("#!/bin/bash") (string-append "#!" bash-exec)))))) + (add-before 'check 'pre-check + (lambda _ + (setenv "AWS_ACCESS_KEY_ID" "guix-access-key-id") + (setenv "AWS_SECRET_ACCESS_KEY" "guix-secret-access-key") + (setenv "TESTS_SKIP_REQUIRES_DOCKER" "true")))))) (native-inputs (list python-flask python-flask-cors python-freezegun + python-pycognito + python-pyotp python-pytest - python-pytest-xdist - python-setuptools - python-wheel)) + python-setuptools)) (inputs (list bash-minimal)) (propagated-inputs @@ -21143,31 +21206,6 @@ Abstract Syntax Tree}. It is a building block for writing a static analyzer or compiler for Python.") (license license:bsd-3))) -(define-public python-txamqp - (package - (name "python-txamqp") - (version "0.8.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "txAMQP" version)) - (sha256 - (base32 - "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4")))) - (build-system python-build-system) - (propagated-inputs - (list python-six python-twisted)) - (home-page "https://github.com/txamqp/txamqp") - (synopsis "Communicate with AMQP peers and brokers using Twisted") - (description - "This package provides a Python library for communicating with AMQP peers -and brokers using the asynchronous networking framework Twisted. It contains -all the necessary code to connect, send and receive messages to/from an -AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It -also includes support for using Thrift RPC over AMQP in Twisted -applications.") - (license license:asl2.0))) - (define-public python-kombu (package (name "python-kombu") @@ -22373,16 +22411,15 @@ format.") (build-system pyproject-build-system) (arguments (list + ;; tests: skips=638, successes=9759 + #:test-backend #~'custom + #:test-flags + #~(list "-m" "twisted.trial" + "--temp-directory=/tmp/_trial_temp" + (string-append "-j" (number->string (min 8 (parallel-job-count)))) + "twisted") #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'patch-build-system - (lambda _ - (substitute* "pyproject.toml" - ((" \"version\",") "") - (("name = \"Twisted\".*" m) - (string-append m "version = \"" #$version "\"\n")) - (("\\[tool.hatch.version\\]") "") - (("source = \"incremental\"") "")))) (add-after 'unpack 'disable-broken-tests (lambda _ (for-each delete-file @@ -22405,14 +22442,7 @@ format.") ;; These complain about missing test modules. "src/twisted/test/test_failure.py" "src/twisted/web/test/test_http2.py" - "src/twisted/conch/test/test_forwarding.py")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (with-directory-excursion #$output - (setenv "HOME" (getcwd)) - (invoke "python3" "-m" "twisted.trial" "twisted") - (delete-file-recursively "_trial_temp")))))))) + "src/twisted/conch/test/test_forwarding.py"))))))) (propagated-inputs (list python-attrs python-automat @@ -22437,11 +22467,11 @@ format.") python-pyserial)) (native-inputs (list glibc-utf8-locales ;for OpenTestLogTests.test_utf8 - python-coverage python-hatch-fancy-pypi-readme python-hatchling python-httpx python-hypothesis + python-incremental python-pyhamcrest python-pytest)) (home-page "https://twistedmatrix.com/") @@ -22799,8 +22829,7 @@ running in.") (build-system pyproject-build-system) (native-inputs (list python-poetry-core - python-pytest - python-tox)) + python-pytest)) (home-page "https://github.com/zqqqqz2000/shshsh") (synopsis "Write Shell commands simply and safely within Python") (description "This package provides a way to write Shell commands from @@ -23240,55 +23269,6 @@ feels like an AST.") python-setuptools-scm python-wheel))))) -(define-public python-typeapi - (package - (name "python-typeapi") - (version "2.2.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "typeapi" version)) - (sha256 - (base32 "0yzx10cn33gxqvs33vwdf0f959hbkir4yzjp42imf28ca9khga6s")))) - (build-system pyproject-build-system) - (arguments - (list - #:tests? #false)) ;there are none - (propagated-inputs (list python-typing-extensions)) - (native-inputs (list python-hatchling)) - (home-page "https://pypi.org/project/typeapi/") - (synopsis "Type hints") - (description "The typeapi package provides an object-oriented interface -for introspecting PEP484 type hints at runtime, including forward references -that make use of the more recent PEP585 and PEP604 type hint features in -Python versions that don't natively support them.") - (license license:expat))) - -(define-public python-typing-inspect - (package - (name "python-typing-inspect") - (version "0.9.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "typing_inspect" version)) - (sha256 - (base32 - "0y0z8v4wr5bahlgzjd1il2z8vlfd2asiyb45wia6kvznyqpw8gxj")))) - (build-system pyproject-build-system) - (native-inputs - (list python-pytest - python-setuptools - python-wheel)) - (propagated-inputs - (list python-mypy-extensions - python-typing-extensions)) - (home-page "https://github.com/ilevkivskyi/typing_inspect") - (synopsis "API for inspection of types in the Python @code{typing} module") - (description - "The @code{typing_inspect} module defines experimental API for runtime -inspection of types defined in the Python standard typing module.") - (license license:expat))) - (define-public python-lazy-loader (package (name "python-lazy-loader") @@ -25108,6 +25088,55 @@ protocols written in pure Python.") ;; Can be used with either license. (license (list license:asl2.0 license:gpl2+)))) +(define-public python-dulwich-0.24 + (package/inherit python-dulwich + (name "python-dulwich") + (version "0.24.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dulwich" version)) + (sha256 + (base32 "0n3p8jyxl4zwc63la10v8llc58fc5pcnfqdq9f1vn0hgy5jdi7z1")))) + (build-system pyproject-build-system) + (native-inputs + (modify-inputs (package-native-inputs python-dulwich) + (prepend python-setuptools-rust))) + (arguments + (list + #:test-flags + ;; DULWICH_SWIFT_CFG is not set. + '(list "--ignore=tests/contrib/test_swift_smoke.py" + ;; AttributeError: 'SwiftPackData' object has no attribute '_file' + "--ignore=tests/contrib/test_swift.py" + ;; No git repository was found at . + "--ignore=tests/test_cli.py" + ;; 'HTTPClient' object has no attribute 'get_base_url' + ;; 'NoneType' object has no attribute 'Merge3' + "--ignore=tests/test_cli_merge.py" + "--ignore=tests/test_merge_drivers.py" + "--ignore=tests/test_porcelain_cherry_pick.py" + "--ignore=tests/test_porcelain_merge.py" + "--ignore=tests/test_rebase.py" + "--ignore=tests/test_repository.py" + "--ignore=tests/test_worktree.py" + "--ignore=tests/test_porcelain.py" + "--ignore=tests/test_porcelain_filters.py" + ;; False is not true (interesting capitalization?) + "--ignore=tests/test_hooks.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; setuptools cannot handle both license and license-files + (substitute* "pyproject.toml" + (("^license = .*") "license = {text = \"Apache-2.0\"}\n") + (("^license-files = .*") "")))) + (add-before 'check 'pre-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp"))))))))) + (define-public python-dunamai (package (name "python-dunamai") @@ -25363,21 +25392,11 @@ manipulation and interaction with formal grammars.") "1jb4skmy8awix345jk2pnar0sxmrf1gvn3kg9xyyivv0xr3iskzv")))) (build-system pyproject-build-system) (arguments - (list - ;; Tests require twisted, which needs this package. - #:tests? #false - #:phases - '(modify-phases %standard-phases - (add-after 'unpack 'patch-build-system - (lambda _ - (substitute* "pyproject.toml" - (("^backend-path.*") "") - (("^build-backend.*") - "build-backend = 'setuptools.build_meta'\n"))))))) - (native-inputs (list python-pytest - python-setuptools - python-wheel)) - (propagated-inputs (list python-tomli)) + ;; Tests require twisted, which needs this package. + (list #:tests? #false + #:build-backend "setuptools.build_meta")) + (native-inputs + (list python-setuptools)) (home-page "https://github.com/hawkowl/incremental") (synopsis "Library for versioning Python projects") (description "Incremental is a small library that versions your Python @@ -27679,6 +27698,58 @@ Examples are: @end enumerate") (license license:bsd-3))) +(define-public python-funcy-1.14 + (package/inherit python-funcy + (name "python-funcy") + (version "1.14") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Suor/funcy") + (commit version))) + (sha256 + (base32 "1chgi60z3c97m9l23vf5cpyp0nidkqlpxc55q5k5pz41ms3d0440")) + (file-name (git-file-name name version)))))) + +(define-public python-sqltrie + (package + (name "python-sqltrie") + (version "0.11.2") + (home-page "https://github.com/iterative/sqltrie/") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sqltrie" version)) + (sha256 + (base32 "1ninmia5ka1nnv4gxqacvbmkfxwc7dilw141rxxk9zmbnf4p1x2d")))) + (build-system pyproject-build-system) + (propagated-inputs + (list python-attrs + python-orjson + python-pygtrie)) + (native-inputs + (list python-mypy + python-pytest + python-pytest-benchmark + python-pytest-cov + python-pytest-mock + python-pytest-sugar + python-setuptools + python-setuptools-scm + python-wheel)) + (arguments + (list + #:test-flags + ;; <https://github.com/pyinstaller/pyinstaller> is not packaged yet in + ;; Guix. + #~(list "--ignore=src/sqltrie/__pyinstaller"))) + (synopsis "SQL-based prefix tree for Python") + (description + "Sqltrie is a SQL-based prefix tree inspired by pygtrie and +python-diskcache.") + (license license:asl2.0))) + (define-public python-isoweek (package (name "python-isoweek") @@ -27781,67 +27852,6 @@ source bytes using the UTF-8 encoding and then rewrites Python 3.6 style @code{f} strings.") (license license:expat))) -(define-public python-typer - (package - (name "python-typer") - (version "0.19.2") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/fastapi/typer") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "13lkzlpb35xzz1spdisrmq7md9wq3msqxwcqj85vk905iq80xjwq")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))))) - (native-inputs - (list python-coverage ;this is required in tests - python-pdm-backend - python-pytest - python-pytest-xdist)) - (propagated-inputs - (list python-click - python-typing-extensions - ;; [optional] - python-rich - python-shellingham)) - (home-page "https://github.com/fastapi/typer") - (synopsis "Typer builds CLI based on Python type hints") - (description - "Typer is a library for building CLI applications. It's based on Python -3.6+ type hints.") - (license license:expat))) - -(define-public python-typeguard - (package - (name "python-typeguard") - (version "4.4.4") - (source - (origin - (method url-fetch) - (uri (pypi-uri "typeguard" version)) - (sha256 - (base32 "0x2zkskia5lb1838ys0bhpp9v6y80jkhchzdz874spbhzggx4zrs")))) - (build-system pyproject-build-system) - (native-inputs - (list python-mypy - python-pytest - python-setuptools - python-setuptools-scm)) - (propagated-inputs - (list python-typing-extensions)) - (home-page "https://github.com/agronholm/typeguard") - (synopsis "Run-time type checker for Python") - (description - "@code{typeguard} provides run-time type checking for functions defined -with PEP 484 argument (and return) type annotations.") - (license license:expat))) - (define-public bpython (package (name "bpython") @@ -30138,26 +30148,6 @@ and dates in \"human readable\" forms. For example, it would display \"12345591313\" as \"12.3 billion\".") (license license:expat))) -(define-public python-txaio - (package - (name "python-txaio") - (version "23.1.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "txaio" version)) - (sha256 - (base32 - "017p9x0bssf7g9slmf30ddh1baawsmxas4nivx334pkfjxp23agr")))) - (build-system pyproject-build-system) - (native-inputs - (list python-pytest python-setuptools python-twisted python-wheel)) - (home-page "https://github.com/crossbario/txaio") - (synopsis "Compatibility layer between Python asyncio and Twisted") - (description "Txaio provides a compatibility layer between the Python -@code{asyncio} module and @code{Twisted}.") - (license license:expat))) - (define-public python-toolshed (package (name "python-toolshed") @@ -32071,78 +32061,6 @@ happened, and what caused it.") "This package provides a Python module for parsing and splitting PEM files.") (license license:expat))) -(define-public python-txsni - ;; We need a few commits on top of 0.1.9 for compatibility with newer - ;; Python and OpenSSL. - (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1") - (revision "0")) - (package - (name "python-txsni") - (version (git-version "0.1.9" revision commit)) - (home-page "https://github.com/glyph/txsni") - (source - (origin - (method git-fetch) - (uri (git-reference (url home-page) (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8")))) - (build-system python-build-system) - (propagated-inputs - (list python-pyopenssl python-service-identity python-twisted)) - (synopsis "Run TLS servers with Twisted") - (description - "This package provides an easy-to-use SNI endpoint for use -with the Twisted web framework.") - (license license:expat)))) - -(define-public python-txacme - ;; 0.9.3 tag was placed in 2020 and there a lot of changes providing - ;; compatibility wit twisted, use the latest commit from trunk branch. - ;; - ;;See: <https://github.com/twisted/txacme/issues/165>. - (let ((commit "ac18f92f6dde971a6b38f2ecfae44665815db583") - (revision "0")) - (package - (name "python-txacme") - (version (git-version "0.9.3" revision commit)) - (source - (origin - (method git-fetch) ;no fresh release in PyPI - (uri (git-reference - (url "https://github.com/twisted/txacme") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0mgdfxldv8qflbn75ywslbarnd4i3l7c4krs4aibl2dpryclsjzs")))) - (build-system pyproject-build-system) - (arguments - (list #:test-backend #~'custom - #:test-flags #~(list "-m" "twisted.trial" "txacme"))) - (native-inputs - (list python-setuptools)) - (propagated-inputs - (list python-acme - python-attrs - python-eliot - python-josepy - python-pem - python-treq - python-twisted - python-txsni)) - (home-page "https://github.com/twisted/txacme") - (synopsis "Twisted implexmentation of the ACME protocol") - (description - "ACME is Automatic Certificate Management Environment, a protocol that -allows clients and certificate authorities to automate verification and -certificate issuance. The ACME protocol is used by the free Let's Encrypt -Certificate Authority. - -txacme is an implementation of the protocol for Twisted, the event-driven -networking engine for Python.") - (license license:expat)))) - (define-public python-pysaml2 (package (name "python-pysaml2") @@ -34232,37 +34150,6 @@ entities @end enumerate") (license license:bsd-3))) -(define-public python-typogrify - (package - (name "python-typogrify") - (version "2.1.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "typogrify" version)) - (sha256 - (base32 "1vk17q04sax8rpdqll5zldnf6l3ixgknbnn9wimnwah3k1701aph")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - #~(list "--doctest-modules" - "typogrify/filters.py" - "typogrify/packages/titlecase/tests.py"))) - (native-inputs - (list python-pytest - python-hatchling)) - (propagated-inputs - (list python-smartypants)) - (home-page "https://github.com/justinmayer/typogrify") - (synopsis "Filters to transform text into typographically-improved HTML") - (description - "@code{typogrify} provides a set of custom filters that automatically -apply various transformations to plain text in order to yield -typographically-improved HTML. While often used in conjunction with Jinja and -Django template systems, the filters can be used in any environment.") - (license license:bsd-3))) - (define-public python-ld (package (name "python-ld") @@ -35463,13 +35350,13 @@ spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.") (define-public python-febelfin-coda (package (name "python-febelfin-coda") - (version "0.2.0") + (version "0.3.0") (source (origin (method url-fetch) (uri (pypi-uri "febelfin-coda" version)) (sha256 - (base32 "1isnf87gxlvfbmackv7b2c978vmnj7ij0v4svhyjl8pbb9hwjsvm")))) + (base32 "0qzv0irmpay2n46an0sa37c9kwy8108phij5ix6rkllrfjmqdpfw")))) (build-system python-build-system) (home-page "https://coda.b2ck.com/") (synopsis "Module to parse Belgian CODA files") @@ -36322,227 +36209,6 @@ but not binary streams.") multipurpose analysis in Python.") (license license:bsd-3))) -(define-public python-types-dataclasses - (package - (name "python-types-dataclasses") - (version "0.6.6") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-dataclasses" version)) - (sha256 - (base32 "1fgp96m4kfxrwy6rdv3p24jzh6hf68702sfdfhcmm3aniv7jynjb")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for dataclasses") - (description - "This package provides a collection of library stubs for Python, with -static types.") - (license license:asl2.0))) - -(define-public python-types-python-dateutil - (package - (name "python-types-python-dateutil") - (version "2.9.0.20250708") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_python_dateutil" version)) - (sha256 - (base32 "1ay8sp8qshx2na2sa9sz9hg2hb7yrws9ymshqfb9cv1dmdfxgnyc")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for python-dateutil") - (description "This package providis typing stubs for python-dateutil.") - (license license:asl2.0))) - -(define-public python-types-aiofiles - (package - (name "python-types-aiofiles") - (version "25.1.0.20251011") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_aiofiles" version)) - (sha256 - (base32 "1zyk53h1017s1pc094w909miwvjsq3yhxlgr2l6d8g6bc2r8laqw")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for python-aiofiles") - (description "This package providis typing stubs for python-aiofiles.") - (license license:asl2.0))) - -(define-public python-types-tqdm - (package - (name "python-types-tqdm") - (version "4.67.0.20250809") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_tqdm" version)) - (sha256 - (base32 "006md2hnsq79p7d5z3kiaapvl9wwa4dz3yb39jf0n22n2awpmgq2")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs (list python-setuptools)) - (propagated-inputs (list python-types-requests)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for python-tqdm") - (description "This package providis typing stubs for python-tqdm.") - (license license:asl2.0))) - -(define-public python-types-docutils - (package - (name "python-types-docutils") - (version "0.22.2.20251006") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_docutils" version)) - (sha256 - (base32 "1cp3p4bsaa646fa3kpjwjwsqbn6vz77pn57913lkknkf21ch8v63")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for docutils") - (description "This package provides a collection of library stubs for -Python, with static types.") - (license license:asl2.0))) - -(define-public python-types-requests - (package - (name "python-types-requests") - (version "2.32.4.20250611") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_requests" version)) - (sha256 - (base32 "09pqdfa66d3p5dig26chrd6rpxs5wamxcm0yyl5q69b4xmvqf73l")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs - (list python-setuptools)) - (propagated-inputs - (list python-urllib3)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for requests") - (description "This package provides typing stubs for requests.") - (license license:asl2.0))) - -(define-public python-types-simplejson - (package - (name "python-types-simplejson") - (version "3.19.0.20241221") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_simplejson" version)) - (sha256 - (base32 "0w7wvr84d7bj27hc2bsyh69s9d84zpkdhsibbmsibba91zdzjjhi")))) - (build-system pyproject-build-system) - (arguments - (list - #:tests? #f)) ; no tests in PyPI archive, no release or tags on GitHub - (native-inputs - (list python-setuptools python-wheel)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for simplejson") - (description "Typing stubs for simplejson.") - (license license:asl2.0))) - -(define-public python-types-setuptools - (package - (name "python-types-setuptools") - (version "80.9.0.20250529") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_setuptools" version)) - (sha256 - (base32 "149w6lg8n56k50n08jx450ni9frs2hzbv729sv48c8ds1jx8iq3r")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs - (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for setuptools") - (description "This package provides typing stubs for setuptools.") - (license license:asl2.0))) - -(define-public python-types-urllib3 - (package - (name "python-types-urllib3") - (version "1.26.25.14") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-urllib3" version)) - (sha256 - (base32 "13ys7c7k9pg3lb11qvdgs9xq8j8bvcpjpg61j8dqq6wmgibpz6r2")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs - (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for urllib3") - (description "This package provides typing stubs for urllib3.") - (license license:asl2.0))) - -(define-public python-types-pyyaml - (package - (name "python-types-pyyaml") - (version "6.0.12.20250915") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_pyyaml" version)) - (sha256 - (base32 "1lyirqjacfmn6bv27b7w0z483yps6gfqfmhnyzkg00y352jm92qg")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs - (list python-setuptools)) - (home-page " https://github.com/python/typeshed") - (synopsis "Typing stubs for PyYAML") - (description "This package provides typing stubs for @code{PyYAML}.") - (license license:asl2.0))) - -(define-public python-typeshed-client - (package - (name "python-typeshed-client") - (version "2.8.2") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/JelleZijlstra/typeshed_client") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0i74ygf49184ab1ipfdzf706wnzs3id15rkysqarzcngdydrcszs")))) - (build-system pyproject-build-system) - (arguments - (list #:test-backend #~'custom - #:test-flags #~(list "tests/test.py"))) - (native-inputs - (list python-setuptools)) - (propagated-inputs - (list python-importlib-resources - python-typing-extensions)) - (home-page "https://github.com/JelleZijlstra/typeshed_client") - (synopsis "Library for accessing stubs in typeshed") - (description - "This package provides a library for accessing stubs in typeshed.") - (license license:expat))) - (define-public python-psycopg2-binary (package (name "python-psycopg2-binary") @@ -36621,137 +36287,6 @@ async I/O support.") "This package adds ANSI colors and decorations to your strings.") (license license:isc))) -(define-public python-types-dateutil - (package - (name "python-types-dateutil") - (version "2.9.0.20240316") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-python-dateutil" version)) - (sha256 - (base32 "00h2xi8p6ygdv9nhgwdyx86ky9m9dpdqgmsdji05x4461cj2wbsx")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ; no tests - (native-inputs - (list python-pytest python-setuptools python-wheel)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for python-dateutil") - (description - "This is a PEP 561 type stub package for the @code{python-dateutil} -package.") - (license license:asl2.0))) - -(define-public python-types-freezegun - (package - (name "python-types-freezegun") - (version "1.1.8") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-freezegun" version)) - (sha256 - (base32 "08g926s8343zwq140zcfwly3qfgmahm7lp0vgb3ics549b2hifzl")))) - (build-system pyproject-build-system) - (arguments - ;; XXX: No tests in PyPi source, but it's also unclear how to get the - ;; right files from source, so ignore them for now. - (list #:tests? #f)) - (native-inputs (list python-setuptools python-wheel)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for @code{freezegun}") - (description "This package contains typing stubs for for @code{freezegun}, a -very small subset the Python stubs contained in the complete @code{typeshed} -collection.") - (license license:asl2.0))) - -(define-public python-types-protobuf - (package - (name "python-types-protobuf") - (version "3.20.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "types-protobuf" version)) - (sha256 - (base32 - "000f8n6d4ilihiaf590k73rx3327jh8ima5q5dpxlwz3frj45qrn")))) - (build-system pyproject-build-system) - (arguments - ;; XXX: No tests in PyPi source, but it's also unclear how to get the - ;; right files from source, so ignore them for now. - (list #:tests? #f)) - (native-inputs (list python-setuptools python-wheel)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for @code{protobuf}") - (description "This package contains typing stubs for @code{protobuf}, a -very small subset the Python stubs contained in the complete @code{typeshed} -collection.") - (license license:asl2.0))) - -(define-public python-types-pytz - (package - (name "python-types-pytz") - (version "2025.2.0.20250809") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_pytz" version)) - (sha256 - (base32 "1r91pvn1w9rb1395qw8w8k22s7w0wf2qfkl3z1qqiclvlbk34bi2")))) - (build-system pyproject-build-system) - (arguments - (list #:tests? #f)) ;no tests provided - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for pytz") - (description "This package contains typing stubs for @code{pytz}, a very -small subset the Python stubs contained in the complete @code{typeshed} -collection.") - (license license:asl2.0))) - -(define-public python-types-toml - (package - (name "python-types-toml") - (version "0.10.8.20240310") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-toml" version)) - (sha256 - (base32 "0c83hfw4aqy01vzlh6r84mz6b2b6n98chfdjp2k3c94p089m0h9x")))) - (build-system pyproject-build-system) - (arguments - (list #:tests? #f)) ;no tests provided - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for TOML") - (description - "This package contains typing stubs for TOML, a very small subset the -Python stubs contained in the complete @code{typeshed} collection.") - (license license:asl2.0))) - -(define-public python-types-ujson - (package - (name "python-types-ujson") - (version "5.10.0.20250822") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_ujson" version)) - (sha256 - (base32 "01m0gdcy6plrjxxih96ra86wd2zhn4skzw7k7hvk51gpw5c5ay8a")))) - (build-system pyproject-build-system) - (arguments - (list #:tests? #f)) ;no tests provided - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for ujson") - (description - "This is a PEP 561 type stub package for the ujson package. It can be -used by type-checking tools like mypy, PyCharm, pytype etc. to check code that -uses ujson.") - (license license:asl2.0))) - (define-public python-stltools (package (name "python-stltools") @@ -38188,44 +37723,6 @@ slice file content line by line or column by column or a combination of both.") (license license:bsd-3))) -(define-public python-types-orjson - (package - (name "python-types-orjson") - (version "3.6.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types-orjson" version)) - (sha256 - (base32 "0f66lf2qrl9d4vad42db3dmnzv89h4rr05r5zxx5qcl6kb3zr6ng")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for orjson") - (description "This is a PEP 561 type stub package for the @code{orjson} -package. It can be used by type-checking tools like mypy, PyCharm, pytype -etc. to check code that uses @code{orjson}.") - (license license:asl2.0))) - -(define-public python-types-regex - (package - (name "python-types-regex") - (version "2025.9.18.20250921") - (source - (origin - (method url-fetch) - (uri (pypi-uri "types_regex" version)) - (sha256 - (base32 "0gqc8b9d38pdm1l6nryi9rq9vmpis575hqnxlvj904n3n4hhqw71")))) - (build-system pyproject-build-system) - (arguments (list #:tests? #f)) ;no tests in PyPI archive - (native-inputs (list python-setuptools)) - (home-page "https://github.com/python/typeshed") - (synopsis "Typing stubs for regex") - (description "This package provides typing stubs for regex.") - (license license:asl2.0))) - (define-public python-rpds-py (package (name "python-rpds-py") @@ -38617,6 +38114,556 @@ instance in spelling correction, predictive typing, to help disabled people write text fast, and for various text generation, statistics, and modeling tasks.") (license license:expat))) +(define-public python-typeapi + (package + (name "python-typeapi") + (version "2.2.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "typeapi" version)) + (sha256 + (base32 "0yzx10cn33gxqvs33vwdf0f959hbkir4yzjp42imf28ca9khga6s")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #false)) ;there are none + (propagated-inputs (list python-typing-extensions)) + (native-inputs (list python-hatchling)) + (home-page "https://pypi.org/project/typeapi/") + (synopsis "Type hints") + (description "The typeapi package provides an object-oriented interface +for introspecting PEP484 type hints at runtime, including forward references +that make use of the more recent PEP585 and PEP604 type hint features in +Python versions that don't natively support them.") + (license license:expat))) + +(define-public python-typeguard + (package + (name "python-typeguard") + (version "4.4.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "typeguard" version)) + (sha256 + (base32 "0x2zkskia5lb1838ys0bhpp9v6y80jkhchzdz874spbhzggx4zrs")))) + (build-system pyproject-build-system) + (native-inputs + (list python-mypy + python-pytest + python-setuptools + python-setuptools-scm)) + (propagated-inputs + (list python-typing-extensions)) + (home-page "https://github.com/agronholm/typeguard") + (synopsis "Run-time type checker for Python") + (description + "@code{typeguard} provides run-time type checking for functions defined +with PEP 484 argument (and return) type annotations.") + (license license:expat))) + +(define-public python-typer + (package + (name "python-typer") + (version "0.19.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fastapi/typer") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "13lkzlpb35xzz1spdisrmq7md9wq3msqxwcqj85vk905iq80xjwq")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))))) + (native-inputs + (list python-coverage ;this is required in tests + python-pdm-backend + python-pytest + python-pytest-xdist)) + (propagated-inputs + (list python-click + python-typing-extensions + ;; [optional] + python-rich + python-shellingham)) + (home-page "https://github.com/fastapi/typer") + (synopsis "Typer builds CLI based on Python type hints") + (description + "Typer is a library for building CLI applications. It's based on Python +3.6+ type hints.") + (license license:expat))) + +(define-public python-types-aiofiles + (package + (name "python-types-aiofiles") + (version "25.1.0.20251011") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_aiofiles" version)) + (sha256 + (base32 "1zyk53h1017s1pc094w909miwvjsq3yhxlgr2l6d8g6bc2r8laqw")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-aiofiles") + (description "This package providis typing stubs for python-aiofiles.") + (license license:asl2.0))) + +(define-public python-types-colorama + (package + (name "python-types-colorama") + (version "0.4.15.20250801") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_colorama" version)) + (sha256 + (base32 "1xapqdq6450ngzp18nvvkwbs68nnxksk1wyk6wid2qw9sq9msmh2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for colorama") + (description "This package provides typing stubs for colorama.") + (license license:asl2.0))) + +(define-public python-types-dataclasses + (package + (name "python-types-dataclasses") + (version "0.6.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-dataclasses" version)) + (sha256 + (base32 "1fgp96m4kfxrwy6rdv3p24jzh6hf68702sfdfhcmm3aniv7jynjb")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for dataclasses") + (description + "This package provides a collection of library stubs for Python, with +static types.") + (license license:asl2.0))) + +(define-public python-types-dateutil + (package + (name "python-types-dateutil") + (version "2.9.0.20240316") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-python-dateutil" version)) + (sha256 + (base32 "00h2xi8p6ygdv9nhgwdyx86ky9m9dpdqgmsdji05x4461cj2wbsx")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ; no tests + (native-inputs + (list python-pytest python-setuptools python-wheel)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-dateutil") + (description + "This is a PEP 561 type stub package for the @code{python-dateutil} +package.") + (license license:asl2.0))) + +(define-public python-types-docutils + (package + (name "python-types-docutils") + (version "0.22.2.20251006") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_docutils" version)) + (sha256 + (base32 "1cp3p4bsaa646fa3kpjwjwsqbn6vz77pn57913lkknkf21ch8v63")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for docutils") + (description "This package provides a collection of library stubs for +Python, with static types.") + (license license:asl2.0))) + +(define-public python-types-freezegun + (package + (name "python-types-freezegun") + (version "1.1.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-freezegun" version)) + (sha256 + (base32 "08g926s8343zwq140zcfwly3qfgmahm7lp0vgb3ics549b2hifzl")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: No tests in PyPi source, but it's also unclear how to get the + ;; right files from source, so ignore them for now. + (list #:tests? #f)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for @code{freezegun}") + (description "This package contains typing stubs for for @code{freezegun}, a +very small subset the Python stubs contained in the complete @code{typeshed} +collection.") + (license license:asl2.0))) + +(define-public python-types-orjson + (package + (name "python-types-orjson") + (version "3.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-orjson" version)) + (sha256 + (base32 "0f66lf2qrl9d4vad42db3dmnzv89h4rr05r5zxx5qcl6kb3zr6ng")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for orjson") + (description "This is a PEP 561 type stub package for the @code{orjson} +package. It can be used by type-checking tools like mypy, PyCharm, pytype +etc. to check code that uses @code{orjson}.") + (license license:asl2.0))) + +(define-public python-types-protobuf + (package + (name "python-types-protobuf") + (version "3.20.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "types-protobuf" version)) + (sha256 + (base32 + "000f8n6d4ilihiaf590k73rx3327jh8ima5q5dpxlwz3frj45qrn")))) + (build-system pyproject-build-system) + (arguments + ;; XXX: No tests in PyPi source, but it's also unclear how to get the + ;; right files from source, so ignore them for now. + (list #:tests? #f)) + (native-inputs (list python-setuptools python-wheel)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for @code{protobuf}") + (description "This package contains typing stubs for @code{protobuf}, a +very small subset the Python stubs contained in the complete @code{typeshed} +collection.") + (license license:asl2.0))) + +(define-public python-types-python-dateutil + (package + (name "python-types-python-dateutil") + (version "2.9.0.20250708") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_python_dateutil" version)) + (sha256 + (base32 "1ay8sp8qshx2na2sa9sz9hg2hb7yrws9ymshqfb9cv1dmdfxgnyc")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-dateutil") + (description "This package providis typing stubs for python-dateutil.") + (license license:asl2.0))) + +(define-public python-types-pytz + (package + (name "python-types-pytz") + (version "2025.2.0.20250809") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_pytz" version)) + (sha256 + (base32 "1r91pvn1w9rb1395qw8w8k22s7w0wf2qfkl3z1qqiclvlbk34bi2")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests provided + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for pytz") + (description "This package contains typing stubs for @code{pytz}, a very +small subset the Python stubs contained in the complete @code{typeshed} +collection.") + (license license:asl2.0))) + +(define-public python-types-pyyaml + (package + (name "python-types-pyyaml") + (version "6.0.12.20250915") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_pyyaml" version)) + (sha256 + (base32 "1lyirqjacfmn6bv27b7w0z483yps6gfqfmhnyzkg00y352jm92qg")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs + (list python-setuptools)) + (home-page " https://github.com/python/typeshed") + (synopsis "Typing stubs for PyYAML") + (description "This package provides typing stubs for @code{PyYAML}.") + (license license:asl2.0))) + +(define-public python-types-regex + (package + (name "python-types-regex") + (version "2025.9.18.20250921") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_regex" version)) + (sha256 + (base32 "0gqc8b9d38pdm1l6nryi9rq9vmpis575hqnxlvj904n3n4hhqw71")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for regex") + (description "This package provides typing stubs for regex.") + (license license:asl2.0))) + +(define-public python-types-requests + (package + (name "python-types-requests") + (version "2.32.4.20250611") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_requests" version)) + (sha256 + (base32 "09pqdfa66d3p5dig26chrd6rpxs5wamxcm0yyl5q69b4xmvqf73l")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-urllib3)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for requests") + (description "This package provides typing stubs for requests.") + (license license:asl2.0))) + +(define-public python-types-setuptools + (package + (name "python-types-setuptools") + (version "80.9.0.20250529") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_setuptools" version)) + (sha256 + (base32 "149w6lg8n56k50n08jx450ni9frs2hzbv729sv48c8ds1jx8iq3r")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for setuptools") + (description "This package provides typing stubs for setuptools.") + (license license:asl2.0))) + +(define-public python-types-simplejson + (package + (name "python-types-simplejson") + (version "3.19.0.20241221") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_simplejson" version)) + (sha256 + (base32 "0w7wvr84d7bj27hc2bsyh69s9d84zpkdhsibbmsibba91zdzjjhi")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f)) ; no tests in PyPI archive, no release or tags on GitHub + (native-inputs + (list python-setuptools python-wheel)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for simplejson") + (description "Typing stubs for simplejson.") + (license license:asl2.0))) + +(define-public python-types-toml + (package + (name "python-types-toml") + (version "0.10.8.20240310") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-toml" version)) + (sha256 + (base32 "0c83hfw4aqy01vzlh6r84mz6b2b6n98chfdjp2k3c94p089m0h9x")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests provided + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for TOML") + (description + "This package contains typing stubs for TOML, a very small subset the +Python stubs contained in the complete @code{typeshed} collection.") + (license license:asl2.0))) + +(define-public python-types-tqdm + (package + (name "python-types-tqdm") + (version "4.67.0.20250809") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_tqdm" version)) + (sha256 + (base32 "006md2hnsq79p7d5z3kiaapvl9wwa4dz3yb39jf0n22n2awpmgq2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs (list python-setuptools)) + (propagated-inputs (list python-types-requests)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for python-tqdm") + (description "This package providis typing stubs for python-tqdm.") + (license license:asl2.0))) + +(define-public python-types-ujson + (package + (name "python-types-ujson") + (version "5.10.0.20250822") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types_ujson" version)) + (sha256 + (base32 "01m0gdcy6plrjxxih96ra86wd2zhn4skzw7k7hvk51gpw5c5ay8a")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;no tests provided + (native-inputs (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for ujson") + (description + "This is a PEP 561 type stub package for the ujson package. It can be +used by type-checking tools like mypy, PyCharm, pytype etc. to check code that +uses ujson.") + (license license:asl2.0))) + +(define-public python-types-urllib3 + (package + (name "python-types-urllib3") + (version "1.26.25.14") + (source + (origin + (method url-fetch) + (uri (pypi-uri "types-urllib3" version)) + (sha256 + (base32 "13ys7c7k9pg3lb11qvdgs9xq8j8bvcpjpg61j8dqq6wmgibpz6r2")))) + (build-system pyproject-build-system) + (arguments (list #:tests? #f)) ;no tests in PyPI archive + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/python/typeshed") + (synopsis "Typing stubs for urllib3") + (description "This package provides typing stubs for urllib3.") + (license license:asl2.0))) + +(define-public python-typeshed-client + (package + (name "python-typeshed-client") + (version "2.8.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/JelleZijlstra/typeshed_client") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0i74ygf49184ab1ipfdzf706wnzs3id15rkysqarzcngdydrcszs")))) + (build-system pyproject-build-system) + (arguments + (list #:test-backend #~'custom + #:test-flags #~(list "tests/test.py"))) + (native-inputs + (list python-setuptools)) + (propagated-inputs + (list python-importlib-resources + python-typing-extensions)) + (home-page "https://github.com/JelleZijlstra/typeshed_client") + (synopsis "Library for accessing stubs in typeshed") + (description + "This package provides a library for accessing stubs in typeshed.") + (license license:expat))) + +(define-public python-typing-inspect + (package + (name "python-typing-inspect") + (version "0.9.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "typing_inspect" version)) + (sha256 + (base32 "0y0z8v4wr5bahlgzjd1il2z8vlfd2asiyb45wia6kvznyqpw8gxj")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-setuptools + python-wheel)) + (propagated-inputs + (list python-mypy-extensions + python-typing-extensions)) + (home-page "https://github.com/ilevkivskyi/typing_inspect") + (synopsis "API for inspection of types in the Python @code{typing} module") + (description + "The @code{typing_inspect} module defines experimental API for runtime +inspection of types defined in the Python standard typing module.") + (license license:expat))) + +(define-public python-typogrify + (package + (name "python-typogrify") + (version "2.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "typogrify" version)) + (sha256 + (base32 "1vk17q04sax8rpdqll5zldnf6l3ixgknbnn9wimnwah3k1701aph")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list "--doctest-modules" + "typogrify/filters.py" + "typogrify/packages/titlecase/tests.py"))) + (native-inputs + (list python-pytest + python-hatchling)) + (propagated-inputs + (list python-smartypants)) + (home-page "https://github.com/justinmayer/typogrify") + (synopsis "Filters to transform text into typographically-improved HTML") + (description + "@code{typogrify} provides a set of custom filters that automatically +apply various transformations to plain text in order to yield +typographically-improved HTML. While often used in conjunction with Jinja and +Django template systems, the filters can be used in any environment.") + (license license:bsd-3))) + (define-public python-ua-parser (package (name "python-ua-parser") diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm index 3eb898dd4c..c14ead297e 100644 --- a/gnu/packages/re2c.scm +++ b/gnu/packages/re2c.scm @@ -43,15 +43,18 @@ "07ysqgdm0h566a8lwnpdgycp93vz7zskzihsgah3bla0ycj2pp69")))) (build-system gnu-build-system) (arguments - (if (target-arm32?) - (list #:phases + (list #:tests? (not (or (%current-target-system) + ;; run_tests.py hangs + (system-hurd?))) + #:phases + (if (target-arm32?) #~(modify-phases %standard-phases (add-after 'unpack 'patch-sources (lambda _ (invoke "patch" "-p1" "--force" "--input" #$(local-file (search-patch - "re2c-Use-maximum-alignment.patch"))))))) - '())) + "re2c-Use-maximum-alignment.patch")))))) + #~%standard-phases))) (native-inputs (list python)) ; for the test driver (home-page "https://re2c.org/") diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index 4ce52d0bda..3d6ca7895a 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -665,49 +665,6 @@ syntactic extensions. The resulting expression or program is then evaluated by an existing Scheme implementation.") (license license:expat)))) -(define-public sicp - (let ((commit "bda03f79d6e2e8899ac2b5ca6a3732210e290a79") - (revision "3")) - (package - (name "sicp") - (version (git-version "20180718" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/sarabander/sicp") - (commit commit))) - (sha256 - (base32 - "0mng7qrj2dvssyffr9ycnf4a5k0kadp4dslq7mc5bhzq1qxyjs2w")) - (file-name (git-file-name name version)))) - (build-system copy-build-system) - (native-inputs (list gzip texinfo)) - (arguments - (list #:install-plan ''(("html" "share/doc/sicp/") - ("sicp.info" "share/info/")) - #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'remove-obsolete-commands - (lambda _ - ;; Reported upstream: - ;; https://github.com/sarabander/sicp/issues/46. - (substitute* "sicp-pocket.texi" - (("@setshortcontentsaftertitlepage") - "")))) - (add-before 'install 'build - (lambda _ - (invoke "makeinfo" "--no-split" - "--output=sicp.info" - "sicp-pocket.texi")))))) - (home-page "https://sarabander.github.io/sicp") - (synopsis "Structure and Interpretation of Computer Programs") - (description "Structure and Interpretation of Computer Programs (SICP) is -a textbook aiming to teach the principles of computer programming. - -Using Scheme, a dialect of the Lisp programming language, the book explains -core computer science concepts such as abstraction in programming, -metalinguistic abstraction, recursion, interpreters, and modular programming.") - (license license:cc-by-sa4.0)))) - (define-public scheme48-rx (let* ((commit "dd9037f6f9ea01019390614f6b126b7dd293798d") (revision "2")) diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index 9af85cbb51..c586e689b9 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -71,6 +71,7 @@ #:use-module (gnu packages readline) #:use-module (gnu packages rsync) #:use-module (gnu packages ruby) + #:use-module (gnu packages security-token) #:use-module (gnu packages selinux) #:use-module (gnu packages shells) #:use-module (gnu packages sphinx) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 8021652dbc..485a55a928 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -853,7 +853,7 @@ eye-candy, customizable, and reasonably lightweight.") (define-public foot (package (name "foot") - (version "1.24.0") + (version "1.25.0") (home-page "https://codeberg.org/dnkl/foot") (source (origin @@ -863,7 +863,7 @@ eye-candy, customizable, and reasonably lightweight.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1fgwdx122s5x44lvg7l4v5mkfq6llzvx9kpqm0kiqa1bdykpdv5r")))) + (base32 "1vfqg52hf2yi0zrg01lcgq1q4vi99d0mgf6vmff1510nv4hv1d5k")))) (build-system meson-build-system) (arguments (list diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index df502e80f0..4d1da38270 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -426,7 +426,8 @@ based command language.") (build-system gnu-build-system) (arguments `(#:make-flags - (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "CXX=" ,(cxx-for-target))) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-source @@ -439,8 +440,14 @@ based command language.") (("if \\(m_shell.empty\\(\\)\\)" line) (string-append "m_shell = \"" (which "sh") "\";\n " line))))) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") "/bin/kak") + `("PATH" ":" prefix + (,(dirname (search-input-file inputs "bin/perl"))))))) (delete 'configure)))) ; no configure script (native-inputs (list pkg-config)) + (inputs (list perl)) (synopsis "Vim-inspired code editor") (description "Kakoune is a code editor heavily inspired by Vim, as such most of its diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 29b6101908..fbf8b10c64 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -59,7 +59,6 @@ #:use-module (gnu packages compression) #:use-module (gnu packages) #:use-module (gnu packages autotools) - #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) @@ -203,43 +202,6 @@ coordinating the use of PKCS#11 by different components or libraries living in the same process.") (license license:bsd-3))) -(define-public libp11 - (package - (name "libp11") - (version "0.4.16") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/OpenSC/libp11") - (commit (string-append "libp11-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0sjd3jxpyp61d85n4drmw9rf3bh7hwhrplr5nw6lmcpr2xr4gqds")))) - (build-system gnu-build-system) - (arguments - (list #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-enginesdir - (lambda _ - (substitute* "configure.ac" - (("libcrypto`") - (string-append "libcrypto | sed 's#.*/#" - #$output "/lib/#'`")))))))) - (native-inputs - (list autoconf automake libtool pkg-config sed)) - (inputs - (list openssl)) - (home-page "https://github.com/OpenSC/libp11") - (synopsis "PKCS#11 wrapper library") - (description - "@code{libp11} is a library implementing a thin layer on top of PKCS#11 -API to make PKCS#11 implementations easier.") - (license (list license:lgpl2.1+ - license:bsd-2 - license:openssl - (license:fsf-free "file:///src/pkcs11.h"))))) - (define-public gnutls (package (name "gnutls") diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm index 0261e92e8e..31128fa250 100644 --- a/gnu/packages/tryton.scm +++ b/gnu/packages/tryton.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> -;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com> +;;; Copyright © 2021,2024,2025 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2021 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2025 Ricardo Wurmus <rekado@elephly.net> ;;; @@ -38,6 +38,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) @@ -65,13 +66,13 @@ installed in the same environments. Collecting only paths actually containing (define-public trytond (package (name "trytond") - (version "7.4.4") + (version "7.0.37") (source (origin (method url-fetch) (uri (pypi-uri "trytond" version)) (sha256 - (base32 "1bwa631qz07k6s5fbki3ph6sx0ch9yss2q4sa1jb67z6angiwv5f")) + (base32 "1i51yd5kvmcny5k36pj0l3rblyig9zxv5pvvln9c2xq2nkndqqr6")) (patches (search-patches "trytond-add-guix_trytond_path.patch")))) (build-system pyproject-build-system) (arguments @@ -88,6 +89,7 @@ installed in the same environments. Collecting only paths actually containing (add-before 'check 'preparations (lambda _ (setenv "DB_NAME" ":memory:") + (setenv "DB_CACHE" "/tmp") (setenv "HOME" "/tmp")))))) (propagated-inputs (list python-dateutil @@ -96,18 +98,18 @@ installed in the same environments. Collecting only paths actually containing python-lxml python-passlib python-polib + python-psycopg2 python-relatorio python-sql python-werkzeug)) (native-inputs - (list python-pillow - python-pydot - python-pytest - python-setuptools - python-wheel - tzdata-for-tests)) + (list python-html2text python-pillow python-pydot python-pytest + python-setuptools tzdata-for-tests)) (native-search-paths - (list (guix-trytonpath-search-path (package-version python)))) + (list (guix-trytonpath-search-path (package-version python)) + ;; Required to pick up entry-points from profile for Tryton modules + ;; which are not in named 'trytond.modules.…' + (guix-pythonpath-search-path (package-version python)))) (home-page "https://www.tryton.org/") (synopsis "Tryton Server") (description "Tryton is a three-tier high-level general purpose @@ -119,16 +121,17 @@ and security.") (define-public tryton (package (name "tryton") - (version "7.4.4") + (version "7.0.27") (source (origin (method url-fetch) (uri (pypi-uri "tryton" version)) (sha256 - (base32 "0q0qa4pjbpc0h8r9hlnm5dh315w5i7mzqpdrlw1c8qvigpl1rf7g")))) + (base32 "0hqni5nhy29a0zs1r6w734dw2skpbnq7yn6s1f7ziq6rpxd57adl")))) (build-system pyproject-build-system) (arguments (list + #:test-backend #~'unittest #:test-flags #~(list "discover") #:phases #~(modify-phases %standard-phases (add-before 'check 'change-home @@ -144,8 +147,7 @@ and security.") (list `(,glib "bin") gobject-introspection python-pytest - python-setuptools - python-wheel)) + python-setuptools)) (inputs (list bash-minimal)) ;for wrap-program (propagated-inputs (list (librsvg-for-system) @@ -155,7 +157,7 @@ and security.") python-pycairo python-pygobject)) (home-page "https://www.tryton.org/") - (synopsis "Tryton Client") + (synopsis "Desktop client for Tryton") (description "This package provides the Tryton GTK client.") (license license:gpl3+))) @@ -163,78 +165,107 @@ and security.") (define-public python-proteus (package (name "python-proteus") - (version "7.4.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "proteus" version)) (sha256 - (base32 "1q3d0hkvmfsmxbx2qqp8zpslyy11mzwh0q2dkrh958yfyrzi1550")))) + (base32 "1mh82lqc3dbg1kq21lwbk4wa2ghjkrmkz1xx1mzkk50cyhdd800w")))) (build-system pyproject-build-system) ;; Tests require python-trytond-party which requires python-proteus. (arguments `(#:tests? #f)) (propagated-inputs (list python-dateutil python-defusedxml)) - (native-inputs (list python-setuptools python-wheel)) + (native-inputs (list python-setuptools)) (home-page "http://www.tryton.org/") (synopsis "Library to access a Tryton server as a client") (description "This package provides a library to access Tryton server as a client.") (license license:lgpl3+))) -(define (tryton-phases module . extra-arguments) +;; Suppress common useless warnings to avoid cluttering output +(define %pytest.ini " +[pytest] +filterwarnings = + ignore:.*SQLite backend.*:UserWarning + ignore:Can not create index with parameters:UserWarning + ignore::DeprecationWarning +") + +(define (tryton-phases module . extra-test-arguments) "Return the phases for building and testing a Tryton module named MODULE. -If present, pass EXTRA-ARGUMENTS to runtest as well." - `(modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (let ((runtest - (string-append - (assoc-ref inputs "trytond") - "/lib/python" - ,(version-major+minor (package-version python)) - "/site-packages/trytond/tests/run-tests.py"))) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "python" runtest "-m" ,module ,@extra-arguments))))))) +If present, pass EXTRA-TEST-ARGUMENTS to pytest as well." + #~(modify-phases %standard-phases + (add-before 'check 'prepare-check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "DB_NAME" ":memory:") + (setenv "DB_CACHE" "/tmp") + (setenv "HOME" "/tmp") + ;; Fake this directory as a tryton.module.… sub-module. + (mkdir-p "/tmp/dummy/trytond/modules") + (symlink (getcwd) (string-append "/tmp/dummy/trytond/modules/" #$module)) + (setenv "GUIX_TRYTOND_MODULES_PATH" + (string-append (getenv "GUIX_TRYTOND_MODULES_PATH") + ":/tmp/dummy/trytond/modules")) + ;; Create pytest.ini in sub-dir to make that dir pytest's + ;; "rootdir" and avoid that the module's files get scanned (which + ;; will fail since here they are not part of a package). + (with-output-to-file "tests/pytest.ini" + (lambda () + (format #t #$%pytest.ini)))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Use pytest to allow excluding failing tests via command line + ;; args (resp. arguments to '(tryton-arguments)') + (invoke "pytest" "--tb=short" "-v" + "--config-file=tests/pytest.ini" + "tests" + #$@extra-test-arguments)))))) (define (tryton-arguments module . extra-arguments) "Like ’tryton-phases’, but directly return all arguments for the build system." - `(#:phases ,(apply tryton-phases module extra-arguments))) + (list #:phases (apply tryton-phases module extra-arguments))) ;;; ;;; Tryton modules - please sort alphabetically ;;; -(define (%standard-trytond-native-inputs) - ;; native-inputs required by most of the tryton module for running the test - `(("python-dateutil" ,python-dateutil) - ("python-genshi" ,python-genshi) - ("python-lxml" ,python-lxml) - ("python-magic" ,python-magic) - ("python-passlib" ,python-passlib) - ("python-polib" ,python-polib) - ("python-proteus" ,python-proteus) - ("python-relatorio" ,python-relatorio) - ("python-sql" ,python-sql) - ("python-werkzeug" ,python-werkzeug-1.0) - ("python-wrapt" ,python-wrapt))) +(define %standard-trytond-native-inputs + ;; native-inputs required for building and by most of the trytond modules + ;; for running the test + (list python-dateutil + python-genshi + python-lxml + python-magic + python-passlib + python-polib + python-proteus + python-pytest ; see tryton-phases above + python-setuptools ; for pyproject-build-system + python-relatorio + python-sql + python-werkzeug + python-wrapt + tzdata-for-tests)) (define-public trytond-account (package (name "trytond-account") - (version "6.2.7") + (version "7.0.22") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account" version)) (sha256 - (base32 "1jjffyfkax36v6znhdyvlrr314h3d5rn13iwv3kvhsm6paddbmwi")))) - (build-system python-build-system) + (base32 "10m6743h2qjdfrbzvcm11bg7b3rk4570vfg5ng0zi69yv8hd8zak")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-simpleeval trytond trytond-company trytond-currency trytond-party)) @@ -245,24 +276,21 @@ the build system." most of accounting needs.") (license license:gpl3+))) -(define-public python-trytond-account - (deprecated-package "python-trytond-account" trytond-account)) - (define-public trytond-account-asset (package (name "trytond-account-asset") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_asset" version)) (sha256 - (base32 "0zs0bqa3crfqc39z7c5hcj60w2aws2fv2l9y59v9sfy8azi32533")))) - (build-system python-build-system) + (base32 "0v11scsbzgfx9k89dqb3fil9ynccvqxm0ph1jhyhls3i09d1vpga")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_asset")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase" ,trytond-purchase))) + (cons* trytond-purchase + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-account-product trytond-product)) @@ -275,16 +303,16 @@ of fixed assets.") (define-public trytond-account-be (package (name "trytond-account-be") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_be" version)) (sha256 - (base32 "0ff27b9g1nf1gqlbv71kq7nm25r85vqpn8b0piajcxln1pbwgnmw")))) - (build-system python-build-system) + (base32 "1lx2dgvp84ib18z47fk7chxr04jlqm3jyk5pkb32q0air5d95j2f")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_be")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-eu)) (home-page "https://docs.tryton.org/projects/modules-account-be") @@ -296,15 +324,15 @@ chart of account for Belgium.") (define-public trytond-account-budget (package (name "trytond-account-budget") - (version "6.2.2") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_budget" version)) (sha256 - (base32 "055y9jjpx4xfrc6dlssvjzmjz7rrvfljlaljx0v6c6s87mpzi3m5")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_account_budget")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0ycxy7p54gssw4mzb62gmlkhkyfa9s8bqaps30zyw0jd79pll2xy")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_budget")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-company trytond-currency)) (home-page "https://docs.tryton.org/projects/modules-account-budget") @@ -315,23 +343,26 @@ then be used to track the total amount from relevant transactions against the budgeted amount.") (license license:gpl3+))) +(define (standard-trytond-native-inputs 1stmodule . more-modules) + (apply list 1stmodule more-modules %standard-trytond-native-inputs)) + (define-public trytond-account-cash-rounding (package (name "trytond-account-cash-rounding") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_cash_rounding" version)) (sha256 - (base32 "0lxwz3f1p8szphvl64w8fhjnnvn30fin5k1rh47ikvcmlpq8xb67")))) - (build-system python-build-system) + (base32 "1ap0ndymlkazk3q0crn6ll27w8zmq8ykm9j4qvz5i051kf05k250")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_cash_rounding")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice" ,trytond-account-invoice) - ("trytond-purchase" ,trytond-purchase) - ("trytond-sale" ,trytond-sale))) + (cons* trytond-account-invoice + trytond-purchase + trytond-sale + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-currency)) (home-page @@ -341,23 +372,51 @@ budgeted amount.") amounts to be rounded using the cash rounding factor of the currency.") (license license:gpl3+))) +(define-public trytond-account-consolidation + (package + (name "trytond-account-consolidation") + (version "7.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_consolidation" version)) + (sha256 + (base32 "07qjw6h2cap1lg712w2yznnbp3swk1m9rspb48c13yyhm5xaf4ii")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_consolidation")) + (native-inputs + (cons* trytond-account-invoice + %standard-trytond-native-inputs)) + (propagated-inputs + (list + trytond + trytond-account + trytond-company + trytond-currency)) + (home-page "https://docs.tryton.org/projects/modules-account-consolidation") + (synopsis "Tryton module to consolidate accounting of many companies") + (description "The @emph{Account Consolidation} Tryton module allows +consolidate accounting report of multiple companies.") + (license license:gpl3+))) + (define-public trytond-account-credit-limit (package (name "trytond-account-credit-limit") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_credit_limit" version)) (sha256 - (base32 "1j3krz4qm04366d1k4sdf089vwbjl29lw8wbpd002hr2lb2lppm3")))) - (build-system python-build-system) + (base32 "12p2ryn9lywnxm6839wv9s9jgx8k6cnjaffdxyv2m0vkj2hpvm7r")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_credit_limit")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-dunning" ,trytond-account-dunning))) + (cons* trytond-account-dunning + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account trytond-company trytond-party)) + (list trytond trytond-account trytond-company trytond-currency + trytond-party)) (home-page "https://docs.tryton.org/projects/modules-account-credit-limit") (synopsis "Tryton module for account credit limit") (description "The @emph{Account Credit Limit} Tryton module for manages @@ -367,16 +426,16 @@ credit limit of parties.") (define-public trytond-account-de-skr03 (package (name "trytond-account-de-skr03") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_de_skr03" version)) (sha256 - (base32 "1igag4nbafr5il6fqw7piak0wma6mgxhzy59zpsnl8gcl96jijv1")))) - (build-system python-build-system) + (base32 "0id7qvjahgnv3nn0q5sb451zfa61qd04cgpf24y9jcbscb42bs5z")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_de_skr03")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account)) (home-page "https://docs.tryton.org/projects/modules-account-de-skr03") @@ -388,16 +447,18 @@ Tryton.") (define-public trytond-account-deposit (package (name "trytond-account-deposit") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_deposit" version)) (sha256 - (base32 "0axp72p00fk1r6mr9pip8g4276wvb55vfbp962f3gdsijslj9mqi")))) - (build-system python-build-system) + (base32 "055v9b30q1drrkzq6xdcd5v20ysa7mqqsvzibrrbjjapx9hi6vp2")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_deposit")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-account-payment-clearing + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-company trytond-party)) @@ -414,16 +475,16 @@ the party.") (define-public trytond-account-dunning (package (name "trytond-account-dunning") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_dunning" version)) (sha256 - (base32 "0kzafh99055ghg5d8vs411y5c8v1xjqqf23n1sa9a4dzj10wlq97")))) - (build-system python-build-system) + (base32 "0vxz71gwp2s5cm6y8c770aaw4mwgbdf8brl75p404lp6mwh3fqay")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_dunning")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-company trytond-party)) (home-page "https://docs.tryton.org/projects/modules-account-dunning") @@ -435,16 +496,16 @@ receivable move lines.") (define-public trytond-account-dunning-email (package (name "trytond-account-dunning-email") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_dunning_email" version)) (sha256 - (base32 "01d0cwgvl40i7zq9s3yrmf504j8s6395vs8mm1hgg0s9dpi7pl46")))) - (build-system python-build-system) + (base32 "0ry043b8fa0sphamm7xaybf836c5q75w18158zgzg9wm2xbbqjsg")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_dunning_email")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-dunning trytond-account-dunning-letter trytond-party)) @@ -458,18 +519,18 @@ emails.") (define-public trytond-account-dunning-fee (package (name "trytond-account-dunning-fee") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_dunning_fee" version)) (sha256 - (base32 "0v88xkigxqr1py2l25z3qfrr1irpllsi7zzwg3sxmp12d8pi8szk")))) - (build-system python-build-system) + (base32 "00rvw1720rz9x2kl6kss0w85w3ch8lygp4nfljw5hqw1fyxwsq2z")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_dunning_fee")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-dunning-letter" ,trytond-account-dunning-letter))) + (cons* trytond-account-dunning-letter + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-dunning trytond-account-product)) (home-page "https://docs.tryton.org/projects/modules-account-dunning-fee") @@ -481,16 +542,16 @@ accounting moves as fees when processing dunning.") (define-public trytond-account-dunning-letter (package (name "trytond-account-dunning-letter") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_dunning_letter" version)) (sha256 - (base32 "1jx1ad7kwlk7cm5j2b15bf4lcy5d2c13j8ag48v0pfy3kiglr2z3")))) - (build-system python-build-system) + (base32 "0ad0jyxmqiyfc5kgxrfzipllxmcn8kzgxmnjjil7w2pv3fw5jcr8")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_dunning_letter")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-dunning trytond-company trytond-party)) @@ -504,23 +565,30 @@ letters.") (define-public trytond-account-es (package (name "trytond-account-es") - (version "6.2.0") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_es" version)) (sha256 - (base32 "0wwfkqxlppaild62labldabcnzgdmiqd36sknqdb69jn4ljhw4im")))) - (build-system python-build-system) + (base32 "009wx8ihx8i976hpfpqjlp0gbvfzpdgmpdigwla19416yqjkpvka")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_es")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-asset" ,trytond-account-asset) - ("trytond-account-payment-sepa" ,trytond-account-payment-sepa) - ("trytond-sale-advance-payment" ,trytond-sale-advance-payment))) + (cons* trytond-account-asset + trytond-account-payment-sepa + trytond-sale-advance-payment + trytond-sale-gift-card + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account trytond-account-eu trytond-account-invoice - trytond-company trytond-currency trytond-party)) + (list python-phonenumbers + trytond + trytond-account + trytond-account-eu + trytond-account-invoice + trytond-company + trytond-currency + trytond-party)) (home-page "https://docs.tryton.org/projects/modules-account-es") (synopsis "Tryton with Spanish chart of accounts") (description "This package provides the following Spanish charts of @@ -539,19 +607,46 @@ A wizard allows generating the following AEAT files: @end itemize") (license license:gpl3+))) +(define-public trytond-account-es-sii + (package + (name "trytond-account-es-sii") + (version "7.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_es_sii" version)) + (sha256 + (base32 "1dl8wfzcqyp8zdbxzj264hmgmdy85i74fnmx88vqrrchzmk2g9a4")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_es_sii")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list python-requests + python-zeep + trytond + trytond-account + trytond-account-es + trytond-account-invoice)) + (home-page "https://docs.tryton.org/projects/modules-account-es-sii") + (synopsis "Tryton module that sends invoices to the Spanish SII webservice") + (description "The @emph{Account Spanish SII} Tryton module allows sending +invoices to the SII portal. This is legal requirement for some Spanish +companies.") + (license license:gpl3+))) + (define-public trytond-account-eu (package (name "trytond-account-eu") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_eu" version)) (sha256 - (base32 "1k11ncamp4cd5bdpj4va9p0vga2vcgfwd7wbivf1w4m1bzpisvm8")))) - (build-system python-build-system) + (base32 "115pvxvb4wnlsnbz8qk9z7a9kgvgzjfkxdyvlyffpllq5fwj5dym")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_eu")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -572,16 +667,24 @@ accounting requirements in Europe. It includes: (define-public trytond-account-fr (package (name "trytond-account-fr") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_fr" version)) (sha256 - (base32 "18wmijaxah125skhgpqc7iaw6a8md5mpv7m5yazcrscx9pk1z5jz")))) - (build-system python-build-system) - (arguments (tryton-arguments "account_fr")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0cigsrh2d2bj9h87lxmi8hancghwhxs3mam581knygi8r4n1c7aj")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases #$(tryton-phases "account_fr") + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; doctests uses '__file__' which is unset in pytest + (invoke "python" "-m" "unittest" "discover"))))))) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-party-siret)) (home-page "https://docs.tryton.org/projects/modules-account-fr") @@ -593,20 +696,23 @@ for Tryton.") (define-public trytond-account-fr-chorus (package (name "trytond-account-fr-chorus") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_fr_chorus" version)) (sha256 - (base32 "14rcfk825m7wi73a4ahps5wqrz2aws3a7spz402mmbfxz84ypvbg")))) - (build-system python-build-system) - (arguments (tryton-arguments "account_fr_chorus")) + (base32 "1cim1zy34inp9162lcblldwfksxhqvcmcndgvj9l75dsrv53zg9h")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "account_fr_chorus" "-k not scenario")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-edocument-uncefact" ,trytond-edocument-uncefact))) + (cons* trytond-account-fr + trytond-edocument-uncefact + %standard-trytond-native-inputs)) (propagated-inputs - (list python-requests + (list python-oauthlib + python-requests-oauthlib trytond trytond-account trytond-account-invoice @@ -627,16 +733,16 @@ using the credential from the accounting configuration.") (define-public trytond-account-invoice (package (name "trytond-account-invoice") - (version "6.2.4") + (version "7.0.14") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice" version)) (sha256 - (base32 "12hkrlni1psa5n72bvz94zqwfmzpy24814p0f2vk1cmzkbsfb6vi")))) - (build-system python-build-system) + (base32 "0s2slws07s3gfarjnc8ps65w9zgpmrr0xj51vlb9rykswynf7515")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -652,22 +758,19 @@ using the credential from the accounting configuration.") term.") (license license:gpl3+))) -(define-public python-trytond-account-invoice - (deprecated-package "python-trytond-account-invoice" trytond-account-invoice)) - (define-public trytond-account-invoice-correction (package (name "trytond-account-invoice-correction") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_correction" version)) (sha256 - (base32 "1m95h7bnwzjbhrnbld5bka4hqygm0d8jcg1g2nmdyqakcniljv34")))) - (build-system python-build-system) + (base32 "154nyf29lm74wlsad5byh9c96nszscsb31jc4hxi8j91n93f2l6j")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_correction")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice)) (home-page @@ -682,16 +785,16 @@ original quantity, once with the inverted quantity.") (define-public trytond-account-invoice-defer (package (name "trytond-account-invoice-defer") - (version "6.2.2") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_defer" version)) (sha256 - (base32 "1jjsadia1bxx0h80aqhm0alzxdqbkg3by0i7i6qfk7wwikim6lkm")))) - (build-system python-build-system) + (base32 "1q281cl0dhmm5d1cc4sjpx6wk97vrva35sldxwydrpw460df9lh9")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_defer")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-company)) @@ -705,16 +808,16 @@ deferring the expense or the revenue of an invoice line over many periods.") (define-public trytond-account-invoice-history (package (name "trytond-account-invoice-history") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_history" version)) (sha256 - (base32 "1qg8x6kggi2f390y35m7k3mfi358zr4jwiw76vw5kkrpa3gm4lyj")))) - (build-system python-build-system) + (base32 "07ggrwqq6dz7c49bc20ly7nxznw3sm9q5cmskjycmfx6h72j5l8y")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_history")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-party)) (home-page @@ -727,16 +830,16 @@ the historization of the invoice and its related fields.") (define-public trytond-account-invoice-line-standalone (package (name "trytond-account-invoice-line-standalone") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_line_standalone" version)) (sha256 - (base32 "15ld3iixh8kgil5zw3q4acci4xvdcd56lyin154qaak12f7rms0z")))) - (build-system python-build-system) + (base32 "1gihaiabl9pk9k8b9hmd0b2ih7i6dmyi2p3s1ycl395y8rc3d58d")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_line_standalone")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice)) (home-page @@ -749,16 +852,16 @@ allows creating an invoice line not linked to an invoice.") (define-public trytond-account-invoice-secondary-unit (package (name "trytond-account-invoice-secondary-unit") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_secondary_unit" version)) (sha256 - (base32 "1wmc8zx51saqxbg26b7jnhl7ss3gjrhzxn7zqqsis9dps6l07jwf")))) - (build-system python-build-system) + (base32 "1qqr70xw5ybn1xywgdznqc2lqsvs592qiam0rr75zyjzv3g3bfxc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_secondary_unit")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-product)) (home-page @@ -771,16 +874,16 @@ a secondary unit of measure on invoice line.") (define-public trytond-account-invoice-stock (package (name "trytond-account-invoice-stock") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_invoice_stock" version)) (sha256 - (base32 "0q12v6xdpsw4fjm9pqp73bffdixi2hm9j2vxxx6n2p9r0c3g1gj1")))) - (build-system python-build-system) + (base32 "10nysdhm770m4s4nqn8zp8f5ajpi5aqhd3vp4lsfib940lgwrzbx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_invoice_stock")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-product trytond-stock)) (home-page "https://www.tryton.org/") @@ -791,23 +894,45 @@ lines and stock moves. The unit price of the stock move is updated with the average price of the posted invoice lines that are linked to it.") (license license:gpl3+))) -(define-public python-trytond-account-invoice-stock - (deprecated-package - "python-trytond-account-invoice-stock" trytond-account-invoice-stock)) + +(define-public trytond-account-invoice-watermark + (package + (name "trytond-account-invoice-watermark") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_invoice_watermark" version)) + (sha256 + (base32 "00b0s9mzdxafw6hfl4xg3wvb6w3k8zw98knirig4ksy04xr4w4zp")))) + (build-system pyproject-build-system) + ;; doctest would required libreoffice + (arguments (tryton-arguments "account_invoice_watermark" + "-k not scenario_account_invoice_watermark.rst")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list python-pypdf + trytond + trytond-account-invoice)) + (home-page "https://docs.tryton.org/projects/modules-account-invoice-watermark") + (synopsis "Tryton module to add a watermark to invoices") + (description "The @emph{Account Invoice Watermark} Tryton module adds a +\"draft\" or \"paid\" watermark to the printed invoice.") + (license license:gpl3+))) (define-public trytond-account-move-line-grouping (package (name "trytond-account-move-line-grouping") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_move_line_grouping" version)) (sha256 - (base32 "1mrh17a55hkfj89vyx1jrmgzps4ig0m03c10ngsy4my6v6rnnn2r")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_account_move_line_grouping")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-sql trytond trytond-account)) + (base32 "167z9djgraijy7py64ic9a4y5dp2f57j5j349lpz857qr75zxrv3")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_move_line_grouping")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs (list trytond trytond-account)) (home-page "https://docs.tryton.org/projects/modules-account-move-line-grouping") (synopsis "Tryton module to display account move lines grouped") (description "The @emph{Account Move Line Grouping} Tryton module adds a @@ -817,18 +942,29 @@ view that displays move lines grouped.") (define-public trytond-account-payment (package (name "trytond-account-payment") - (version "6.2.2") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment" version)) (sha256 - (base32 "0gsg53fiqdmrdpckpfh5sm56ycqjdpa26calmng4p0v2rz557l1f")))) - (build-system python-build-system) - (arguments (tryton-arguments "account_payment")) + (base32 "06hm5lwp3y9azzjwwrk52r28qw5hv440wn42iv5xg50jm4dzag8d")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases #$(tryton-phases "account_payment") + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; DB_CACHE and pytest don't work together here + (invoke "python" "-m" "unittest" "discover"))))))) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice" ,trytond-account-invoice))) + (cons* trytond-account-dunning + trytond-account-invoice + trytond-account-statement + trytond-account-statement-rule + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-company trytond-currency trytond-party)) @@ -841,16 +977,18 @@ payments for receivable or payable Account Move Lines.") (define-public trytond-account-payment-braintree (package (name "trytond-account-payment-braintree") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment_braintree" version)) (sha256 - (base32 "0s8li1ynb89nx5isxmg0rbbk6aw85i0218391z9nzgkj8kxgww9j")))) - (build-system python-build-system) - (arguments (tryton-arguments "account_payment_braintree")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0kix59xjfdq9wa6f1aknf9rf1a8zdf5a8x1r765349w5xlla66mk")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "account_payment_braintree" + "-k not scenario")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-braintree trytond trytond-account trytond-account-payment trytond-party)) @@ -866,21 +1004,22 @@ methods.") (define-public trytond-account-payment-clearing (package (name "trytond-account-payment-clearing") - (version "6.2.1") + (version "7.0.5") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment_clearing" version)) (sha256 - (base32 "037d759nzfs5qh97a5hq24argrga9i3p0b966xckss38cwyq7ixq")))) - (build-system python-build-system) + (base32 "15q0jmkckxq4nhvkyhh88jm7gmcw54p6zgragw0d502c7l8bargx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_payment_clearing")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-statement" ,trytond-account-statement) - ("trytond-account-statement-rule" ,trytond-account-statement-rule))) + (cons* trytond-account-invoice + trytond-account-statement + trytond-account-statement-rule + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account-payment)) + (list trytond trytond-account trytond-account-payment trytond-company)) (home-page "https://docs.tryton.org/projects/modules-account-payment-clearing") (synopsis "Tryton module for payment clearing") @@ -893,16 +1032,16 @@ journal.") (define-public trytond-account-payment-sepa (package (name "trytond-account-payment-sepa") - (version "6.2.2") + (version "7.0.5") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment_sepa" version)) (sha256 - (base32 "0c3ij24l8mxad2ppd3r24mx92l2xm52ip2syf88wlxqhsja9p945")))) - (build-system python-build-system) + (base32 "0lqpwcaky6dsgghskmsz5d2qqdwx1j8z2vz6wi27rmsgz840ssvg")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_payment_sepa")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-stdnum trytond @@ -919,16 +1058,16 @@ generating SEPA files for a Payment Group.") (define-public trytond-account-payment-sepa-cfonb (package (name "trytond-account-payment-sepa-cfonb") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment_sepa_cfonb" version)) (sha256 - (base32 "1a4g2jzk8f98iy3plzanz8wfw5jixqpbsljqfigcp05nykbcfwzf")))) - (build-system python-build-system) + (base32 "0ic3j1rzb8fsxxrcxzpnahjzrz7w7zsbmwjhcaivryvbgyzdzq89")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_payment_sepa_cfonb")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-payment @@ -946,16 +1085,17 @@ CFONB flavors to SEPA messages.") (define-public trytond-account-payment-stripe (package (name "trytond-account-payment-stripe") - (version "6.2.0") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_payment_stripe" version)) (sha256 - (base32 "11lmgw4ny5v7zimvx35kkmy9n2pa342j97abn25y10yrcacfjhvh")))) - (build-system python-build-system) - (arguments (tryton-arguments "account_payment_stripe")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0yh6ixplv0jpmzkm7wfspjv9i7d0a9wxrx6rzhm9md5364nsbcys")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "account_payment_stripe" "-k not scenario")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-stripe trytond trytond-account trytond-account-payment trytond-party)) @@ -970,19 +1110,20 @@ checkout form to handle Setup Intent and Payment Intent by card.") (define-public trytond-account-product (package (name "trytond-account-product") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_product" version)) (sha256 - (base32 "1z1ri2plsmdnhgw64r5yxk2m346zcnva8nddmcwcalis35krgjcx")))) - (build-system python-build-system) + (base32 "17hgqn52li1sdwl9ppa6h2fx1x3hvnbaqb2lvpi0r97zz92wc75x")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_product")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-analytic-account + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account trytond-analytic-account - trytond-company trytond-product)) + (list trytond trytond-account trytond-company trytond-product)) (home-page "https://www.tryton.org/") (synopsis "Tryton module to add accounting on product") (description @@ -990,23 +1131,60 @@ checkout form to handle Setup Intent and Payment Intent by card.") and category.") (license license:gpl3+))) -(define-public python-trytond-account-product - (deprecated-package "python-trytond-account-product" trytond-account-product)) +(define-public trytond-account-receivable-rule + (package + (name "trytond-account-receivable-rule") + (version "7.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_receivable_rule" version)) + (sha256 + (base32 "1a7awr71gwndp367vjam45482555hb2fv8j3z9v2x0q5lvjv3v40")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_receivable_rule")) + (native-inputs + (cons* trytond-account-statement + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-account + trytond-company + trytond-party)) + (home-page "https://docs.tryton.org/projects/modules-account-receivable-rule") + (synopsis "Tryton module to enforce receivable rules") + (description "The @emph{Account Receivable Rule} Tryton module allows +defining rules to reconcile receivables between accounts.") + (license license:gpl3+))) (define-public trytond-account-rule (package (name "trytond-account-rule") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_rule" version)) (sha256 - (base32 "1rn0xdqk5pcjybpyw09fqag6lyha06dq9qb3v0jc31cvwmd17ckl")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_account_rule")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list trytond trytond-account - trytond-company trytond-party)) + (base32 "0p9blifdzx97arzs8djpqqgg3lpyk8saxjd4q4xxzjghk22gf04c")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_rule")) + (native-inputs + (cons* trytond-account-invoice-stock + trytond-account-stock-anglo-saxon + trytond-account-stock-continental + trytond-product + trytond-purchase + trytond-purchase-shipment-cost + trytond-sale + trytond-sale-gift-card + trytond-stock + trytond-stock-consignment + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-account + trytond-company + trytond-party)) (home-page "https://docs.tryton.org/projects/modules-account-rule") (synopsis "Tryton module to change accounts based on rules") (description "The @emph{Account Rule} Tryton module allows rules which @@ -1016,16 +1194,16 @@ substitute default accounts with other accounts.") (define-public trytond-account-statement (package (name "trytond-account-statement") - (version "6.2.3") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_statement" version)) (sha256 - (base32 "1c7k1xv5jcraaa9dqdzxphqffycbc1ygy0gc49909vql1r8dpzk5")))) - (build-system python-build-system) + (base32 "15cak3blrm2czpcpp0pb2ppmjnsw3jblcjwzi5vygxfgk910cgax")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_statement")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -1043,21 +1221,20 @@ statements. Statement can be used for bank statement, cash daybook etc.") (define-public trytond-account-statement-aeb43 (package (name "trytond-account-statement-aeb43") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_statement_aeb43" version)) (sha256 - (base32 "1snjabg4qixsb99lsrirpx7zrz0f21wy46d61rar5704657yxyc9")))) - (build-system python-build-system) + (base32 "0vgcbh7gfgcdqc7fcc90hsib0d5sbianw53vxb61bax8dgzj4cyr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_statement_aeb43")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list python-csb43 python-stdnum trytond trytond-account-statement - trytond-bank)) + (list python-csb43 trytond trytond-account-statement trytond-bank)) (home-page - "https://docs.tryton.org/projects/trytond-account-statement-aeb43") + "https://docs.tryton.org/projects/modules-account-statement-aeb43") (synopsis "Tryton module to import AEB43 statements") (description "The @emph{Account Statement AEB43} Tryton module implements the import of @emph{Norm 43} files as statement. @emph{Norm 43} is a standard @@ -1067,16 +1244,16 @@ defined by the Spanish banking association.") (define-public trytond-account-statement-coda (package (name "trytond-account-statement-coda") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_statement_coda" version)) (sha256 - (base32 "0flz8rkavfcwq3przw9sq8jnpf6hdmyi3ip7vc89s3ykdx4qcrh0")))) - (build-system python-build-system) + (base32 "1w38h95v9ix4p7qmvwbfn6mi36r2x6rskj6mci8wdhkl55szyf80")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_statement_coda")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-febelfin-coda trytond trytond-account-statement trytond-bank)) @@ -1088,19 +1265,43 @@ the import of @emph{CODA} files as statement. @emph{CODA} is a standard defined by Belgian \"febelfin\".") (license license:gpl3+))) +(define-public trytond-account-statement-mt940 + (package + (name "trytond-account-statement-mt940") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_statement_mt940" version)) + (sha256 + (base32 "1lkcv0h2qm2vgnjf8lyvwqcj48xgrkmsna57k5rc9hzj5pr5fnqp")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_statement_mt940")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list python-mt940 + trytond + trytond-account-statement + trytond-bank)) + (home-page "https://docs.tryton.org/projects/modules-account-statement-mt940") + (synopsis "Tryton module to import MT940 statements") + (description "The @emph{Account Statement MT940} Tryton module implements +the import of MT940 files as statements.") + (license license:gpl3+))) + (define-public trytond-account-statement-ofx (package (name "trytond-account-statement-ofx") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_statement_ofx" version)) (sha256 - (base32 "01ncqvz4nx277q7x50sqwwvcy3hcpgp7bwhbp2l5aa2habprki8x")))) - (build-system python-build-system) + (base32 "00dg1dq71qllhnq9ngjb4br3y6qa34hi3gjx93ibwkfy0rj84hni")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_statement_ofx")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-ofxparse trytond trytond-account-statement trytond-bank trytond-party)) @@ -1114,16 +1315,18 @@ the import of the @emph{OFX} files as statement.") (define-public trytond-account-statement-rule (package (name "trytond-account-statement-rule") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_statement_rule" version)) (sha256 - (base32 "1fbn4z111k0wwsy9jr9np82yyc7xiniavyavwhf0qf3l6l8qwk6x")))) - (build-system python-build-system) + (base32 "0iy12040cc2s5r3mmvagl20yjzjz5blih67fqqf7wvf8mw2gfgww")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_statement_rule")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-bank + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account @@ -1143,24 +1346,46 @@ found that matches. Then the rule found is used to create the statement lines linked to the origin.") (license license:gpl3+))) +(define-public trytond-account-statement-sepa + (package + (name "trytond-account-statement-sepa") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_statement_sepa" version)) + (sha256 + (base32 "1gzkljcd5gbwk2vqmzz2zzh5sy7qjbmqviilaribv9n9n6n310dv")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_statement_sepa")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account-statement + trytond-bank)) + (home-page "https://docs.tryton.org/projects/modules-account-statement-sepa") + (synopsis "Tryton module to import SEPA statements") + (description "The @emph{Account Statement SEPA} Tryton module implements +the import of the CAMT.052, CAMT.053 and CAMT.054 SEPA files as statement.") + (license license:gpl3+))) + (define-public trytond-account-stock-anglo-saxon (package (name "trytond-account-stock-anglo-saxon") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_stock_anglo_saxon" version)) (sha256 - (base32 "1jgj5kb85qj3kb1hcyb9jps1x062cqa32x5rp4rvgg64824d8hwz")))) - (build-system python-build-system) + (base32 "088qygd6abz63dhd241mg5px2wwzzq7bv1jj3y0prncxzzyrkl9j")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_stock_anglo_saxon")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase" ,trytond-purchase) - ("trytond-sale" ,trytond-sale) - ("trytond-sale-supply-drop-shipment" - ,trytond-sale-supply-drop-shipment))) + (cons* trytond-purchase + trytond-sale + trytond-sale-supply-drop-shipment + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account @@ -1178,24 +1403,24 @@ anglo-saxon accounting model for stock valuation.") (define-public trytond-account-stock-continental (package (name "trytond-account-stock-continental") - (version "6.2.3") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_stock_continental" version)) (sha256 - (base32 "1dzldnasshpx2gn15scycj72z85z5xli5wq1h39y8brb49ib7nvy")))) - (build-system python-build-system) + (base32 "1hwfv06mg0x1zhpqkbvywkyfdj3fn9p92yxfw6f28da4n3k6id1r")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_stock_continental")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice" ,trytond-account-invoice) - ("trytond-purchase" ,trytond-purchase) - ("trytond-sale" ,trytond-sale) - ("trytond-sale-supply-drop-shipment" - ,trytond-sale-supply-drop-shipment))) + (cons* trytond-account-invoice + trytond-purchase + trytond-sale + trytond-sale-supply-drop-shipment + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account trytond-account-product trytond-stock)) + (list trytond trytond-account trytond-account-product trytond-product + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-account-stock-continental") (synopsis "Tryton module for continental real-time stock valuation") @@ -1203,19 +1428,58 @@ anglo-saxon accounting model for stock valuation.") continental accounting model for stock valuation.") (license license:gpl3+))) +(define-public trytond-account-stock-eu + (package + (name "trytond-account-stock-eu") + (version "7.0.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_stock_eu" version)) + (sha256 + (base32 "1iw60aqwjz8wkpkqkc2jvv4i303cgyrym6z716xycqjmg46rn61f")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_stock_eu")) + (native-inputs + (cons* trytond-carrier + trytond-incoterm + trytond-production + trytond-purchase-shipment-cost + trytond-stock-consignment + trytond-stock-package-shipping + trytond-stock-shipment-cost + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-account + trytond-company + trytond-country + trytond-currency + trytond-customs + trytond-party + trytond-product + trytond-product-measurements + trytond-stock + trytond-stock-shipment-measurements)) + (home-page "https://docs.tryton.org/projects/modules-account-stock-eu") + (synopsis "Tryton module for European stock accounting") + (description "The @emph{Account Stock EU} Tryton module is used to +generate the Intrastat declarations every month.") + (license license:gpl3+))) + (define-public trytond-account-stock-landed-cost (package (name "trytond-account-stock-landed-cost") - (version "6.2.2") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_stock_landed_cost" version)) (sha256 - (base32 "01yfkhwxw86s354y51bhs799cvfhwkmjrnmhaspbn889mkpir0wg")))) - (build-system python-build-system) + (base32 "1wjd6c4dp266b5vcw99yas2p42mr86mdzir110w0s3ml46qqwr1j")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_stock_landed_cost")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-product trytond-stock)) @@ -1229,16 +1493,16 @@ allocating landed cost on Supplier Shipments after their reception.") (define-public trytond-account-stock-landed-cost-weight (package (name "trytond-account-stock-landed-cost-weight") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_stock_landed_cost_weight" version)) (sha256 - (base32 "1dx5m5l1ccnffkqgwxpfk57g1wndxq1q1jrmrbf4cj6q47x1y0xx")))) - (build-system python-build-system) + (base32 "0msa79mf81prf14p4hfy1b98a9w9x49j138r5bc3c99ymmc3vljk")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_stock_landed_cost_weight")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-stock-landed-cost trytond-product trytond-product-measurements trytond-stock-shipment-measurements)) @@ -1253,40 +1517,65 @@ from the Product Measurements") (define-public trytond-account-stock-shipment-cost (package (name "trytond-account-stock-shipment-cost") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_stock_shipment_cost" version)) (sha256 - (base32 "1iyz76cma63kp2alqr4rcrm3zjj6ifsvv9hsylbfkamfgy84brsr")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_account_stock_shipment_cost")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list trytond - trytond-account - trytond-account-invoice - trytond-product - trytond-stock - trytond-stock-shipment-cost)) + (base32 "0gxjhry3hpm0j72ai22q9fgay9w5087xnrisc18ynwv4zzyr84vq")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_stock_shipment_cost")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account + trytond-account-invoice + trytond-product + trytond-stock + trytond-stock-shipment-cost)) (home-page "https://docs.tryton.org/projects/modules-account-stock-shipment-cost") (synopsis "Tryton module to allocate shipment cost based on invoice") (description "The @emph{Account Stock Shipment Cost} Tryton module allocates shipment cost based on invoice.") (license license:gpl3+))) +(define-public trytond-account-stock-shipment-cost-weight + (package + (name "trytond-account-stock-shipment-cost-weight") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_stock_shipment_cost_weight" version)) + (sha256 + (base32 "0nlfz0azn6y16i0qy8mwpsdz2ckh554h640warfnydmmbj1hqkni")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_stock_shipment_cost_weight")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account-stock-shipment-cost + trytond-stock-shipment-measurements)) + (home-page + "https://docs.tryton.org/projects/modules-account-stock-shipment-cost-weight") + (synopsis "Tryton module to allocate shipment cost \"by weight\"") + (description "The @emph{Account Stock Shipment Cost Weight} Tryton module +adds “by weight” as allocation method on shipment cost.") + (license license:gpl3+))) + (define-public trytond-account-tax-cash (package (name "trytond-account-tax-cash") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_tax_cash" version)) (sha256 - (base32 "0hy5929697lsa84xyy535gh4s2j1yv4vdfxyi93md17pjf95hwpg")))) - (build-system python-build-system) + (base32 "0q2nr9fwfb0jv4yiy2xq3r3065lvsji5zj9aj9arbd9kwpzqi51p")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_tax_cash")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-party)) (home-page "https://docs.tryton.org/projects/modules-account-tax-cash") @@ -1295,24 +1584,47 @@ allocates shipment cost based on invoice.") report on cash basis.") (license license:gpl3+))) +(define-public trytond-account-tax-non-deductible + (package + (name "trytond-account-tax-non-deductible") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_account_tax_non_deductible" version)) + (sha256 + (base32 "0xx15wj7phigrdad0yrydjfg98plb712dqq0ayhj3p17ijcvkyfl")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "account_tax_non_deductible")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account + trytond-account-invoice)) + (home-page "https://docs.tryton.org/projects/modules-account-tax-non-deductible") + (synopsis "Tryton module to report non-deductible taxes") + (description "The @emph{Account Tax Non Deductible} Tryton module allows +to define non-deductible taxes and reports them.") + (license license:gpl3+))) + (define-public trytond-account-tax-rule-country (package (name "trytond-account-tax-rule-country") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_account_tax_rule_country" version)) (sha256 - (base32 "0bg831hha4j71lm9xhpv4al2qaxmk8qgli5s9hx2h4bcy1hbf5wf")))) - (build-system python-build-system) + (base32 "0jpp11rlskpqp3dzfm8ml2kqn4855vrcrcmwk6jrjkpsh2m8f6s3")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "account_tax_rule_country")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice" ,trytond-account-invoice) - ("trytond-purchase" ,trytond-purchase) - ("trytond-sale" ,trytond-sale) - ("trytond-stock" ,trytond-stock))) + (cons* trytond-account-invoice + trytond-purchase + trytond-sale + trytond-stock + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-country)) (home-page @@ -1326,16 +1638,16 @@ criteria.") (define-public trytond-analytic-account (package (name "trytond-analytic-account") - (version "6.2.0") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_analytic_account" version)) (sha256 - (base32 "1ys9admjlgvn2m2zjp74liplzmc8q12x8i004cgb5m43x2mhrj8d")))) - (build-system python-build-system) + (base32 "14qrx6nf1x939sd20hm905bfj9r1gjfpbs8cs9myjwxrqq2m191l")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "analytic_account")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-company trytond-currency trytond-party)) @@ -1346,22 +1658,18 @@ criteria.") required to analyse accounting using multiple different axes.") (license license:gpl3+))) -(define-public python-trytond-analytic-account - (deprecated-package - "python-trytond-analytic-account" trytond-analytic-account)) - (define-public trytond-analytic-budget (package (name "trytond-analytic-budget") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_analytic_budget" version)) (sha256 - (base32 "080a1s9w6n50xi2r7d3jkyk84rdqzggbqzhab9qjgppl67q85m8p")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_analytic_budget")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "1j3lxb3nxhis7w4snds0m9yvr70mcr2mj8rbs3vvnmg99ysgrrci")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "analytic_budget")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-budget trytond-analytic-account trytond-company)) @@ -1376,18 +1684,19 @@ transactions against the budgeted amount.") (define-public trytond-analytic-invoice (package (name "trytond-analytic-invoice") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_analytic_invoice" version)) (sha256 - (base32 "0416knbcn7wcx4anzvl0hw7qcdn3xndlh5i0pa0xffvw6kw1ijp9")))) - (build-system python-build-system) + (base32 "0cj20yzaxsmc8ifzqk1d1vvs1bb8r3dlivpqkq0gdjn3mqblfplx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "analytic_invoice")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-asset" ,trytond-account-asset))) + (cons* trytond-account-asset + trytond-account-invoice-defer + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-invoice trytond-analytic-account)) (home-page "https://docs.tryton.org/projects/modules-analytic-invoice") @@ -1399,16 +1708,16 @@ analytic accounts on an invoice line.") (define-public trytond-analytic-purchase (package (name "trytond-analytic-purchase") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_analytic_purchase" version)) (sha256 - (base32 "098sdhmr1idqqaxms3c05pgmvb27bykwfhgibxi9l1lr6k06d2cr")))) - (build-system python-build-system) + (base32 "1vpvn3k5zfdhkbv40q91ln1i2014xfcqhi7p4rky1hh9yy2szjl2")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "analytic_purchase")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-analytic-account trytond-analytic-invoice trytond-purchase)) @@ -1421,16 +1730,16 @@ analytic accounts on a purchase line.") (define-public trytond-analytic-sale (package (name "trytond-analytic-sale") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_analytic_sale" version)) (sha256 - (base32 "00b3xiykm9j0kf1f9kmsy22413rdjsmvg5li7bd4xrxk22j8v4wv")))) - (build-system python-build-system) + (base32 "06ydgb2x3mwp3g1nnsmm1k449nnn29whl82hgvlp1n5z58lcjmvh")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "analytic_sale")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-analytic-account trytond-analytic-invoice trytond-sale)) @@ -1443,18 +1752,26 @@ analytic accounts on a sale line.") (define-public trytond-attendance (package (name "trytond-attendance") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_attendance" version)) (sha256 - (base32 "0g9b0x4zdz6djmd592ll8zj4q3lhz5gj97phc38kkzvwgvpq9xw2")))) - (build-system python-build-system) - (arguments (tryton-arguments "attendance")) + (base32 "1j5pldlgdkhllsqlnpjd4l56h933pyfwllxrfr1dd47730ky7rw9")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases #$(tryton-phases "attendance") + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; DB_CACHE and pytest don't work together here + (invoke "python" "-m" "unittest" "discover"))))))) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-timesheet" ,trytond-timesheet))) + (cons* trytond-timesheet + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company)) (home-page "https://docs.tryton.org/projects/modules-attendance") @@ -1465,19 +1782,41 @@ shows for each employee the total duration per day in the company and the detail of the time of entrance and exit") (license license:gpl3+))) +(define-public trytond-authentication-saml + (package + (name "trytond-authentication-saml") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_authentication_saml" version)) + (sha256 + (base32 "0ln7mj4wg3dapa1sdmcm78bm2j7rsivby23xbmf1s83i3jdb4wdm")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "authentication_saml")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list python-pysaml2 + trytond)) + (home-page "https://docs.tryton.org/projects/modules-authentication-saml") + (synopsis "Tryton module to authenticate users via SAML") + (description "The @emph{Authentication SAML} Tryton module allows +delegating the user authentication to an identity provider via SAML.") + (license license:gpl3+))) + (define-public trytond-authentication-sms (package (name "trytond-authentication-sms") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_authentication_sms" version)) (sha256 - (base32 "17237qrmk8pm7lifrn5zjvsf42cs2q6p2h6qw2vk9fixdz1gxk9x")))) - (build-system python-build-system) + (base32 "0gnqnc0mcwspby663h91kf2y7pgw25zms3iqh0gs18sygx291a7y")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "authentication_sms")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-authentication-sms") @@ -1491,16 +1830,18 @@ configuration file.") (define-public trytond-bank (package (name "trytond-bank") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_bank" version)) (sha256 - (base32 "1gvsd8yyrba9bsql9zi4wlmg1jyjb7m13m15av0szkwxylcy0c0q")))) - (build-system python-build-system) + (base32 "0m5agk7dl2f51sg85s885b8wkfynvli9z8bra0i0f1k65q1qcpcp")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "bank")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* python-schwifty + %standard-trytond-native-inputs)) (propagated-inputs (list python-stdnum trytond trytond-currency trytond-party)) (home-page "https://docs.tryton.org/projects/modules-bank") @@ -1512,16 +1853,16 @@ and account.") (define-public trytond-carrier (package (name "trytond-carrier") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_carrier" version)) (sha256 - (base32 "1fr12m4qi0fkxnbjq5v1sf5dkic9xb2j0bvb8y18if3hh0csfcy7")))) - (build-system python-build-system) + (base32 "0n5jpry7yjc0w1h9z4kkp498v46hbd9gn76b4gwypscd7anpgziy")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "carrier")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-country trytond-party trytond-product)) (home-page "https://docs.tryton.org/projects/modules-carrier") @@ -1530,23 +1871,52 @@ and account.") of carrier.") (license license:gpl3+))) +(define-public trytond-carrier-carriage + (package + (name "trytond-carrier-carriage") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_carrier_carriage" version)) + (sha256 + (base32 "106a7cixchss6g8j0zclhb35ir87sa5whn6l33jxgvraq7jswy9n")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "carrier_carriage")) + (native-inputs + (cons* trytond-account-invoice + trytond-incoterm + trytond-purchase-shipment-cost + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-carrier + trytond-stock + trytond-stock-shipment-cost)) + (home-page "https://docs.tryton.org/projects/modules-carrier-carriage") + (synopsis "Tryton module to support multiple carriers") + (description "The @emph{Carrier Carriage} Tryton module extends the +support of carrier by adding carriers before and after the main carrier.") + (license license:gpl3+))) + (define-public trytond-carrier-percentage (package (name "trytond-carrier-percentage") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_carrier_percentage" version)) (sha256 - (base32 "0lnahli4bc4zspr86i8qchza96k4cmsfcdg3wp7wicp1s2ki7bbw")))) - (build-system python-build-system) + (base32 "10gp67rdv9qlprq8381k8pxsswc8022idkim2fhxivglghic3i4r")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "carrier_percentage")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase-shipment-cost" ,trytond-purchase-shipment-cost) - ("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-purchase-shipment-cost + trytond-sale-shipment-cost + trytond-stock-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-carrier trytond-currency)) (home-page "https://docs.tryton.org/projects/modules-carrier-percentage") @@ -1558,19 +1928,19 @@ method \"on percentage\" on carrier.") (define-public trytond-carrier-subdivision (package (name "trytond-carrier-subdivision") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_carrier_subdivision" version)) (sha256 - (base32 "1a4jpi6iaah3f1zsdsjz2zak6wd9jai4jcqzijl2li4pcnkc0x8a")))) - (build-system python-build-system) + (base32 "0vpp0pk7mh8ir6jbqcyc9q5g872750g8ikhiichph2w9bjjkq2rx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "carrier_subdivision")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-carrier-carriage + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-carrier)) (home-page "https://docs.tryton.org/projects/modules-carrier-subdivision") @@ -1593,20 +1963,20 @@ or a specific postal code.") (define-public trytond-carrier-weight (package (name "trytond-carrier-weight") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_carrier_weight" version)) (sha256 - (base32 "0mvz7q2hb4bcj3abvi4dxmnqbrph1g49s2bvyf3lx9ykbmr6v3n7")))) - (build-system python-build-system) + (base32 "0s6120k2glc18z6jhdm870vh8l575sq11a6sa262bmi1hqgmk2gp")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "carrier_weight")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase-shipment-cost" ,trytond-purchase-shipment-cost) - ("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-purchase-shipment-cost + trytond-sale-shipment-cost + trytond-stock-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-carrier @@ -1624,24 +1994,27 @@ the weight is greater or equal but smaller than the next line.") (define-public trytond-commission (package (name "trytond-commission") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_commission" version)) (sha256 - (base32 "1m8cg6vb08paymi3bckqwp2vg0as36p6jadg86dc4b1axabas144")))) - (build-system python-build-system) + (base32 "0xvlkx45r4mrn86jib9mc98vlwx8c03c9py4dzfhpiy1lngz5hg8")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "commission")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale" ,trytond-sale))) + (cons* trytond-account-invoice-stock + trytond-sale + trytond-stock + %standard-trytond-native-inputs)) (propagated-inputs (list python-simpleeval trytond trytond-account trytond-account-invoice trytond-account-product + trytond-company trytond-party trytond-product)) (home-page "https://docs.tryton.org/projects/modules-commission") @@ -1654,16 +2027,16 @@ invoice, following the agent's commission plan.") (define-public trytond-commission-waiting (package (name "trytond-commission-waiting") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_commission_waiting" version)) (sha256 - (base32 "16y11dc33x1h55v94rab8wzbh4d1pc35vd64ys8915rvijpm6xm5")))) - (build-system python-build-system) + (base32 "0iwsrcp2gxa13mcvqag063wq3fxpq8qm2ws9qkv8v2k6ypbqvp43")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "commission_waiting")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-commission)) @@ -1677,16 +2050,16 @@ to a waiting account defined on the agent.") (define-public trytond-company (package (name "trytond-company") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_company" version)) (sha256 - (base32 "03ss7cwxbynn8ly5y32bj1cl2ikji9ydsby62l440jb025sn9x8v")))) - (build-system python-build-system) + (base32 "19j2msxjis7sw6gvgp89gbhm44364wgl03w0s2i6kd52jy40jpdv")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "company")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-currency trytond-party)) (home-page "https://www.tryton.org/") @@ -1696,22 +2069,19 @@ to a waiting account defined on the agent.") company and employee and extend the user model.") (license license:gpl3+))) -(define-public python-trytond-company - (deprecated-package "python-trytond-company" trytond-company)) - (define-public trytond-company-work-time (package (name "trytond-company-work-time") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_company_work_time" version)) (sha256 - (base32 "08nhnlxy1z5drlmxdsd6ad166qx5ckymzx94ja824n1qqac17zqw")))) - (build-system python-build-system) + (base32 "1y6c3p51jp2hcvby12b3pmn0h7jmsd7qigfxznmj17k6bqmm7b6b")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "company_work_time")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company)) (home-page "https://docs.tryton.org/projects/modules-company-work-time") @@ -1728,47 +2098,47 @@ month and a year of work.") (define-public trytond-country (package (name "trytond-country") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_country" version)) (sha256 - (base32 "1mlf6fwngdbqy6c7xi7nmg4dph3nnac61rkzhn79x5zqg2mgnv53")))) - (build-system python-build-system) + (base32 "1qvnbq9c0kymzgl82p56z31nvqshsqwqh746z229sbrln39i7miv")))) + (build-system pyproject-build-system) ;; Doctest contains one test that requires internet access. - (arguments (tryton-arguments "country" "--no-doctest")) - (native-inputs (%standard-trytond-native-inputs)) + (arguments (tryton-arguments "country" + "-k not scenario_country_import.rst")) + (native-inputs + (cons* python-pycountry + %standard-trytond-native-inputs)) (propagated-inputs - (list python-pycountry-20.7.3 trytond)) + (list trytond)) (home-page "http://www.tryton.org/") (synopsis "Tryton module with countries") (description "This package provides a Tryton module with countries.") (license license:gpl3+))) -(define-public python-trytond-country - (deprecated-package "python-trytond-country" trytond-country)) - (define-public trytond-currency (package (name "trytond-currency") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_currency" version)) (sha256 - (base32 "1sx9wanb4r95gs5hsl6hgy0gcvsfh0yr17rnhaa908286f88wa4f")))) - (build-system python-build-system) - ;; Doctest 'scenario_currency_rate_update.rst' fails. - (arguments (tryton-arguments "currency" "--no-doctest")) + (base32 "1gw82jfvlnbyr3wkh5r8gsd7b7m3jz0szvqqd9fccm1yb229k91w")))) + (build-system pyproject-build-system) + ;; Quite some tests require network access. + (arguments (tryton-arguments "currency" + "-k not (scenario_currency_rate_update.rst or ECBtestCase)")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("python-forex-python" ,python-forex-python) - ("python-pycountry" ,python-pycountry))) + (cons* python-pycountry + %standard-trytond-native-inputs)) (propagated-inputs - (list python-sql trytond)) + (list trytond)) (home-page "https://www.tryton.org/") (synopsis "Tryton module with currencies") (description @@ -1776,23 +2146,23 @@ month and a year of work.") currency and rate.") (license license:gpl3+))) -(define-public python-trytond-currency - (deprecated-package "python-trytond-currency" trytond-currency)) - (define-public trytond-currency-ro (package (name "trytond-currency-ro") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_currency_ro" version)) (sha256 - (base32 "1kn4bgh1gg5dcphb2afqb922myyg2012vdhixipmi7ccbv7ik46s")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_currency_ro")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-lxml python-requests trytond - trytond-currency)) + (base32 "1az7w8afhs5cwv4npfa2naizv7mr1mg9c4fgpdg5yp9vlkw3kssz")))) + (build-system pyproject-build-system) + ;; doctests require network access + (arguments (tryton-arguments "currency_ro" "-k not scenario_currency_ro")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list python-requests + trytond + trytond-currency)) (home-page "https://docs.tryton.org/projects/modules-currency-ro") (synopsis "Fetch currency rates from the Romanian National Bank") (description "The @emph{Currency RO} Tryton module adds the Romanian @@ -1802,17 +2172,20 @@ National Bank as a source for currency exchange rates.") (define-public trytond-currency-rs (package (name "trytond-currency-rs") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_currency_rs" version)) (sha256 - (base32 "05admscvj5m7anhji2ni9w2d8b33vlgcifda6jbrxdw8g4c0yivn")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_currency_rs")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-lxml trytond trytond-currency - python-zeep)) + (base32 "1zkb1b9y3j027g46jfwpxb6nv84qds795arsfdzn82zncp9gz4lx")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "currency_rs" + "-k not (scenario_currency_rs or test_selection_fields)")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-currency + python-zeep)) (home-page "https://docs.tryton.org/projects/modules-currency-rs") (synopsis "Fetch currency rates from the Serbian National Bank") (description "The @emph{Currency RS} Tryton module adds the Serbian @@ -1822,16 +2195,16 @@ National Bank as a source for currency exchange rates.") (define-public trytond-customs (package (name "trytond-customs") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_customs" version)) (sha256 - (base32 "1zx9cwiq9q4802bj2ga3bilyjls60vpycp3cncqfqh2n4mg23xlq")))) - (build-system python-build-system) + (base32 "0v6rzrdphys3davkc3d46mlq6hkd8xl6x444ddl23fw0b08mvrna")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "customs")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-simpleeval trytond trytond-country trytond-currency trytond-product)) @@ -1844,16 +2217,16 @@ duty based on the tariff code.") (define-public trytond-dashboard (package (name "trytond-dashboard") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_dashboard" version)) (sha256 - (base32 "1b8dalnbj69ppk8q7znw1ljyv5515r16m6gfd9a3l25dpvj0cxz2")))) - (build-system python-build-system) + (base32 "0cdxmyzs23bdksqgg87y7r4zvpzx63pvjgvhjck6hm49nyicqlmf")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "dashboard")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-dashboard") @@ -1862,24 +2235,126 @@ duty based on the tariff code.") configure their dashboard.") (license license:gpl3+))) +(define-public trytond-document-incoming + (package + (name "trytond-document-incoming") + (version "7.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_document_incoming" version)) + (sha256 + (base32 "18apzwxh8qh0c9gkhjf95avm4f2v5w96rx564j5v2j53a9kp86zj")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "document_incoming")) + (native-inputs + (cons* trytond-inbound-email + %standard-trytond-native-inputs)) + (propagated-inputs + (list python-pypdf + trytond + trytond-company)) + (home-page "https://docs.tryton.org/projects/modules-document-incoming") + (synopsis "Tryton module to manage incoming documents") + (description "The @emph{Document Incoming} Tryton module collects and +process incoming documents.") + (license license:gpl3+))) + +(define-public trytond-document-incoming-invoice + (package + (name "trytond-document-incoming-invoice") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_document_incoming_invoice" version)) + (sha256 + (base32 "1jpwwqpa4zaap1bi6praldybx2psgyi7lkafxcg2qrs36xzwgzpl")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "document_incoming_invoice")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account-invoice + trytond-document-incoming + trytond-party)) + (home-page "https://docs.tryton.org/projects/modules-document-incoming-invoice") + (synopsis "Tryton module to manage incoming invoice document") + (description "The @emph{Document Incoming Invoice} Tryton module creates +supplier invoices from incoming documents.") + (license license:gpl3+))) + +(define-public trytond-document-incoming-ocr + (package + (name "trytond-document-incoming-ocr") + (version "7.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_document_incoming_ocr" version)) + (sha256 + (base32 "0gngpviap9yr8lv5x02k9a0s86jj8lm7395sp6kshzq0hbr7q0nk")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "document_incoming_ocr")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-company + trytond-document-incoming)) + (home-page "https://docs.tryton.org/projects/modules-document-incoming-ocr") + (synopsis "Tryton module to process incoming document with OCR") + (description "The @emph{Document Incoming OCR} Tryton module provides the +basis to interact with OCR services.") + (license license:gpl3+))) + +(define-public trytond-document-incoming-ocr-typless + (package + (name "trytond-document-incoming-ocr-typless") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_document_incoming_ocr_typless" version)) + (sha256 + (base32 "1d1arbkz1clih78sy06kk1qw6a84z2r1zy59mnrrg35irn55kfrl")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "document_incoming_ocr_typless" + "-k not scenario_document_incoming_ocr_typless.rs" )) + (native-inputs + (cons* trytond-document-incoming-invoice + %standard-trytond-native-inputs)) + (propagated-inputs + (list python-requests + trytond + trytond-currency + trytond-document-incoming + trytond-document-incoming-ocr + trytond-party)) + (home-page "https://docs.tryton.org/projects/modules-document-incoming-ocr-typless") + (synopsis "Tryton module that integrates Typless online OCR for incoming document") + (description "The @emph{Document Incoming OCR Typless} Tryton module +provides integration with Typless online services.") + (license license:gpl3+))) + (define-public trytond-edocument-uncefact (package (name "trytond-edocument-uncefact") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_edocument_uncefact" version)) (sha256 - (base32 "0nf72c5sw33c77y87idkhf8fz39a7qlgmlrbnzz1cwcpky4hrmdg")))) - (build-system python-build-system) + (base32 "1zk7nzfrsxq3h9n1dkmqpxvjmzax2p0snqhgg99q7zs9s1x9wm2k")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "edocument_uncefact")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("python-lxml" ,python-lxml) - ("trytond-account-invoice" ,trytond-account-invoice))) + (cons* trytond-account-invoice + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-edocument-unece)) + (list trytond + trytond-edocument-unece)) (home-page "https://docs.tryton.org/projects/modules-edocument-uncefact") (synopsis "Tryton module for electronic document UN/CEFACT") (description "The @emph{Edocument UN/CEFACT} Tryton module implements @@ -1893,16 +2368,16 @@ electronic document from UN/CEFACT. Supported formats are: (define-public trytond-edocument-unece (package (name "trytond-edocument-unece") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_edocument_unece" version)) (sha256 - (base32 "1ikrh9yk5if8v1sw1aihnysbpipmly6r6ka6zccjcywm1cmabhx0")))) - (build-system python-build-system) + (base32 "1ncagmd0ydvxplvih1bjzmjvx2hpbxyrqfnzwwd6f9ixk9vz60wl")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "edocument_unece")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-product)) (home-page "https://docs.tryton.org/projects/modules-edocument-unece") @@ -1921,17 +2396,24 @@ from the UNECE. Supported formats are: (define-public trytond-gis (package (name "trytond-gis") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_gis" version)) (sha256 - (base32 "0zfvbqzxhvjja03pv9ja9rml2i2fqiir5a92rz0vj3lx9azjbkvw")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_gis")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-geomet trytond)) + (base32 "1kx62p7jl27ihh0j952f4r0bfn1a1zz15wgvd254yyhc3h57pc7b")))) + (build-system pyproject-build-system) + (arguments + (list + #:tests? #f ;; tests require postgis database + #:phases (tryton-phases "gis"))) + (native-inputs + (cons* python-psycopg2 + %standard-trytond-native-inputs)) + (propagated-inputs + (list python-geomet + trytond)) (home-page "https://docs.tryton.org/projects/backend-gis") (synopsis "Geographic Information System support from Tryton") (description "The @emph{Trytond GIS} Tryton module adds GIS (Geographic @@ -1941,16 +2423,16 @@ information system) support to Tryton.") (define-public trytond-google-maps (package (name "trytond-google-maps") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_google_maps" version)) (sha256 - (base32 "0g6hag2n7rc7avcawwhdkndbqxc957nyrwq4arkrlkidpbipw37n")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_google_maps")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "1sb1mp991szg9bfjbn2pvri52sndk33ffx19r7d2cybnkihnhydv")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "google_maps")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-party)) (home-page "https://docs.tryton.org/projects/modules-google-maps") (synopsis "Tryton module to link addresses to Google Maps") @@ -1959,35 +2441,57 @@ field on the party addresses. This link open the Google Maps page on the default browser with the map centered on the selected address.") (license license:gpl3+))) +(define-public trytond-inbound-email + (package + (name "trytond-inbound-email") + (version "7.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_inbound_email" version)) + (sha256 + (base32 "0y4zjqr3wrd5pvp8gi270m6r4kfs9djz8hc2iw8mj5p8w5hw8p33")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "inbound_email")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond)) + (home-page "https://docs.tryton.org/projects/modules-inbound-email") + (synopsis "Tryton module to manage inbound e-mail") + (description "The @emph{Inbound Email} Tryton module allows defining rules +to apply to inbound e-mails.") + (license license:gpl3+))) + (define-public trytond-incoterm (package (name "trytond-incoterm") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_incoterm" version)) (sha256 - (base32 "08sz2j3610iqqzz3qdl51pxdj8mncyjp8lg29y6sskfd0s4fhax5")))) - (build-system python-build-system) + (base32 "1p5p6nddx8qavs02355378ayy620lf884v35blvffz870mybz7i7")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "incoterm")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account" ,trytond-account) - ("trytond-account-invoice" ,trytond-account-invoice) - ("trytond-account-invoice-stock" ,trytond-account-invoice-stock) - ("trytond-carrier" ,trytond-carrier) - ("trytond-purchase" ,trytond-purchase) - ("trytond-purchase-request-quotation" - ,trytond-purchase-request-quotation) - ("trytond-sale" ,trytond-sale) - ("trytond-sale-invoice-grouping" ,trytond-sale-invoice-grouping) - ("trytond-sale-opportunity" ,trytond-sale-opportunity) - ("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost) - ("trytond-stock" ,trytond-stock) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-account + trytond-account-invoice + trytond-account-invoice-stock + trytond-carrier + trytond-purchase + trytond-purchase-request-quotation + trytond-sale + trytond-sale-invoice-grouping + trytond-sale-opportunity + trytond-sale-shipment-cost + trytond-stock + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-company trytond-party)) + (list trytond + trytond-company + trytond-country + trytond-party)) (home-page "https://docs.tryton.org/projects/modules-incoterm") (synopsis "Tryton module for incoterms") (description "The @emph{Incoterm} Tryton module is used to manage the @@ -1998,16 +2502,16 @@ versions of 2010 and 2020.") (define-public trytond-ldap-authentication (package (name "trytond-ldap-authentication") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_ldap_authentication" version)) (sha256 - (base32 "0c3g2y8zqh17wwg9w3bk9q1gwm4hq7h8avchmbfawi6cq3g6ch5b")))) - (build-system python-build-system) + (base32 "0pnmv39hdw4a61ml8s2sh5c9dxxgsmnjfg27w490l0mvrnb394n4")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "ldap_authentication")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-ldap3 trytond)) (home-page "https://docs.tryton.org/projects/modules-ldap-authentication") @@ -2019,16 +2523,16 @@ authenticating users via a LDAP server.") (define-public trytond-marketing (package (name "trytond-marketing") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_marketing" version)) (sha256 - (base32 "1ljv23ldva3cd07k0knncnawwrig8q6lgsxlm392dcqkyb8gvbjg")))) - (build-system python-build-system) + (base32 "1pihlkwa54wjv8hjmsjfmrajfjhdk6ja8pnqkfxqx5s26qzp5x1w")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "marketing")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-marketing") @@ -2040,20 +2544,23 @@ fundamentals for marketing modules.") (define-public trytond-marketing-automation (package (name "trytond-marketing-automation") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_marketing_automation" version)) (sha256 - (base32 "17x4pikw2i513wwrfv8g8xim65ksk3dwijahk1qhf3yqpa506kp2")))) - (build-system python-build-system) + (base32 "0cnnaijg9f7l92gir3sbr066b67zzbhqqxxrlypiyk83wwca9l76")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "marketing_automation")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-party" ,trytond-party))) + (cons* trytond-sale + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-marketing trytond-web-shortener)) + (list trytond + trytond-marketing + trytond-party + trytond-web-shortener)) (home-page "https://docs.tryton.org/projects/modules-marketing-automation") (synopsis "Tryton module to plan, coordinate and manage marketing campaigns") @@ -2062,19 +2569,48 @@ marketing actions to be automated. It is based on scenarios and activities that are executed on selected records.") (license license:gpl3+))) +(define-public trytond-marketing-campaign + (package + (name "trytond-marketing-campaign") + (version "7.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_marketing_campaign" version)) + (sha256 + (base32 "1sabklrxyfx9172813b5q4i74xn4j24hs5pd5gy9lcc0xlyv8bm6")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "marketing_campaign")) + (native-inputs + (cons* trytond-marketing-automation + trytond-marketing-email + trytond-sale + trytond-sale-opportunity + trytond-sale-point + trytond-web-shortener + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-marketing)) + (home-page "https://docs.tryton.org/projects/modules-marketing-campaign") + (synopsis "Tryton module to manage marketing campaign") + (description "The @emph{Marketing Campaign} Tryton module helps collecting +data about marketing campaigns.") + (license license:gpl3+))) + (define-public trytond-marketing-email (package (name "trytond-marketing-email") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_marketing_email" version)) (sha256 - (base32 "1z38c3lw8chqbm23y0wfsnp268kq2f9azly4ix6imis74zdjnzkl")))) - (build-system python-build-system) + (base32 "00ycqv3x22hxz9kfc10w9z2fn0bicb8p63szj2k4x30val22bxb6")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "marketing_email")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-marketing trytond-party trytond-web-shortener trytond-web-user)) @@ -2087,21 +2623,21 @@ mailing lists.") (define-public trytond-notification-email (package (name "trytond-notification-email") - (version "6.2.2") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_notification_email" version)) (sha256 - (base32 "1i0h7spdnf3gryzbzjm8khc0jxzj6g6ljsjgsd28h39kqpdxyffz")))) - (build-system python-build-system) + (base32 "1vyvxp612wb1v173zmd9jf24kz49aw51399gjpj6mwip06q54r6d")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "notification_email")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-commission" ,trytond-commission) - ("trytond-company" ,trytond-company) - ("trytond-party" ,trytond-party) - ("trytond-web-user" ,trytond-web-user))) + (cons* trytond-commission + trytond-company + trytond-party + trytond-web-user + %standard-trytond-native-inputs)) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-notification-email") @@ -2115,17 +2651,18 @@ to the email.") (define-public trytond-party (package (name "trytond-party") - (version "6.2.1") + (version "7.0.6") (source (origin (method url-fetch) (uri (pypi-uri "trytond_party" version)) (sha256 - (base32 "1g62kzdqr4rq6k8zswil4anwhd22d8nzz0i852fmkdsb97yqg4id")))) - (build-system python-build-system) - ;; Doctest 'scenario_party_phone_number.rst' fails. - (arguments (tryton-arguments "party" "--no-doctest")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "19mlqkykih95h28r6d9ibmdvh93hxjw4ykgr6svc204rvpjqlbmg")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "party")) + (native-inputs + (cons* python-phonenumbers + %standard-trytond-native-inputs)) (propagated-inputs (list python-stdnum trytond trytond-country)) (home-page "https://www.tryton.org/") @@ -2135,24 +2672,21 @@ to the email.") addresses.") (license license:gpl3+))) -(define-public python-trytond-party - (deprecated-package "python-trytond-party" trytond-party)) - (define-public trytond-party-avatar (package (name "trytond-party-avatar") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_party_avatar" version)) (sha256 - (base32 "00gjjvslvcvfkdb0293n9yd9pmsnlbjvcnxrjg99vxkrn6dcwxzh")))) - (build-system python-build-system) + (base32 "1dvr1k5nd4pk8j3ix1x289ln35mlb6hf2i0qn19kyj27nlmb8p99")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "party_avatar")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-company" ,trytond-company))) + (cons* trytond-company + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-party)) (home-page "https://docs.tryton.org/projects/modules-party-avatar") @@ -2164,16 +2698,16 @@ party.") (define-public trytond-party-relationship (package (name "trytond-party-relationship") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_party_relationship" version)) (sha256 - (base32 "0vhm7zl29z8al4ay4n6gw3zazq07dsdhjc54il7sg3z9kz21xv6k")))) - (build-system python-build-system) + (base32 "1jqxg281ndxhg64bgnzb5rl53cv7clz8q9qs3qqsncj7vawxcwx2")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "party_relationship")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-party)) (home-page "https://docs.tryton.org/projects/modules-party-relationship") @@ -2185,16 +2719,16 @@ different types of relations between parties.") (define-public trytond-party-siret (package (name "trytond-party-siret") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_party_siret" version)) (sha256 - (base32 "0ab5g3rs2k73wk01ykzh1s4pgrnypdv4l75lr3pn8hyxw9q4b5vk")))) - (build-system python-build-system) + (base32 "0bvn22hpj8a65kcvd1g8b51dxylpi6dm77fzivpklmpjqln5wgl3")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "party_siret")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-party)) (home-page "https://docs.tryton.org/projects/modules-party-siret") @@ -2206,16 +2740,16 @@ identification numbers SIREN and SIRET on party and address.") (define-public trytond-product (package (name "trytond-product") - (version "6.2.0") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product" version)) (sha256 - (base32 "1cq270ng0rav7hzxip3fswbvhs6wkjadl2j8kmiy30qa43abmpwr")))) - (build-system python-build-system) + (base32 "0d03zmhay1kaaw8a9yalfsyzn54pb9yzkg1kxpywzd4ysxs295iz")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-stdnum trytond trytond-company)) (home-page "https://www.tryton.org/") @@ -2225,22 +2759,19 @@ identification numbers SIREN and SIRET on party and address.") Template and Product.") (license license:gpl3+))) -(define-public python-trytond-product - (deprecated-package "python-trytond-product" trytond-product)) - (define-public trytond-product-attribute (package (name "trytond-product-attribute") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_attribute" version)) (sha256 - (base32 "10656g9na098ndjhy4iv1iv0020jin7yw38bb79zxynck39vld29")))) - (build-system python-build-system) + (base32 "15sdcmjnkyznay4ib4ccwlhhl6aymdpd7w0f6d28dfv41y4viw1y")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_attribute")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product)) (home-page "https://docs.tryton.org/projects/modules-product-attribute") @@ -2252,16 +2783,16 @@ models `Attribute` and `Attribute Set` for products.") (define-public trytond-product-classification (package (name "trytond-product-classification") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_classification" version)) (sha256 - (base32 "1a5rdvscp3hb7jddciqmpzb095yzmyvsj5jc06jiilvynrawwzsh")))) - (build-system python-build-system) + (base32 "0xd67s2d6n6a9kna5a1fvx3kcbb6wnkk4337pcfs4b7zkls4q4m8")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_classification")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product)) (home-page @@ -2275,16 +2806,16 @@ reference field classification to the product template.") (define-public trytond-product-classification-taxonomic (package (name "trytond-product-classification-taxonomic") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_classification_taxonomic" version)) (sha256 - (base32 "1933kqhab8ky2mman13mmg06rdmlbak3sjgm5qbk615x5fzbl4s4")))) - (build-system python-build-system) + (base32 "04rr76kwxv05z0m5dy3p5sk5cq4jf0wab8wzrwl8g62ajrs8m697")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_classification_taxonomic")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product-classification)) (home-page @@ -2297,16 +2828,16 @@ adds the taxonomic classification to the products.") (define-public trytond-product-cost-fifo (package (name "trytond-product-cost-fifo") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_cost_fifo" version)) (sha256 - (base32 "1lqd960z7dmy3000fhhqqbmq7c4lk2l2dqw383sd62ka5j57kpf4")))) - (build-system python-build-system) + (base32 "130vq1wqxxlcdxdlyf3apg0f2xpy4farbl49mplz6ihiwpvzh1ka")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_cost_fifo")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-product-cost-fifo") @@ -2318,16 +2849,16 @@ first-in-first-out option in the `Cost Method` field of the product form.") (define-public trytond-product-cost-history (package (name "trytond-product-cost-history") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_cost_history" version)) (sha256 - (base32 "16gnqa04fv7525ax12xfmh4phk4fvm577j3c80cahxqpvsp2a0q6")))) - (build-system python-build-system) + (base32 "19dmw7319q3nrn9hj1i7zzbi034y7sb8870376sln8yw5rfacqvz")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_cost_history")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-product-cost-history") @@ -2343,21 +2874,21 @@ and assets.") (define-public trytond-product-cost-warehouse (package (name "trytond-product-cost-warehouse") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_cost_warehouse" version)) (sha256 - (base32 "0anz5071j1yzg9xp00qqcc3a4wb3zvl6605bzici76558zj7fl38")))) - (build-system python-build-system) + (base32 "075qjhwpc1a9hg8hzrzbwhaa9bnyz8a9y55jgl88b013zc2aic5h")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_cost_warehouse")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice-stock" ,trytond-account-invoice-stock) - ("trytond-account-stock-continental" ,trytond-account-stock-continental) - ("trytond-product-cost-fifo" ,trytond-product-cost-fifo) - ("trytond-product-cost-history" ,trytond-product-cost-history))) + (cons* trytond-account-invoice-stock + trytond-account-stock-continental + trytond-product-cost-fifo + trytond-product-cost-history + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company trytond-product trytond-stock)) (home-page @@ -2370,15 +2901,16 @@ cost price of products to be calculated separately for each warehouse.") (define-public trytond-product-image (package (name "trytond-product-image") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_image" version)) (sha256 - (base32 "1xdqgc4y1sghnp5q25facdz3mnaxf8fysqlpbq3zrghsvi136mvd")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_product_image")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0x60yvgmg9wa8mqs3kalvhvgm8lwqdnzmwi960ipfims8mfsjfpj")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "product_image" + "-k not (test_get_image_url or test_image)")) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-pillow trytond trytond-product)) (home-page "https://docs.tryton.org/projects/modules-product-image") (synopsis "Tryton module that adds images to products") @@ -2389,16 +2921,19 @@ product and variant.") (define-public trytond-product-image-attribute (package (name "trytond-product-image-attribute") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_image_attribute" version)) (sha256 - (base32 "1ywyh158325v461qkka5svp4gygsfkkrxd6yl9dgfgypd483qjs8")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_product_image_attribute")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list trytond trytond-product + (base32 "0avbq2bvcynfb70148nmkm2pgzy6f40qm2hmh2ms5nsyn2r9bfz4")))) + (build-system pyproject-build-system) + ;; tests require network - unfortunately this disables the main test case + (arguments (tryton-arguments "product_image_attribute" + "-k not test_image_attribute")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs (list trytond + trytond-product trytond-product-attribute trytond-product-image)) (home-page "https://docs.tryton.org/projects/modules-product-image-attribute") @@ -2410,23 +2945,25 @@ attributes to product images.") (define-public trytond-product-kit (package (name "trytond-product-kit") - (version "6.2.2") + (version "7.0.7") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_kit" version)) (sha256 - (base32 "1s41jng93cmf4pahz59jmza1k6nj6pb532k0mn2xnr0pgnh26w9m")))) - (build-system python-build-system) + (base32 "00479fq97ldrg3hkwzhwaaadd430rcs9rg4dd13lbijckzhapj86")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_kit")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice" ,trytond-account-invoice) - ("trytond-account-invoice-stock" ,trytond-account-invoice-stock) - ("trytond-company" ,trytond-company) - ("trytond-purchase" ,trytond-purchase) - ("trytond-sale" ,trytond-sale) - ("trytond-stock" ,trytond-stock))) + (cons* trytond-account-invoice + trytond-account-invoice-stock + trytond-company + trytond-purchase + trytond-purchase-amendment + trytond-sale + trytond-sale-amendment + trytond-stock + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product)) (home-page "https://docs.tryton.org/projects/modules-product-kit") @@ -2439,16 +2976,16 @@ purchased using a single line.") (define-public trytond-product-measurements (package (name "trytond-product-measurements") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_measurements" version)) (sha256 - (base32 "111q382lv3yg76r7jxfhnvr35kgi2fhiyxyj07immvwm5k3z0vi1")))) - (build-system python-build-system) + (base32 "133d2rsipfakjx35m685qclis5b1y288wpb03sqny41h1sd0h2qr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_measurements")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product)) (home-page "https://docs.tryton.org/projects/modules-product-measurements") @@ -2460,16 +2997,16 @@ following measurements to Product:") (define-public trytond-product-price-list (package (name "trytond-product-price-list") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_price_list" version)) (sha256 - (base32 "0x85317skmqkq12i9qqyjiny37rn2dccx7rk7lan87jj2cam70q4")))) - (build-system python-build-system) + (base32 "1n1zbq7jwqkida4qx7pp4ybys7pskppxqd86kl1vdw5fj43nhm7n")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_price_list")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-simpleeval trytond trytond-company trytond-product)) (home-page "https://docs.tryton.org/projects/modules-product-price-list") @@ -2478,21 +3015,46 @@ following measurements to Product:") to compute prices per product or category.") (license license:gpl3+))) +(define-public trytond-product-price-list-cache + (package + (name "trytond-product-price-list-cache") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_product_price_list_cache" version)) + (sha256 + (base32 "1hrj7iz9yb2kmybjcgzzp9s29jc6884vih6fqw5xgnz78x9rbfdq")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "product_price_list_cache")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-product + trytond-product-price-list)) + (home-page "https://docs.tryton.org/projects/modules-product-price-list-cache") + (synopsis "Tryton module to cache price lists") + (description "The @emph{Product Price List Cache} Tryton module +pre-computes and stores prices for each product and price list.") + (license license:gpl3+))) + (define-public trytond-product-price-list-dates (package (name "trytond-product-price-list-dates") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_price_list_dates" version)) (sha256 - (base32 "0312s99fqfjwyn5lp3b8qd7j0ac0208jbalgxxazfks1h2g22nj5")))) - (build-system python-build-system) + (base32 "075xhsp94mniwd97qrbhizjy3ijcslm6ygl3fpi275cvz5dx3qad")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_price_list_dates")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-price-list" ,trytond-sale-price-list))) + (cons* trytond-product-price-list-cache + trytond-purchase-price-list + trytond-sale-price-list + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product-price-list)) (home-page @@ -2505,16 +3067,16 @@ date and end date conditions to the price list lines.") (define-public trytond-product-price-list-parent (package (name "trytond-product-price-list-parent") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_product_price_list_parent" version)) (sha256 - (base32 "0w5fmr2p56p44yq33qgjxp5b8r7bpyixwpdp6xgbrd36ig9wcg3z")))) - (build-system python-build-system) + (base32 "12icwym955ip9wk667yyzarc2qjp8xf6dq12fy0blsqf17jfn91j")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "product_price_list_parent")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product-price-list)) (home-page @@ -2528,16 +3090,26 @@ which contains the unit price computed by the parent price list.") (define-public trytond-production (package (name "trytond-production") - (version "6.2.1") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production" version)) (sha256 - (base32 "1sjrpyh4cxllmcxh085nfkq4hhdaz2mcgs1x9hwcsk9scqbi8fkw")))) - (build-system python-build-system) - (arguments (tryton-arguments "production")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "1jlhipmcvr09xdjh8f6qzmfas5yjii31ymhb2cgkp52b1kp563xw")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases #$(tryton-phases "production") + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; DB_CACHE and pytest don't work together here + (invoke "python" "-m" "unittest" "discover"))))))) + (native-inputs + (cons* trytond-stock-lot + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company trytond-product trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-production") @@ -2549,16 +3121,16 @@ for production management: Bill of material and production order.") (define-public trytond-production-outsourcing (package (name "trytond-production-outsourcing") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production_outsourcing" version)) (sha256 - (base32 "0ms50p42jr23v2fgm3kplacr11czx16dljmxvvn4qgxlacsf0dz0")))) - (build-system python-build-system) + (base32 "105xn6w0xqvqw3y7yyapv8ks3kfk7ffm5g00vy0scl3c9qi8qi5s")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "production_outsourcing")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-production trytond-production-routing trytond-purchase)) @@ -2574,18 +3146,18 @@ the production.") (define-public trytond-production-routing (package (name "trytond-production-routing") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production_routing" version)) (sha256 - (base32 "1a6cw0yc60ijd8bnrk84rzx4swqi294g3dsapp03hapn9rgdjbpj")))) - (build-system python-build-system) + (base32 "0n9xay9s12lzkcra30npnsh0589zrfkhk7al5whla58i123a7vwi")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "production_routing")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-stock-supply-production" ,trytond-stock-supply-production))) + (cons* trytond-stock-supply-production + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-production)) (home-page "https://docs.tryton.org/projects/modules-production-routing") @@ -2597,16 +3169,16 @@ routings for production: Routing, Step and Operation.") (define-public trytond-production-split (package (name "trytond-production-split") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production_split" version)) (sha256 - (base32 "1fcsbvmcjxriq4yllxv2h7i2p07caqgka39f04l7pvz4w9ha4s96")))) - (build-system python-build-system) + (base32 "06ic3w4zskk08q617660w1gx5l8dmf782n9kq0kg8x82m2lw0f0n")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "production_split")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-production)) (home-page "https://docs.tryton.org/projects/modules-production-split") @@ -2621,16 +3193,16 @@ quantity.") (define-public trytond-production-work (package (name "trytond-production-work") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production_work" version)) (sha256 - (base32 "1bff8rfdrlx14ahjnmq3lw7z816qnk22cjk9wwmwkcpl99faw3bd")))) - (build-system python-build-system) + (base32 "031673vvqmdhrfkib5nikza4a5w5hgq4x14mdzgwny3ln7vdmis9")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "production_work")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company @@ -2648,16 +3220,16 @@ work cost.") (define-public trytond-production-work-timesheet (package (name "trytond-production-work-timesheet") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_production_work_timesheet" version)) (sha256 - (base32 "19d9sasviayn4vkbwgxmgqbn2fd61qqh4sk35vzlmkbwycrbczhi")))) - (build-system python-build-system) + (base32 "0c737kxdqpjc1h9vb00sz69zh6y76d3ll71nrs2nxidqjdwyhhz5")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "production_work_timesheet")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-production-routing trytond-production-work trytond-timesheet)) @@ -2671,16 +3243,16 @@ entering a timesheet for production works.") (define-public trytond-project (package (name "trytond-project") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_project" version)) (sha256 - (base32 "0rr1ar7ah753afqi16yklirwv3ikmcv4xhnbv5vixna1kqhg8n43")))) - (build-system python-build-system) + (base32 "0y8ymmfp91z89ylwwfwkl66l227phz3c0dj1r3k8ahlv7q4rrlsg")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "project")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company trytond-company-work-time trytond-party trytond-timesheet)) @@ -2693,21 +3265,22 @@ project and task and the basis for simple project management.") (define-public trytond-project-invoice (package (name "trytond-project-invoice") - (version "6.2.3") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_project_invoice" version)) (sha256 - (base32 "1hdyds6k2k0hjk8za8xa64qvqx9pnyv1a6g7mq80ag8hscx2s282")))) - (build-system python-build-system) + (base32 "031bjkh6dyixs4rkmdpaf28xa8cx5yr3hh51gkcd4mcnz2pbflxx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "project_invoice")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-account-product + trytond-currency trytond-product trytond-project trytond-project-revenue @@ -2730,16 +3303,16 @@ methods on projects. The methods are: (define-public trytond-project-plan (package (name "trytond-project-plan") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_project_plan" version)) (sha256 - (base32 "1rijwxx1sypgv3fapw7sv0i6xbci2b6h3ij42aq693yvn0wm46q4")))) - (build-system python-build-system) + (base32 "06411x4iswy09pjxxiwxrha5r272df1rkyd5w42b192vxbjfshy7")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "project_plan")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company trytond-project trytond-timesheet)) (home-page "https://docs.tryton.org/projects/modules-project-plan") @@ -2751,18 +3324,18 @@ on top of the Project module.") (define-public trytond-project-revenue (package (name "trytond-project-revenue") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_project_revenue" version)) (sha256 - (base32 "0hpqwjpd6d0a291yssa8f0x89xxqvdzq8a3f10csibsq7bssqzki")))) - (build-system python-build-system) + (base32 "1j8qdliylg1jjas51z34gvi78q9qv81ssk4blp9y4kr1svq8wpjk")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "project_revenue")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase" ,trytond-purchase))) + (cons* trytond-purchase + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company @@ -2783,16 +3356,16 @@ the linked time sheets and the linked purchase lines.") (define-public trytond-purchase (package (name "trytond-purchase") - (version "6.2.3") + (version "7.0.14") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase" version)) (sha256 - (base32 "1lni31dhi1yrz0ga1l2268fyv564gsqiy1rjal8l765v40121q0p")))) - (build-system python-build-system) + (base32 "0qf17qpcid9d0vm5wnzfg0qsal67zfdxipjr28nw9azjvx07vbvz")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -2810,22 +3383,19 @@ the linked time sheets and the linked purchase lines.") "This package provides a Tryton module that defines the Purchase model.") (license license:gpl3+))) -(define-public python-trytond-purchase - (deprecated-package "python-trytond-purchase" trytond-purchase)) - (define-public trytond-purchase-amendment (package (name "trytond-purchase-amendment") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_amendment" version)) (sha256 - (base32 "0zprgfxpif2bbjbv8b4aci7s5si9sp3rjizr7nf31mvsjnwx7i06")))) - (build-system python-build-system) + (base32 "0s8kp88s73jn9z5bnj5n91fl67hpycrzcxl6hkdx4l2vha6r2f65")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_amendment")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-purchase trytond-purchase-history trytond-stock)) @@ -2846,19 +3416,46 @@ amendment is composed of action lines which can: @end itemize") (license license:gpl3+))) +(define-public trytond-purchase-blanket-agreement + (package + (name "trytond-purchase-blanket-agreement") + (version "7.0.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_purchase_blanket_agreement" version)) + (sha256 + (base32 "1h96y36ik14snxw6hm6w6nsxkkn5lv4vmhmy1xfadiffafhr7503")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "purchase_blanket_agreement")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-company + trytond-currency + trytond-party + trytond-product + trytond-purchase)) + (home-page "https://docs.tryton.org/projects/modules-purchase-blanket-agreement") + (synopsis "Tryton module for purchase blanket agreements") + (description "The @emph{Purchase Blanket Agreement} Tryton module manages +long-term contracts with suppliers to purchase a specific quantity of products +with multiple orders over a period.") + (license license:gpl3+))) + (define-public trytond-purchase-history (package (name "trytond-purchase-history") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_history" version)) (sha256 - (base32 "0b72q0b41jfaahccdnya9amp5x4w90mlx4b32wdby96xvfi485ar")))) - (build-system python-build-system) + (base32 "1vf9r2rsbxxgy9brl3458n5axdk4sc4r01xrq7h1293izs1cjw5s")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_history")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-purchase)) (home-page "https://docs.tryton.org/projects/modules-purchase-history") @@ -2871,19 +3468,19 @@ time the purchase is reset to draft.") (define-public trytond-purchase-invoice-line-standalone (package (name "trytond-purchase-invoice-line-standalone") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_invoice_line_standalone" version)) (sha256 - (base32 "169y69an6i796m8bmp8sanfn0qh7bcws8nangp96q07dsv51wrvb")))) - (build-system python-build-system) + (base32 "1djvnlqlhc3q77r07il8hx5j13qzjdnwfxfnrj3sf8nkpdbi12ac")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_invoice_line_standalone")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice-line-standalone - trytond-purchase)) + trytond-party trytond-purchase)) (home-page "https://docs.tryton.org/projects/modules-purchase-invoice-line-standalone") (synopsis "Tryton module for standalone invoice line from purchase") @@ -2894,21 +3491,22 @@ makes purchase to generate invoice lines instead of invoices.") (define-public trytond-purchase-price-list (package (name "trytond-purchase-price-list") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_price_list" version)) (sha256 - (base32 "0xqry794l9vy5v5ck0qqy9yli57av4zzmpv1g8f9hkg7lm9ypg0v")))) - (build-system python-build-system) + (base32 "1zpyd9vryh9lwl3n8pnfa222815n7lcmwhs82p734v5l7c9cwfwg")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_price_list")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account trytond-company trytond-party + trytond-product trytond-product-price-list trytond-purchase)) (home-page "https://docs.tryton.org/projects/modules-purchase-price-list") @@ -2917,20 +3515,48 @@ makes purchase to generate invoice lines instead of invoices.") lists to be defined for suppliers.") (license license:gpl3+))) +(define-public trytond-purchase-product-quantity + (package + (name "trytond-purchase-product-quantity") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_purchase_product_quantity" version)) + (sha256 + (base32 "0q1paxi1ppdc1qim389nixl483hd8whrgv6ck554f4008v4dpj8r")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "purchase_product_quantity")) + (native-inputs + (cons* trytond-stock-supply + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-product + trytond-purchase + trytond-purchase-request)) + (home-page "https://docs.tryton.org/projects/modules-purchase-product-quantity") + (synopsis "Tryton module to add quantity constraints on purchase lines") + (description "The @emph{Purchase Product Quantity} Tryton module permits +to enforce the minimal and the rounding of quantity purchased per supplier +from purchase request.") + (license license:gpl3+))) + (define-public trytond-purchase-request (package (name "trytond-purchase-request") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_request" version)) (sha256 - (base32 "0as8lb6bgjigpg926fjfyfy25758m45ihl1xish5vlfcxmccpyn3")))) - (build-system python-build-system) - ;; Doctest 'scenario_purchase_request.rst' fails. - (arguments (tryton-arguments "purchase_request" "--no-doctest")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0s6i8s0s3k8wj2xkyncfnn9zd4l7d73wyz7x6glqyjx7x69qc74p")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "purchase_request")) + (native-inputs + (cons* trytond-stock-supply-bootstrap + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product trytond-purchase)) (home-page "https://www.tryton.org/") @@ -2941,25 +3567,21 @@ Purchase Requests which are central points to collect purchase requests generated by other process from Tryton.") (license license:gpl3+))) -(define-public python-trytond-purchase-request - (deprecated-package - "python-trytond-purchase-request" trytond-purchase-request)) - (define-public trytond-purchase-request-quotation (package (name "trytond-purchase-request-quotation") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_request_quotation" version)) (sha256 - (base32 "08kcp88lfn8aa92cd07x5i5xbjznqy0x9lr34f07ky0i26nrnn72")))) - (build-system python-build-system) + (base32 "176p3yslqhn75a5nkkgzqsbrbb247b52za7ydrhd20dylid24g6s")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_request_quotation")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-purchase-requisition" ,trytond-purchase-requisition))) + (cons* trytond-purchase-requisition + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company @@ -2979,16 +3601,16 @@ supplier.") (define-public trytond-purchase-requisition (package (name "trytond-purchase-requisition") - (version "6.2.0") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_requisition" version)) (sha256 - (base32 "0wm4xrxklwd5bbdzlwr5ca4h0zm6jx9pm08mspk15nbvf23qz5n3")))) - (build-system python-build-system) + (base32 "000n2fhx38yxxg6czsd2ir1qlb4fv0zx720w4p6lfi8g3xgri01c")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_requisition")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company @@ -3010,20 +3632,23 @@ be created.") (define-public trytond-purchase-secondary-unit (package (name "trytond-purchase-secondary-unit") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_secondary_unit" version)) (sha256 - (base32 "04fnrim6dimrd63rqbqginlklpih7sb4x3zai5idxjn6hc1l398y")))) - (build-system python-build-system) + (base32 "1sg7jc9aw1wa7xbhn2l4g6b8q161zf4118jfy1i6968dx6z2ask7")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_secondary_unit")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice-secondary-unit" - ,trytond-account-invoice-secondary-unit) - ("trytond-stock-secondary-unit" ,trytond-stock-secondary-unit))) + (cons* trytond-account-invoice-secondary-unit + trytond-purchase-amendment + trytond-purchase-blanket-agreement + trytond-purchase-request + trytond-purchase-requisition + trytond-stock-secondary-unit + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-invoice trytond-product trytond-purchase trytond-stock)) @@ -3041,24 +3666,24 @@ the product with its factor against the purchase unit.") (define-public trytond-purchase-shipment-cost (package (name "trytond-purchase-shipment-cost") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_purchase_shipment_cost" version)) (sha256 - (base32 "1xpkqicv32vrhi89wpn073bc58x6xl189yv0f7h1i9m9q613w9ps")))) - (build-system python-build-system) + (base32 "1mvn0cwr5c9ndrghir7yd9djvdlk4sshnlq0qxw9wp613qlcwp6x")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "purchase_shipment_cost")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice-stock" ,trytond-account-invoice-stock) - ("trytond-account-stock-anglo-saxon" ,trytond-account-stock-anglo-saxon) - ("trytond-account-stock-continental" ,trytond-account-stock-continental) - ("trytond-purchase" ,trytond-purchase))) + (cons* trytond-account-invoice-stock + trytond-account-stock-anglo-saxon + trytond-account-stock-continental + trytond-purchase + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-carrier trytond-currency trytond-product - trytond-stock)) + trytond-stock trytond-stock-shipment-cost)) (home-page "https://docs.tryton.org/projects/modules-purchase-shipment-cost") (synopsis "Tryton module for purchase shipment costs") @@ -3066,19 +3691,46 @@ the product with its factor against the purchase unit.") shipment costs to Supplier Shipment.") (license license:gpl3+))) +(define-public trytond-quality + (package + (name "trytond-quality") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_quality" version)) + (sha256 + (base32 "04w50icp1bqn6ybmvdl0hxnmizsjjj1jnhkid51w8s0phlwdlvrc")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "quality")) + (native-inputs + (cons* trytond-production + trytond-stock + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-company + trytond-product)) + (home-page "https://docs.tryton.org/projects/modules-quality") + (synopsis "Tryton module for quality management") + (description "The @emph{Quality} Tryton module enables quality to be +controlled by configuring control points and inspecting against these when +certain operations are performed.") + (license license:gpl3+))) + (define-public trytond-sale (package (name "trytond-sale") - (version "6.2.4") + (version "7.0.15") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale" version)) (sha256 - (base32 "124cx2h93dw61rnavc2q7isjy9008qc379g82myihq9gh4z6rbpr")))) - (build-system python-build-system) + (base32 "171ihl762iizlyvhn4zvg52waffsaxr9yh7d7gy4vsdciym6vm8k")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -3103,21 +3755,25 @@ to be generated that contain aggregated sales figures.") (define-public trytond-sale-advance-payment (package (name "trytond-sale-advance-payment") - (version "6.2.0") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_advance_payment" version)) (sha256 - (base32 "00rlg4jax212qha2w6acris7knj3b17a0rrlm7xyw0bp2vfzgb69")))) - (build-system python-build-system) + (base32 "08qcfa5sif1a3l02f5vr5668bzca8mndg0h917r2x43z6gd1g8z9")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_advance_payment")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-supply" ,trytond-sale-supply))) + (cons* trytond-sale-supply + %standard-trytond-native-inputs)) (propagated-inputs - (list python-simpleeval trytond trytond-account - trytond-account-invoice trytond-sale)) + (list python-simpleeval + trytond + trytond-account + trytond-account-invoice + trytond-company + trytond-sale)) (home-page "https://docs.tryton.org/projects/modules-sale-advance-payment") (synopsis "Tryton module for sale advance payment") @@ -3128,16 +3784,16 @@ for advance payment management on the sale.") (define-public trytond-sale-amendment (package (name "trytond-sale-amendment") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_amendment" version)) (sha256 - (base32 "0mrnqlgihkvn4z2p1k90c9cha8kqa28ss1ycjzsalxmngnw27hfg")))) - (build-system python-build-system) + (base32 "0p4v44hcby6s7l07hzdxj5z8lzb4xn4r4z5j1rlnkfvgccgmfvpc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_amendment")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-sale trytond-sale-history trytond-stock)) @@ -3148,19 +3804,46 @@ sales that are being processed and keep track of the changes. An amendment is composed of action lines which can:") (license license:gpl3+))) +(define-public trytond-sale-blanket-agreement + (package + (name "trytond-sale-blanket-agreement") + (version "7.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_blanket_agreement" version)) + (sha256 + (base32 "0ai58qmyqrn89ppbrnsqclss5kf4hr5y2gpa9s0xs1cicn367w8f")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_blanket_agreement")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-company + trytond-currency + trytond-party + trytond-product + trytond-sale)) + (home-page "https://docs.tryton.org/projects/modules-sale-blanket-agreement") + (synopsis "Tryton module for sale blanket agreements") + (description "The @emph{Sale Blanket Agreement} Tryton module manages +long-term contracts with customers to sell a specific quantity of products +with multiple orders over a period.") + (license license:gpl3+))) + (define-public trytond-sale-complaint (package (name "trytond-sale-complaint") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_complaint" version)) (sha256 - (base32 "172650xyn2k1ay6jd4vy6f71s9rfv8qalfx9j8jz0i4cn320z272")))) - (build-system python-build-system) + (base32 "18840gqa97bmw6yksy18a65qn3lidcy2vn5h35mp1pzq6rb5rc6i")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_complaint")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-company trytond-party trytond-sale)) @@ -3173,16 +3856,16 @@ composed of action lines which can:") (define-public trytond-sale-credit-limit (package (name "trytond-sale-credit-limit") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_credit_limit" version)) (sha256 - (base32 "0rx3zi0m4cbpbmjlzkii08424yz68y31nqqkgj6rl9swaqins67h")))) - (build-system python-build-system) + (base32 "15lkdvhxhr3wk9s20g2ypaqmal4kc0cr40gj51jamfqj8s1yj79p")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_credit_limit")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-credit-limit @@ -3200,16 +3883,16 @@ credit limit of the party when confirming a sale.") (define-public trytond-sale-discount (package (name "trytond-sale-discount") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_discount" version)) (sha256 - (base32 "1kbfbd5rmvaaf5wwvb1akxf7zij1bqpzx2s0dahjxcihxwwra2ib")))) - (build-system python-build-system) + (base32 "1hqxa97dpqy9b4cpvh977scfrjyk6kmkvlyy8xi7cdwam02miwim")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_discount")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-sale)) (home-page "https://docs.tryton.org/projects/modules-sale-discount") @@ -3221,16 +3904,16 @@ line.") (define-public trytond-sale-extra (package (name "trytond-sale-extra") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_extra" version)) (sha256 - (base32 "0j9ya68p6bfyr2ixh1dqfqnmfa4mn5ayf9hn5pfm2z7nih8bys3r")))) - (build-system python-build-system) + (base32 "1vvw7h2q0c6ifbwl3z60sna022npsqby29hrxcpgd5izcphk8jja")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_extra")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company @@ -3247,23 +3930,24 @@ on sale based on criteria.") (define-public trytond-sale-gift-card (package (name "trytond-sale-gift-card") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_gift_card" version)) (sha256 - (base32 "0r395qj178f39lip8mkwhn9lakkh3700hlpcsd208d8wqqqmbf1n")))) - (build-system python-build-system) + (base32 "1brfyrdd3j1lk8accdjv1jx6ila0rbskjjhlg0vv2jflwq81hpvn")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_gift_card")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-point" ,trytond-sale-point))) + (cons* trytond-sale-point + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-account-invoice trytond-company + trytond-currency trytond-product trytond-sale trytond-stock)) @@ -3276,16 +3960,18 @@ and redeeming of gift cards.") (define-public trytond-sale-history (package (name "trytond-sale-history") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_history" version)) (sha256 - (base32 "0snjdbhq5mf8j7z6i6yqk3kjl3mpjsdzwnh5bzcnax2n4zrscvxq")))) - (build-system python-build-system) + (base32 "1adi6hvlpmg036h29zjzj6aismcvh9dk94acmk12bg7qv4zw9imx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_history")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-sale-subscription + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-sale)) (home-page "https://docs.tryton.org/projects/modules-sale-history") @@ -3295,19 +3981,42 @@ historization of the sale and adds a revision counter which increases each time the sale is reset to draft.") (license license:gpl3+))) +(define-public trytond-sale-invoice-date + (package + (name "trytond-sale-invoice-date") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_invoice_date" version)) + (sha256 + (base32 "0ssc87by1hinxckcma99hlngy1r9is84svccy1zrvqdif06pjfqp")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_invoice_date")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-party + trytond-sale)) + (home-page "https://docs.tryton.org/projects/modules-sale-invoice-date") + (synopsis "Tryton module to compute the invoice date of sale") + (description "The @emph{Sale Invoice Date} Tryton module fills the invoice +date of invoices created by sales.") + (license license:gpl3+))) + (define-public trytond-sale-invoice-grouping (package (name "trytond-sale-invoice-grouping") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_invoice_grouping" version)) (sha256 - (base32 "1c70s1lnxzhg6yqv7vjxyqvxp4myh26i9hnnf1k045d6hwf80hvf")))) - (build-system python-build-system) + (base32 "06awrzvq8c4v7133by95njiq1n3j85x362r4fhb6z7fyrn03kzx6")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_invoice_grouping")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-invoice trytond-party trytond-sale)) (home-page @@ -3320,26 +4029,24 @@ option to define how invoice lines generated from sales will be grouped.") (define-public trytond-sale-opportunity (package (name "trytond-sale-opportunity") - (version "6.2.0") + (version "7.0.5") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_opportunity" version)) (sha256 - (base32 "05zliwc39zandn7amjzf1n7fqxq7yrwrx5b418ikh09pfz4alq21")))) - (build-system python-build-system) + (base32 "1r2xa0y60yc4f13w0pm7w48jnwh60hrn2w4jld251wjf56cb1yjr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_opportunity")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond - trytond-account trytond-account-invoice trytond-company trytond-currency trytond-party trytond-product - trytond-sale - trytond-stock)) + trytond-sale)) (home-page "https://docs.tryton.org/projects/modules-sale-opportunity") (synopsis "Tryton module with leads and opportunities") (description "The @emph{Sale Opportunity} Tryton module defines the @@ -3349,20 +4056,22 @@ lead/opportunity model.") (define-public trytond-sale-payment (package (name "trytond-sale-payment") - (version "6.2.1") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_payment" version)) (sha256 - (base32 "02zq3smfj55n70kqgipi2q869lp7hlfm0qbw74qx7pina28pipf4")))) - (build-system python-build-system) + (base32 "03rd22bim95z9frpmvb5vk2h2p4pybbds3jy3y8rkz3vhizv61j4")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_payment")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-payment-clearing" ,trytond-account-payment-clearing))) + (cons* trytond-account-payment-clearing + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-account-invoice trytond-account-payment + (list trytond + trytond-account-invoice + trytond-account-payment trytond-sale)) (home-page "https://docs.tryton.org/projects/modules-sale-payment") (synopsis "Tryton module that manage payments on sale") @@ -3373,24 +4082,24 @@ payments prior to the creation of any invoice.") (define-public trytond-sale-point (package (name "trytond-sale-point") - (version "6.2.2") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_point" version)) (sha256 - (base32 "0brysadw75rm80yk66wq68gqkyb28zk65sw530fyacx9ma0sq0pj")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_sale_point")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-sql - trytond - trytond-account - trytond-account-product - trytond-company - trytond-party - trytond-product - trytond-sale - trytond-stock)) + (base32 "1b7jjs14h6n8vipj5wyk07jaa5i71nb1x0x8g1zwgzh49k6pjl9l")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_point")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account + trytond-account-product + trytond-company + trytond-party + trytond-product + trytond-sale + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-sale-point") (synopsis "Tryton module for Point of Sales") (description "The @emph{Sale Point} Tryton module allows retail sales to @@ -3400,16 +4109,16 @@ be handled and recorded.") (define-public trytond-sale-price-list (package (name "trytond-sale-price-list") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_price_list" version)) (sha256 - (base32 "037h107wl3p3ig9w8db2878x80gzdf4dsa9wjrrcxdaz7yp7iwhn")))) - (build-system python-build-system) + (base32 "0r0rklqqa8aw97yk910l4vzx953a3q4hlbn53l22pq0f30j2gqlf")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_price_list")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company trytond-party trytond-product-price-list trytond-sale)) @@ -3422,18 +4131,19 @@ price list on sale. A price list can be set per party or as default.") (define-public trytond-sale-product-customer (package (name "trytond-sale-product-customer") - (version "6.2.2") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_product_customer" version)) (sha256 - (base32 "01nyhimg00z33zzlxyg8incpfbgcqa7svmzzv5n0x2dafnx5n7wl")))) - (build-system python-build-system) + (base32 "0zgzkif68sf9klpdp88rmns9ga5c3ir0jkg88yqa5gv3rma3sh3a")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_product_customer")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-amendment" ,trytond-sale-amendment))) + (cons* trytond-sale-amendment + trytond-sale-blanket-agreement + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product trytond-sale)) (home-page @@ -3443,23 +4153,102 @@ price list on sale. A price list can be set per party or as default.") customer's names and codes for products or variants.") (license license:gpl3+))) +(define-public trytond-sale-product-quantity + (package + (name "trytond-sale-product-quantity") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_product_quantity" version)) + (sha256 + (base32 "1k1mi0iiw1xqm3sjywzfq61whc9kwsv09248m31y9k1r0qx0zxh7")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_product_quantity")) + (native-inputs + (cons* trytond-sale-point + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-product + trytond-sale)) + (home-page "https://docs.tryton.org/projects/modules-sale-product-quantity") + (synopsis "Tryton module to add quantity constraints on sale lines") + (description "The @emph{Sale Product Quantity} Tryton module permits +enforcing the minimal and the rounding of quantity sold per product.") + (license license:gpl3+))) + +(define-public trytond-sale-product-recommendation + (package + (name "trytond-sale-product-recommendation") + (version "7.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_product_recommendation" version)) + (sha256 + (base32 "11s8i76p6743xx1m0h0hslvzw4cj190m3hdpsv6id5prgragx9sk")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_product_recommendation")) + (native-inputs + (cons* trytond-sale-point + %standard-trytond-native-inputs)) + (propagated-inputs + (list trytond + trytond-product + trytond-sale)) + (home-page "https://docs.tryton.org/projects/modules-sale-product-recommendation") + (synopsis "Tryton module for product recommendations") + (description "The @emph{Sale Product Recommendation} Tryton module +provides facilities to implement recommendation of products on sale.") + (license license:gpl3+))) + +(define-public trytond-sale-product-recommendation-association-rule + (package + (name "trytond-sale-product-recommendation-association-rule") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_product_recommendation_association_rule" version)) + (sha256 + (base32 "0d59811an015s8lfv4i5dflkg8fbvn937y81shn6wxndrrm32z4a")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_product_recommendation_association_rule")) + (native-inputs + (cons* trytond-sale-point + %standard-trytond-native-inputs)) + (propagated-inputs + (list python-efficient-apriori + trytond trytond-product + trytond-sale + trytond-sale-product-recommendation)) + (home-page + "https://docs.tryton.org/projects/modules-sale-product-recommendation-association-rule") + (synopsis "Tryton module to learn association rule for recommendations") + (description "The @emph{Sale Product Recommendation Association Rule} +Tryton module implements recommendation based on association rule learning +from previous sales.") + (license license:gpl3+))) + (define-public trytond-sale-promotion (package (name "trytond-sale-promotion") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_promotion" version)) (sha256 - (base32 "1nd4f5j25v3g25hr0xr6kqzv0rqavnwkc5wyn8r0if1y9b2scwnc")))) - (build-system python-build-system) + (base32 "1vc7ij8pgnfgp5w557kf1lnbir5xcq1i6zqhvv9pa0rpnrsmnh5z")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_promotion")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-simpleeval trytond trytond-company + trytond-currency trytond-product trytond-product-price-list trytond-sale @@ -3473,18 +4262,21 @@ on a sale based on criteria.") (define-public trytond-sale-promotion-coupon (package (name "trytond-sale-promotion-coupon") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_promotion_coupon" version)) (sha256 - (base32 "18086y4xszb5iq6v5ibq3kylzc3b8zbyn6pn6pm61mdbdpqav7mg")))) - (build-system python-build-system) + (base32 "1xywa7b3mfq6x9xzmxdxr3j5i5vy91wjxmf1f2s3q8hya92djjnr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_promotion_coupon")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-sale trytond-sale-promotion)) + (list trytond + trytond-company + trytond-sale + trytond-sale-promotion)) (home-page "https://docs.tryton.org/projects/modules-sale-promotion-coupon") (synopsis "Tryton module for sale promotion coupon") @@ -3492,24 +4284,48 @@ on a sale based on criteria.") to the promotions.") (license license:gpl3+))) +(define-public trytond-sale-promotion-coupon-payment + (package + (name "trytond-sale-promotion-coupon-payment") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_sale_promotion_coupon_payment" version)) + (sha256 + (base32 "051jgg0pid8rsk8987q0vfx1xiixvh65rzl9bcgdzj7kl8fxlssp")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "sale_promotion_coupon_payment")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-account-payment + trytond-sale-promotion-coupon)) + (home-page "https://docs.tryton.org/projects/modules-sale-promotion-coupon-payment") + (synopsis "Tryton module to link payments with coupons") + (description "The @emph{Sale Promotion Coupon Payment} Tryton module +includes the identical parties from the payments to count usage per party.") + (license license:gpl3+))) + (define-public trytond-sale-secondary-unit (package (name "trytond-sale-secondary-unit") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_secondary_unit" version)) (sha256 - (base32 "0as7vc8wp2i3402h5r90zg6170y3av41a6k5ivdfbaxlhsjq8lxa")))) - (build-system python-build-system) + (base32 "1pd3a4ykjyiipacy0pksv30mb6kf7n203mp6qh8jn4c2wwvjn06g")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_secondary_unit")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-account-invoice-secondary-unit" - ,trytond-account-invoice-secondary-unit) - ("trytond-sale-product-customer" ,trytond-sale-product-customer) - ("trytond-stock-secondary-unit" ,trytond-stock-secondary-unit))) + (cons* trytond-account-invoice-secondary-unit + trytond-sale-amendment + trytond-sale-blanket-agreement + trytond-sale-product-customer + trytond-stock-secondary-unit + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-invoice trytond-product trytond-sale trytond-stock)) @@ -3524,19 +4340,22 @@ unit is defined on the product with its factor against the sale unit.") (define-public trytond-sale-shipment-cost (package (name "trytond-sale-shipment-cost") - (version "6.2.2") + (version "7.0.7") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_shipment_cost" version)) (sha256 - (base32 "1r6jcsfxa2q448ks5s23apbj3b35rc5596qk7f3hzwiw6nm168k5")))) - (build-system python-build-system) + (base32 "011hjaqwd3m4ncz15rs3czp8rcwcr4ak4rjzb15zznb0ghkz1kgx")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_shipment_cost")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-sale-promotion" ,trytond-sale-promotion) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-account + trytond-party + trytond-sale-promotion + trytond-sale-shipment-grouping + trytond-stock + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-invoice @@ -3544,7 +4363,8 @@ unit is defined on the product with its factor against the sale unit.") trytond-currency trytond-product trytond-sale - trytond-stock)) + trytond-stock + trytond-stock-shipment-cost)) (home-page "https://docs.tryton.org/projects/modules-sale-shipment-cost") (synopsis "Tryton module for sale shipment cost") (description "The @emph{Sale Shipment Cost} Tryton module adds shipment @@ -3554,16 +4374,16 @@ cost for sale.") (define-public trytond-sale-shipment-grouping (package (name "trytond-sale-shipment-grouping") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_shipment_grouping" version)) (sha256 - (base32 "0v8inxsgdhmkiaj0l3c2gjzbs96qbbxmbw67f14mx9axjvcvkkwy")))) - (build-system python-build-system) + (base32 "1hb4h00xsx9r6cri6c5ys7gx0181h8lv2q366djsxfsci76zim8g")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_shipment_grouping")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-party trytond-sale trytond-stock)) (home-page @@ -3576,16 +4396,16 @@ define how stock moves generated from sales will be grouped.") (define-public trytond-sale-shipment-tolerance (package (name "trytond-sale-shipment-tolerance") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_shipment_tolerance" version)) (sha256 - (base32 "1vggdhnfg05dad2gmyi49ydhrq3sjqva4shn9zygj8fyjpkppx2y")))) - (build-system python-build-system) + (base32 "0cqia2qlf6f6yjn673amicjraggb59z0g00cbrdfpyv4g2zgv6qr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_shipment_tolerance")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-sale trytond-stock)) (home-page @@ -3602,18 +4422,18 @@ raised.") (define-public trytond-sale-stock-quantity (package (name "trytond-sale-stock-quantity") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_stock_quantity" version)) (sha256 - (base32 "0bn06a752rp16ki5xa0dr3in5xj1hry6020qgz6mji8kxl24v7sv")))) - (build-system python-build-system) + (base32 "0q5kffgg8cpgwyzn283aghrqbqsnjayvq70q9va2khqnjbl1h9rh")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_stock_quantity")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-stock-supply" ,trytond-stock-supply))) + (cons* trytond-stock-supply + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product trytond-sale trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-sale-stock-quantity") @@ -3628,16 +4448,16 @@ stock forecasts.") (define-public trytond-sale-subscription (package (name "trytond-sale-subscription") - (version "6.2.0") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_subscription" version)) (sha256 - (base32 "095zdy6031lqffm3yddhsrv93dl2dgqjpbskp539knvd72bdaqdd")))) - (build-system python-build-system) + (base32 "1jdpg6g8w0q5slsfdzz6bkacv78x4gw5nr2afi7m9givqr8vivrm")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_subscription")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -3655,16 +4475,16 @@ services and recurrence rule models.") (define-public trytond-sale-subscription-asset (package (name "trytond-sale-subscription-asset") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_subscription_asset" version)) (sha256 - (base32 "0bkksk3l3ydxmqglsrrqgwgrak6iwc740vmj0dpw93h4f127haiv")))) - (build-system python-build-system) + (base32 "1xg9wypsmv701w7mv49mw8glgkhfbvijsx97n0fr23h7w9pm7lnr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_subscription_asset")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-sale-subscription trytond-stock-lot)) (home-page @@ -3677,16 +4497,18 @@ notion of asset to the sale subscription module.") (define-public trytond-sale-supply (package (name "trytond-sale-supply") - (version "6.2.0") + (version "7.0.6") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_supply" version)) (sha256 - (base32 "05ik819spy8jmc5k10mki6kxdjxdqrr4x0g3rgvvlnmadn5igykf")))) - (build-system python-build-system) + (base32 "0rgyrimkfali4ak7b0052rp3m8m07qk1fhd10vi98zynz5bqs73g")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_supply")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-stock-supply + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-purchase trytond-purchase-request trytond-sale trytond-stock)) @@ -3703,16 +4525,19 @@ supply method.") (define-public trytond-sale-supply-drop-shipment (package (name "trytond-sale-supply-drop-shipment") - (version "6.2.1") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_supply_drop_shipment" version)) (sha256 - (base32 "1i3a8amm3nacc7wis3amr4z9pl47sjzy7gds5qv1xg3fl1awm4ic")))) - (build-system python-build-system) + (base32 "04ydxw9jqbq07z5hl4aw31riyp9pv097v50zg9i4d7j2aykkldir")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_supply_drop_shipment")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-sale-amendment + trytond-stock-split + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company @@ -3735,16 +4560,16 @@ shipment is created and linked to both the purchase and the sale.") (define-public trytond-sale-supply-production (package (name "trytond-sale-supply-production") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_sale_supply_production" version)) (sha256 - (base32 "08ky3mqprlqyksw91mqlb7mjkfpdrgzgnc862wm2q28s0aydn3dv")))) - (build-system python-build-system) + (base32 "062nmykl8q9cypza05rr9japx2z0h63310m78qkbwnqvmlfih8jn")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "sale_supply_production")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-production trytond-sale-supply)) (home-page @@ -3761,16 +4586,16 @@ back to the default supply method.") (define-public trytond-stock (package (name "trytond-stock") - (version "6.2.7") + (version "7.0.16") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock" version)) (sha256 - (base32 "02klx6qk2vrwiynxcdjnpqx593wr1wjg9sygh5zjzrqqwmjb16yi")))) - (build-system python-build-system) + (base32 "0kbp2s6dn8dp8h8pjasqylr8adicz52z02cqc6bpxr529aj7sa55")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list python-simpleeval trytond @@ -3787,24 +4612,21 @@ between these locations, shipments for product arrivals and departures and inventory to control and update stock levels.") (license license:gpl3+))) -(define-public python-trytond-stock - (deprecated-package "python-trytond-stock" trytond-stock)) - (define-public trytond-stock-assign-manual (package (name "trytond-stock-assign-manual") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_assign_manual" version)) (sha256 - (base32 "0jn5rbbgmr7jnddrbmy49r2vpfbbfsrgx1bkgjkg687d922lwnrh")))) - (build-system python-build-system) + (base32 "0rh6fap18m0pglc0rpvwy0px8gxkj5cy93pln9b2d98saxndiirc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_assign_manual")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-production" ,trytond-production))) + (cons* trytond-production + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-assign-manual") @@ -3817,18 +4639,18 @@ location to pick products.") (define-public trytond-stock-consignment (package (name "trytond-stock-consignment") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_consignment" version)) (sha256 - (base32 "0c26gvqmh98hj7zp1kx3q30wdwnvy8j101m9kmsi21j9n2nw7maj")))) - (build-system python-build-system) + (base32 "0q8kszbcndm58x6yngyi1phqqzmsd9rawv6rdc00q8x4xyjsc9wr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_consignment")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-stock-supply" ,trytond-stock-supply))) + (cons* trytond-stock-supply + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account-invoice @@ -3847,18 +4669,21 @@ consignment stock from supplier or at customer warehouse.") (define-public trytond-stock-forecast (package (name "trytond-stock-forecast") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_forecast" version)) (sha256 - (base32 "19w4q71rm4j0rlsdp6d2ykyjcdkrvq5mjlprsdk6890dmnxm6czx")))) - (build-system python-build-system) + (base32 "0avj0j3aphfqr97j7yy5kx2xz1znlf2bsls7c6dxkxwmr9k8p6w0")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_forecast")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-company trytond-product trytond-stock)) + (list trytond + trytond-company + trytond-product + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-forecast") (synopsis "Tryton module with stock forecasts") (description "The @emph{Stock Forecast} Tryton module provide a simple way @@ -3869,16 +4694,16 @@ other stock mechanisms to anticipate customer demand.") (define-public trytond-stock-inventory-location (package (name "trytond-stock-inventory-location") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_inventory_location" version)) (sha256 - (base32 "1x35rq6hzxb9wzsflvlsbl1fjgqcp6byrj4rk20fvgbhnv02s4x0")))) - (build-system python-build-system) + (base32 "1z79j28liyrf1wk34vpnqrvv0d9pil74scmghyn6s3d5a0hvaia6")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_inventory_location")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company trytond-product trytond-stock)) (home-page @@ -3891,18 +4716,18 @@ wizard \"Create Inventories\" under the \"Inventories\" sub-menu.") (define-public trytond-stock-location-move (package (name "trytond-stock-location-move") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_location_move" version)) (sha256 - (base32 "07f0xq26wc0vpxf94655gsya3nxsa2xpi6v1c74q5a2qan4gkv9k")))) - (build-system python-build-system) + (base32 "0qm25pa1w7cark6bphxfqvb0rw0zrr3izn7rllzsy4drvnh7ad1k")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_location_move")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-stock-supply" ,trytond-stock-supply))) + (cons* trytond-stock-supply + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-location-move") @@ -3915,16 +4740,16 @@ defining some Locations as movable (define-public trytond-stock-location-sequence (package (name "trytond-stock-location-sequence") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_location_sequence" version)) (sha256 - (base32 "0ab2jf36mmbkg0hrhwrmpjh5m9kpl60mz1gdkb2zhv629z9bxr13")))) - (build-system python-build-system) + (base32 "12ahqcxxfsk5iwxyyx7fz1hplp4yjdrw11ybyd1cdvcx3zsjblag")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_location_sequence")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-stock)) (home-page @@ -3937,42 +4762,46 @@ ordering to location.") (define-public trytond-stock-lot (package (name "trytond-stock-lot") - (version "6.2.0") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_lot" version)) (sha256 - (base32 "0z0ligvgvm2py794sg2ay5r47pm30m890lmfp2jvdr3vjbq3f1a3")))) - (build-system python-build-system) + (base32 "1vgc9j221sp0wrs5c90pl5z5xmi6qdn2jm5s0hpaw94sv883j464")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_lot")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs + (cons* trytond-stock-split + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-product trytond-stock)) + (list trytond + trytond-product + trytond-stock)) (home-page "https://www.tryton.org/") (synopsis "Tryton module for lot of products") (description "This package provides a Tryton module that defines lot of products.") (license license:gpl3+))) -(define-public python-trytond-stock-lot - (deprecated-package "python-trytond-stock-lot" trytond-stock-lot)) - (define-public trytond-stock-lot-sled (package (name "trytond-stock-lot-sled") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_lot_sled" version)) (sha256 - (base32 "14bx84snw6kd896h6gdd825qrg2p7nmm341xl8qvrpn34jq3p2p1")))) - (build-system python-build-system) + (base32 "1bvdd4jlw3rplpqpjl3k34hzlpv4mmahc1ga3qacr3n03w1040sc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_lot_sled")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-product trytond-stock trytond-stock-lot)) + (list trytond + trytond-product + trytond-stock + trytond-stock-lot)) (home-page "https://docs.tryton.org/projects/modules-stock-lot-sled") (synopsis "Tryton module for shelf life expiration date of product lots") (description "The @emph{Stock Lot Sled} Tryton module adds the \"Shelf @@ -3984,18 +4813,18 @@ it is no more used to compute the forecast quantity of the stock.") (define-public trytond-stock-lot-unit (package (name "trytond-stock-lot-unit") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_lot_unit" version)) (sha256 - (base32 "1m6vbz57y0yrjv4z447gggqgcwd6dzk0hrycv5zvbq4h1kscrh6z")))) - (build-system python-build-system) + (base32 "0zpyhspnfbcr45x5c5w8dgz1ssl5z72l36c3w4j05z3c0lxs50vz")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_lot_unit")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-production" ,trytond-production))) + (cons* trytond-production + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-product trytond-stock trytond-stock-lot)) (home-page "https://docs.tryton.org/projects/modules-stock-lot-unit") @@ -4007,18 +4836,21 @@ unit and quantity on stock lot.") (define-public trytond-stock-package (package (name "trytond-stock-package") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package" version)) (sha256 - (base32 "1jy7qz62h29rf10mjr9d9pm6g53ira26m77iccs0cwv3qlrv87rg")))) - (build-system python-build-system) + (base32 "1ambw85d8ibi5b5pki8frc401m5xiyjikwrkqlnbi86h6r3agacc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_package")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-company trytond-product trytond-stock)) + (list trytond + trytond-company + trytond-product + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-package") (synopsis "Tryton module for stock packaging") (description "The @emph{Stock Package} Tryton module allows storing @@ -4028,16 +4860,16 @@ packaging information about customer and supplier return shipments.") (define-public trytond-stock-package-shipping (package (name "trytond-stock-package-shipping") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package_shipping" version)) (sha256 - (base32 "0j902bvkmfhn353z6dgfbik7jh5yps13jz4dq785rqj2ia5az9iq")))) - (build-system python-build-system) + (base32 "1md2rxdgsgblk2vsicr0xx7pjdixc69awy3wsdlq0vxmxaicahfa")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_package_shipping")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-carrier @@ -4057,20 +4889,31 @@ interact with shipping service providers.") (define-public trytond-stock-package-shipping-dpd (package (name "trytond-stock-package-shipping-dpd") - (version "6.2.3") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package_shipping_dpd" version)) (sha256 - (base32 "0q7g5qg9j32kn51yigiahd939k2x9gfsnb8k6kinyc9vhq3anbkx")))) - (build-system python-build-system) - (arguments (tryton-arguments "stock_package_shipping_dpd")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "18sdjrg6p4bjlv2jahial0as3j54r9r6a915fbw6ji7bvrk9ify6")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "stock_package_shipping_dpd" + "-k not scenario_shipping_dpd")) + (native-inputs + (cons* trytond-sale + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs - (list python-pypdf2 trytond trytond-party trytond-product trytond-stock - trytond-stock-package trytond-stock-package-shipping - trytond-stock-shipment-measurements python-zeep)) + (list python-pypdf + python-zeep + trytond + trytond-party + trytond-product + trytond-stock + trytond-stock-package + trytond-stock-package-shipping + trytond-stock-shipment-measurements)) (home-page "https://docs.tryton.org/projects/modules-stock-package-shipping-dpd") (synopsis "DPD connector for the Tryton application platform") @@ -4082,16 +4925,20 @@ different web services, the module supports:") (define-public trytond-stock-package-shipping-mygls (package (name "trytond-stock-package-shipping-mygls") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package_shipping_mygls" version)) (sha256 - (base32 "0pwq720mqv473s5aqib89z5bjdl127l8nqw91prxsna82bm16kv2")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_stock_package_shipping_mygls")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-pypdf2 + (base32 "1qm1a9mkb8w2jaz149zk7rvv7w9s0irmv9fdnwhp3jmxlfrvh7xm")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "stock_package_shipping_mygls" + "-k not scenario_shipping_mygls")) + (native-inputs + (cons* trytond-sale + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) + (propagated-inputs (list python-pypdf trytond trytond-carrier trytond-stock @@ -4107,17 +4954,23 @@ package labels to be generated for shipments using MyGLS webservices.") (define-public trytond-stock-package-shipping-sendcloud (package (name "trytond-stock-package-shipping-sendcloud") - (version "6.2.1") + (version "7.0.3") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package_shipping_sendcloud" version)) (sha256 - (base32 "1hvlyrdz1nv1l06qrdj1np8yfyip8hhw0l7wbin1rab63hbxa8rf")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_stock_package_shipping_sendcloud")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "04jm3ippy3ym79c1akx9fypw7nj80drbywsa3j7aa5bj043jk269")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "stock_package_shipping_sendcloud" + "-k not scenario_shipping_sendcloud")) + (native-inputs + (cons* trytond-sale + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs (list python-requests trytond + trytond-carrier trytond-company trytond-party trytond-product @@ -4136,19 +4989,27 @@ supported carriers.") (define-public trytond-stock-package-shipping-ups (package (name "trytond-stock-package-shipping-ups") - (version "6.2.0") + (version "7.0.5") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_package_shipping_ups" version)) (sha256 - (base32 "198i6fdb9ghcsd7z1cb1f3m261dl9w9hxmzzvs7h51f2lbw07n58")))) - (build-system python-build-system) - (arguments (tryton-arguments "stock_package_shipping_ups")) - (native-inputs (%standard-trytond-native-inputs)) + (base32 "0zpcpfdc0fp258n7kfdmdscal4d922121jxfh6lcgjs5pjfbn8r5")))) + (build-system pyproject-build-system) + ;; doctest requires network and an api key + (arguments (tryton-arguments "stock_package_shipping_ups" + "-k not scenario_shipping_ups")) + (native-inputs + (cons* trytond-sale + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs - (list python-requests + (list python-oauthlib + python-requests + python-requests-oauthlib trytond + trytond-carrier trytond-party trytond-product trytond-stock @@ -4165,20 +5026,30 @@ you to generate the UPS labels per package using the UPS webservices.") (define-public trytond-stock-product-location (package (name "trytond-stock-product-location") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_product_location" version)) (sha256 - (base32 "18r7j40zdbva8rcxyhianjwb7m30db7qf85709kivvbvbk93rabh")))) - (build-system python-build-system) - (arguments (tryton-arguments "stock_product_location")) + (base32 "1pd9qvfzw89c8dx75i2mn23h1gn44mxviji5msm466ig3zi21qhx")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases #$(tryton-phases "stock_product_location") + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; DB_CACHE and pytest don't work together here + (invoke "python" "-m" "unittest" "discover"))))))) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-production" ,trytond-production))) + (cons* trytond-production + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-product trytond-stock)) + (list trytond + trytond-product + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-product-location") (synopsis "Tryton module to add default location on product") @@ -4192,18 +5063,18 @@ warehouse.") (define-public trytond-stock-quantity-early-planning (package (name "trytond-stock-quantity-early-planning") - (version "6.2.2") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_quantity_early_planning" version)) (sha256 - (base32 "04fj6h21kl4ab8vl1w9vhnvsxgjg6qd1gxcf1i6r7pfsbhjz8gfj")))) - (build-system python-build-system) + (base32 "0zk6y57yykm8yb2qnbcypkfaw3a9g0isqz2v6hl21kpxnyz4sicc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_quantity_early_planning")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-production" ,trytond-production))) + (cons* trytond-production + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company trytond-stock)) (home-page @@ -4216,18 +5087,18 @@ reducing stock level by proposing to consume earlier.") (define-public trytond-stock-quantity-issue (package (name "trytond-stock-quantity-issue") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_quantity_issue" version)) (sha256 - (base32 "0ig2lix5qw8ql1gax8dymwc7advmf9x3xc8djhw5sgb8v0bvknrv")))) - (build-system python-build-system) + (base32 "19vpka6czcg4s93wx8r7j4rx4i327gr5fpiys1bwzjyqqpw08apa")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_quantity_issue")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-production" ,trytond-production))) + (cons* trytond-production + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-company trytond-product trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-quantity-issue") @@ -4239,16 +5110,16 @@ stock quantity issues.") (define-public trytond-stock-secondary-unit (package (name "trytond-stock-secondary-unit") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_secondary_unit" version)) (sha256 - (base32 "0ihhgf4xs5rrf12v9mfj4rpsxjrqfl7schp3r66cdmrm0ccnrj29")))) - (build-system python-build-system) + (base32 "0xb85s763yf1icl05f09m4wizk1klby6bqj7addwnld2ycm906ga")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_secondary_unit")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-secondary-unit") @@ -4260,18 +5131,21 @@ secondary unit of measure on the stock move.") (define-public trytond-stock-shipment-cost (package (name "trytond-stock-shipment-cost") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_shipment_cost" version)) (sha256 - (base32 "0abl4lw0mz7c1chv5c5r3341cqcfz49nw00g9y12kxbxib17h3fc")))) - (build-system python-build-system) + (base32 "04v7s9amb225r60zrhlp3kv4xykaws7gwvg1sdvxflq6zkxn0brv")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_shipment_cost")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-carrier trytond-product trytond-stock)) + (list trytond + trytond-carrier + trytond-product + trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-shipment-cost") (synopsis "Tryton module for stock shipment cost") (description "The @emph{Stock Shipment Cost} Tryton Module adds a shipment @@ -4279,23 +5153,50 @@ cost on the outgoing moves which is calculated from the carrier purchase price. This cost is added to the product margin reports.") (license license:gpl3+))) +(define-public trytond-stock-shipment-cost-weight + (package + (name "trytond-stock-shipment-cost-weight") + (version "7.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trytond_stock_shipment_cost_weight" version)) + (sha256 + (base32 "0ayrwalpn2ryis94wgjvaplp9azfjdyzqw331ipvm5s3ayfcbjia")))) + (build-system pyproject-build-system) + (arguments (tryton-arguments "stock_shipment_cost_weight")) + (native-inputs %standard-trytond-native-inputs) + (propagated-inputs + (list trytond + trytond-carrier + trytond-stock-shipment-cost + trytond-stock-shipment-measurements)) + (home-page "https://docs.tryton.org/projects/modules-stock-shipment-cost-weight") + (synopsis "Tryton module to allocate shipment cost \"by weight\"") + (description "The @emph{Stock Shipment Cost Weight} Tryton module adds “by +weight” as allocation method of shipment cost on the carrier.") + (license license:gpl3+))) + (define-public trytond-stock-shipment-measurements (package (name "trytond-stock-shipment-measurements") - (version "6.2.1") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_shipment_measurements" version)) (sha256 - (base32 "0a2p3c1780waa779kx24vpknjr9g6z8097ika9kl047xzdnw4n00")))) - (build-system python-build-system) + (base32 "1w7xaxkqwwgxjlypk1gh1765nd0p28hqnqc4m0qab4r4gl4jgr56")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_shipment_measurements")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-stock-package" ,trytond-stock-package))) + (cons* trytond-stock-package + %standard-trytond-native-inputs)) (propagated-inputs - (list trytond trytond-product trytond-product-measurements + (list trytond + trytond-company + trytond-product + trytond-product-measurements trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-shipment-measurements") @@ -4308,16 +5209,16 @@ measurement and the quantity of their moves.") (define-public trytond-stock-split (package (name "trytond-stock-split") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_split" version)) (sha256 - (base32 "1gqbkncdg084cxfsq7vc4ikvdajd2akbl2ryi3awh5xs7phrpabf")))) - (build-system python-build-system) + (base32 "0hvkk7n160w05xwyjlh11p41q2wg2wq7zylmh7wypbc6k7qx0m2g")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_split")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-stock)) (home-page "https://docs.tryton.org/projects/modules-stock-split") @@ -4331,16 +5232,16 @@ there can be a move with the remaining quantity.") (define-public trytond-stock-supply (package (name "trytond-stock-supply") - (version "6.2.2") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_supply" version)) (sha256 - (base32 "1kb6rnb1xk8hnqr9znfpgh8m66590zqbar62xr7094bwaym2ymaa")))) - (build-system python-build-system) + (base32 "14sckfm145awpx9flcsrfc16yl4wxg2asjsmpz57clm2c6nnrhmr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_supply")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account @@ -4356,22 +5257,33 @@ there can be a move with the remaining quantity.") mechanisms and introduces the concepts of order point.") (license license:gpl3+))) -(define-public python-trytond-stock-supply - (deprecated-package "python-trytond-stock-supply" trytond-stock-supply)) +(define-public trytond-stock-supply-bootstrap + (hidden-package + (package/inherit trytond-stock-supply + (name "trytond-stock-supply-bootstrap") + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (delete 'sanity-check)))) + (propagated-inputs + (modify-inputs (package-propagated-inputs trytond-stock-supply) + (delete "trytond-purchase-request")))))) (define-public trytond-stock-supply-day (package (name "trytond-stock-supply-day") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_supply_day" version)) (sha256 - (base32 "112xzrzw2k4badync2qd9aanvni43nh86qhrdh754f311km5gh7q")))) - (build-system python-build-system) + (base32 "1bh8wn40s6i6agr67zl7a7k4l537haadp8czgvdcwckz3nlh0flq")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_supply_day")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-purchase)) (home-page "https://docs.tryton.org/projects/modules-stock-supply-day") @@ -4385,16 +5297,16 @@ a supplying may happens at any day of the week.") (define-public trytond-stock-supply-forecast (package (name "trytond-stock-supply-forecast") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_supply_forecast" version)) (sha256 - (base32 "0b7d8csjcn74086wgm6cydirsl1ygrd9hysd7l4kmd3jz8bb8dzs")))) - (build-system python-build-system) + (base32 "1wp0ajsxpnw03az5xrhd24lyh64d2w357x6456c622yi4bgg957v")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_supply_forecast")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-stock-forecast trytond-stock-supply)) (home-page @@ -4407,16 +5319,16 @@ forecast into account to compute purchase requests.") (define-public trytond-stock-supply-production (package (name "trytond-stock-supply-production") - (version "6.2.0") + (version "7.0.2") (source (origin (method url-fetch) (uri (pypi-uri "trytond_stock_supply_production" version)) (sha256 - (base32 "03cs9g9yfw885ia03x2lxkpjnh919ynizimvvx1jay62i3adk7a2")))) - (build-system python-build-system) + (base32 "0anghn1h2afv7j6wr4b4ymwwyr1kf7j98l01v857p1q6086k898m")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "stock_supply_production")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-product trytond-production trytond-stock trytond-stock-supply)) @@ -4430,18 +5342,20 @@ supply mechanisms via production request.") (define-public trytond-timesheet (package (name "trytond-timesheet") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_timesheet" version)) (sha256 - (base32 "0lbdb0743mj33vrzrb3fq93d3ksj3395d7q0ivbplp1nn3hrh6sq")))) - (build-system python-build-system) + (base32 "1f4js2aykh68b272mijlqlzphkim2c37qb9dnbgcydqaydvy9025")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "timesheet")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs - (list trytond trytond-company trytond-company-work-time)) + (list trytond + trytond-company + trytond-company-work-time)) (home-page "https://docs.tryton.org/projects/modules-timesheet") (synopsis "Tryton module with timesheets") (description "The @emph{Timesheet} Tryton module allows tracking the time @@ -4453,16 +5367,16 @@ periods.") (define-public trytond-timesheet-cost (package (name "trytond-timesheet-cost") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_timesheet_cost" version)) (sha256 - (base32 "1b1xi7fa371kdsci0naskspvznswb8z8yay7nrzzi8rv622g0cjw")))) - (build-system python-build-system) + (base32 "0j01gmci9kzjlp0jplg3k36hzwa4cws51jxbjlni65szmm4vsvkw")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "timesheet_cost")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-company trytond-party trytond-timesheet)) (home-page "https://docs.tryton.org/projects/modules-timesheet-cost") @@ -4474,16 +5388,16 @@ employee.") (define-public trytond-user-role (package (name "trytond-user-role") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_user_role" version)) (sha256 - (base32 "0kx6vqmhny8xjzm2wsy0kf14ybgcdig1cjhyir9b0v11fbavhbw7")))) - (build-system python-build-system) + (base32 "08mds3hfzwfhk7cgdanhz9p943naqi355ih9w15psri4h87234i1")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "user_role")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-user-role") @@ -4497,23 +5411,26 @@ user for a period of time only.") (define-public trytond-web-shop (package (name "trytond-web-shop") - (version "6.2.0") + (version "7.0.4") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_shop" version)) (sha256 - (base32 "182mawahm74lkns2cpy9lrczhllpa8p8np1d7k9agv9kypaqq582")))) - (build-system python-build-system) + (base32 "19i8c34jcgni6q6fyr0dbfpcbcri9cw2nrwh7j609yspvi4x2was")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "web_shop")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-product-attribute" ,trytond-product-attribute) - ("trytond-product-image" ,trytond-product-image))) + (cons* trytond-account-tax-rule-country + trytond-product-attribute + trytond-product-image + trytond-sale-price-list + %standard-trytond-native-inputs)) (propagated-inputs (list trytond trytond-account trytond-company + trytond-country trytond-currency trytond-product trytond-sale @@ -4528,29 +5445,39 @@ configuration of an online web shop.") (define-public trytond-web-shop-shopify (package (name "trytond-web-shop-shopify") - (version "6.2.2") + (version "7.0.10") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_shop_shopify" version)) (sha256 - (base32 "1nd2wnzr6cibqcsidk0k98iy4vs7dy7crhld60wkbza8pgc23hc4")))) - (build-system python-build-system) - (arguments (tryton-arguments "trytond_web_shop_shopify")) - (native-inputs (%standard-trytond-native-inputs)) - (propagated-inputs (list python-dateutil - python-pyactiveresource - python-shopifyapi - python-sql - trytond - trytond-account-payment - trytond-currency - trytond-party - trytond-product - trytond-product-attribute - trytond-sale - trytond-sale-payment - trytond-stock - trytond-web-shop)) + (base32 "1jfjj52gxp0hrkh43wydaly4czzip4xx0ck39mpnqqla5ax2jq9i")))) + (build-system pyproject-build-system) + ;; doctest requires network and an account at shopify + (arguments + (tryton-arguments "web_shop_shopify" "-k not scenario_web_shop_shopify")) + (native-inputs + (cons* trytond-account-payment-clearing + trytond-customs + trytond-product-image + trytond-product-measurements + trytond-sale-discount + trytond-sale-secondary-unit + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) + (propagated-inputs + (list python-pyactiveresource + python-shopifyapi + trytond + trytond-account-payment + trytond-currency + trytond-party + trytond-product + trytond-product-attribute + trytond-sale + trytond-sale-amendment + trytond-sale-payment + trytond-stock + trytond-web-shop)) (home-page "https://docs.tryton.org/projects/modules-web-shop-shopify") (synopsis "Integrate Tryton with Shopify") (description "The @emph{Web Shop Shopify} Tryton module provides a way to @@ -4561,23 +5488,22 @@ to Shopify, and downloads orders, transactions and creates fulfilments.") (define-public trytond-web-shop-vue-storefront (package (name "trytond-web-shop-vue-storefront") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_shop_vue_storefront" version)) (sha256 - (base32 "18rc77crfdckzxcz5wryqk0iqccm3mx2a6b956274643sa8kbhvs")))) - (build-system python-build-system) + (base32 "051xsffvhigra6xf7vnl9vnsd9d393xg9b2alcfy6h5fz5f2zxcr")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "web_shop_vue_storefront")) (native-inputs - `(,@(%standard-trytond-native-inputs) - ("trytond-carrier" ,trytond-carrier) - ("trytond-product-attribute" ,trytond-product-attribute) - ("trytond-product-image" ,trytond-product-image) - ("trytond-sale-promotion-coupon" ,trytond-sale-promotion-coupon) - ("trytond-sale-shipment-cost" ,trytond-sale-shipment-cost) - ("trytond-stock-shipment-cost" ,trytond-stock-shipment-cost))) + (cons* trytond-carrier + trytond-product-attribute + trytond-product-image + trytond-sale-promotion-coupon + trytond-sale-shipment-cost + %standard-trytond-native-inputs)) (propagated-inputs (list python-elasticsearch python-stdnum @@ -4597,16 +5523,16 @@ Vue Storefront 1.x.") (define-public trytond-web-shop-vue-storefront-stripe (package (name "trytond-web-shop-vue-storefront-stripe") - (version "6.2.0") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_shop_vue_storefront_stripe" version)) (sha256 - (base32 "0qzcflcrkd35da9vb9gl9mnxg7dis1sz9kp9hb6hbnmyjbhdz17k")))) - (build-system python-build-system) + (base32 "1350gyrvx8r845cikvl0p3z9rpnkz2apcqz5blx26pzhdlvkk5x5")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "web_shop_vue_storefront_stripe")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-account-payment-stripe trytond-sale-payment trytond-web-shop trytond-web-shop-vue-storefront)) @@ -4620,16 +5546,16 @@ provides support of Stripe payment for Vue Storefront integration.") (define-public trytond-web-shortener (package (name "trytond-web-shortener") - (version "6.2.1") + (version "7.0.0") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_shortener" version)) (sha256 - (base32 "0mjcp97f5dh6lzgw4yhd7k01jlmaga1jvsc07as1snz9y7r06kpk")))) - (build-system python-build-system) + (base32 "052c4sylpqjgwgk02zy9kq1pdxbnfciga7lf8aip8sxry55n95in")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "web_shortener")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond)) (home-page "https://docs.tryton.org/projects/modules-web-shortener") @@ -4642,16 +5568,16 @@ optionally triggers action.") (define-public trytond-web-user (package (name "trytond-web-user") - (version "6.2.0") + (version "7.0.1") (source (origin (method url-fetch) (uri (pypi-uri "trytond_web_user" version)) (sha256 - (base32 "04b3mb4kxibz073746c90i9k4gsc3vnnk47fcn4wqj2b2wq6smng")))) - (build-system python-build-system) + (base32 "1ww3074ywgvh7rl007m85lndnhywkx71gsi302nxrsvrkjnxjjyc")))) + (build-system pyproject-build-system) (arguments (tryton-arguments "web_user")) - (native-inputs (%standard-trytond-native-inputs)) + (native-inputs %standard-trytond-native-inputs) (propagated-inputs (list trytond trytond-party)) (home-page "https://docs.tryton.org/projects/modules-web-user") diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d9985b4b73..5c58227d0b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -4078,6 +4078,9 @@ be used for realtime video capture via Linux-specific APIs.") "-DENABLE_AJA=OFF" "-DENABLE_QSV11=OFF" "-DENABLE_NVENC=OFF" + ;; <https://github.com/zaphoyd/websocketpp/issues/1157> + ;; Fix: <https://github.com/zaphoyd/websocketpp/pull/1164> + "-DENABLE_WEBSOCKET=OFF" ;; Browser plugin requires cef, but it is not packaged yet. ;; <https://bitbucket.org/chromiumembedded/cef/src/master/> "-DBUILD_BROWSER=OFF")) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 16caf9b978..d65ae04764 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1363,7 +1363,6 @@ of one or more RISC-V harts.") (build-system go-build-system) (arguments (list - #:go go-1.23 #:install-source? #f #:tests? #f ;TODO: tests requrie some set up. #:import-path "github.com/lxc/incus/v6" diff --git a/gnu/tests/foreign.scm b/gnu/tests/foreign.scm index 52ead49a24..4e2f10de43 100644 --- a/gnu/tests/foreign.scm +++ b/gnu/tests/foreign.scm @@ -272,36 +272,42 @@ partition of IMAGE is expected to be on DEVICE." #:localstatedir? #t))) (gexp->derivation name (test tarball)))) -(define debian-12-qcow2 +(define debian-13-qcow2 ;; Image taken from <https://www.debian.org/distrib/>. ;; XXX: Those images are periodically removed from debian.org. (origin (uri - "https://cloud.debian.org/images/cloud/bookworm/20250210-2019/debian-12-nocloud-amd64-20250210-2019.qcow2") + "https://cloud.debian.org/images/cloud/trixie/latest/debian-13-nocloud-amd64.qcow2") (method url-fetch) (sha256 (base32 - "06vlcq2dzgczlyp9lfkkdf3dgvfjp22lh5xz0mnl0bdgzq61sykb")))) + "0g7kcvz2yzr0xchlv5kc8d2rd2lzk4akh02i43i92cmys7q3r05c")))) +;; This test starts failing when derivations in repo for GNU Hello and its dependencies +;; differs from versions in current Guix package. The simple way to fix it is to update +;; Guix package version. (define %test-debian-install (system-test (name "debian-install") (description "Test installation of Guix on Debian using the @file{guix-install.sh} script.") - (value (run-foreign-install-test debian-12-qcow2 name)))) + (value (run-foreign-install-test debian-13-qcow2 name)))) (define archlinux-qcow2 ;; Images generated by <https://gitlab.archlinux.org/archlinux/arch-boxes>; ;; using default mirror mentioned in README there. ;; XXX: These images are removed every ~90 days (origin - (uri "https://geo.mirror.pkgbuild.com/images/v20250615.366044/Arch-Linux-x86_64-basic.qcow2") + (uri "https://geo.mirror.pkgbuild.com/images/v20251015.435734/Arch-Linux-x86_64-basic.qcow2") (method url-fetch) (sha256 (base32 - "11m945cv5hgfa7zgkvd7fqgqfp3vdq3c4bdh3x0ilza36w5xcn1b")))) + "0mlvfsw9ak9b6cl5h0mhs90vqkqd3ha3lx4rv9xg2b510q6656li")))) +;; This test starts failing when derivations in repo for GNU Hello and its dependencies +;; differs from versions in current Guix package. The simple way to fix it is to update +;; Guix package version. (define %test-archlinux-install (system-test (name "archlinux-install") diff --git a/nix/boost/assert.hpp b/nix/boost/assert.hpp deleted file mode 100644 index 754ebb954b..0000000000 --- a/nix/boost/assert.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// -// boost/assert.hpp - BOOST_ASSERT(expr) -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. -// This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. -// -// Note: There are no include guards. This is intentional. -// -// See http://www.boost.org/libs/utility/assert.html for documentation. -// - -#undef BOOST_ASSERT - -#if defined(BOOST_DISABLE_ASSERTS) - -# define BOOST_ASSERT(expr) ((void)0) - -#elif defined(BOOST_ENABLE_ASSERT_HANDLER) - -#include <boost/current_function.hpp> - -namespace boost -{ - -void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined - -} // namespace boost - -#define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) - -#else -# include <assert.h> -# define BOOST_ASSERT(expr) assert(expr) -#endif diff --git a/nix/boost/format.hpp b/nix/boost/format.hpp deleted file mode 100644 index f965f0f33e..0000000000 --- a/nix/boost/format.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream - -// ---------------------------------------------------------------------------- -// format.hpp : primary header -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_HPP -#define BOOST_FORMAT_HPP - -#include <vector> -#include <string> -#include <sstream> -#include <cassert> - -#if HAVE_LOCALE -#include <locale> -#else -#define BOOST_NO_STD_LOCALE -#define BOOST_NO_LOCALE_ISIDIGIT -#include <cctype> -#endif - -#include <boost/format/macros_default.hpp> - - -// **** Forward declarations ---------------------------------- -#include <boost/format/format_fwd.hpp> // basic_format<Ch,Tr>, and other frontends -#include <boost/format/internals_fwd.hpp> // misc forward declarations for internal use - - -// **** Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> ) -#include <boost/format/internals.hpp> - -// **** Format class interface -------------------------------- -#include <boost/format/format_class.hpp> - -// **** Exceptions ----------------------------------------------- -#include <boost/format/exceptions.hpp> - -// **** Implementation ------------------------------------------- -//#include <boost/format/format_implementation.hpp> // member functions - -#include <boost/format/group.hpp> // class for grouping arguments - -#include <boost/format/feed_args.hpp> // argument-feeding functions -//#include <boost/format/parsing.hpp> // format-string parsing (member-)functions - -// **** Implementation of the free functions ---------------------- -//#include <boost/format/free_funcs.hpp> - - -#endif // BOOST_FORMAT_HPP diff --git a/nix/boost/format/exceptions.hpp b/nix/boost/format/exceptions.hpp deleted file mode 100644 index 80da6d5718..0000000000 --- a/nix/boost/format/exceptions.hpp +++ /dev/null @@ -1,96 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// exceptions.hpp -// ------------------------------------------------------------------------------ - - -#ifndef BOOST_FORMAT_EXCEPTIONS_HPP -#define BOOST_FORMAT_EXCEPTIONS_HPP - - -#include <stdexcept> - - -namespace boost { - -namespace io { - -// **** exceptions ----------------------------------------------- - -class format_error : public std::exception -{ -public: - format_error() {} - virtual const char *what() const throw() - { - return "boost::format_error: " - "format generic failure"; - } -}; - -class bad_format_string : public format_error -{ -public: - bad_format_string() {} - virtual const char *what() const throw() - { - return "boost::bad_format_string: " - "format-string is ill-formed"; - } -}; - -class too_few_args : public format_error -{ -public: - too_few_args() {} - virtual const char *what() const throw() - { - return "boost::too_few_args: " - "format-string referred to more arguments than were passed"; - } -}; - -class too_many_args : public format_error -{ -public: - too_many_args() {} - virtual const char *what() const throw() - { - return "boost::too_many_args: " - "format-string referred to less arguments than were passed"; - } -}; - - -class out_of_range : public format_error -{ -public: - out_of_range() {} - virtual const char *what() const throw() - { - return "boost::out_of_range: " - "tried to refer to an argument (or item) number which is out of range, " - "according to the format string."; - } -}; - - -} // namespace io - -} // namespace boost - - -#endif // BOOST_FORMAT_EXCEPTIONS_HPP diff --git a/nix/boost/format/feed_args.hpp b/nix/boost/format/feed_args.hpp deleted file mode 100644 index 3d0b47b4a1..0000000000 --- a/nix/boost/format/feed_args.hpp +++ /dev/null @@ -1,247 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream - -// ---------------------------------------------------------------------------- -// feed_args.hpp : functions for processing each argument -// (feed, feed_manip, and distribute) -// ---------------------------------------------------------------------------- - - -#ifndef BOOST_FORMAT_FEED_ARGS_HPP -#define BOOST_FORMAT_FEED_ARGS_HPP - -#include "boost/format/format_class.hpp" -#include "boost/format/group.hpp" - -#include "boost/throw_exception.hpp" - -namespace boost { -namespace io { -namespace detail { -namespace { - - inline - void empty_buf(BOOST_IO_STD ostringstream & os) { - static const std::string emptyStr; - os.str(emptyStr); - } - - void do_pad( std::string & s, - std::streamsize w, - const char c, - std::ios::fmtflags f, - bool center) - // applies centered / left / right padding to the string s. - // Effects : string s is padded. - { - std::streamsize n=w-s.size(); - if(n<=0) { - return; - } - if(center) - { - s.reserve(w); // allocate once for the 2 inserts - const std::streamsize n1 = n /2, n0 = n - n1; - s.insert(s.begin(), n0, c); - s.append(n1, c); - } - else - { - if(f & std::ios::left) { - s.append(n, c); - } - else { - s.insert(s.begin(), n, c); - } - } - } // -do_pad(..) - - - template<class T> inline - void put_head(BOOST_IO_STD ostream& , const T& ) { - } - - template<class T> inline - void put_head( BOOST_IO_STD ostream& os, const group1<T>& x ) { - os << group_head(x.a1_); // send the first N-1 items, not the last - } - - template<class T> inline - void put_last( BOOST_IO_STD ostream& os, const T& x ) { - os << x ; - } - - template<class T> inline - void put_last( BOOST_IO_STD ostream& os, const group1<T>& x ) { - os << group_last(x.a1_); // this selects the last element - } - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - template<class T> inline - void put_head( BOOST_IO_STD ostream& , T& ) { - } - - template<class T> inline - void put_last( BOOST_IO_STD ostream& os, T& x ) { - os << x ; - } -#endif - - - - -template<class T> -void put( T x, - const format_item& specs, - std::string & res, - BOOST_IO_STD ostringstream& oss_ ) -{ - // does the actual conversion of x, with given params, into a string - // using the *supplied* strinstream. (the stream state is important) - - typedef std::string string_t; - typedef format_item format_item_t; - - stream_format_state prev_state(oss_); - - specs.state_.apply_on(oss_); - - // in case x is a group, apply the manip part of it, - // in order to find width - put_head( oss_, x ); - empty_buf( oss_); - - const std::streamsize w=oss_.width(); - const std::ios::fmtflags fl=oss_.flags(); - const bool internal = (fl & std::ios::internal) != 0; - const bool two_stepped_padding = internal - && ! ( specs.pad_scheme_ & format_item_t::spacepad ) - && specs.truncate_ < 0 ; - - - if(! two_stepped_padding) - { - if(w>0) // handle simple padding via do_pad, not natively in stream - oss_.width(0); - put_last( oss_, x); - res = oss_.str(); - - if (specs.truncate_ >= 0) - res.erase(specs.truncate_); - - // complex pads : - if(specs.pad_scheme_ & format_item_t::spacepad) - { - if( res.size()==0 || ( res[0]!='+' && res[0]!='-' )) - { - res.insert(res.begin(), 1, ' '); // insert 1 space at pos 0 - } - } - if(w > 0) // need do_pad - { - do_pad(res,w,oss_.fill(), fl, (specs.pad_scheme_ & format_item_t::centered) !=0 ); - } - } - else // 2-stepped padding - { - put_last( oss_, x); // oss_.width() may result in padding. - res = oss_.str(); - - if (specs.truncate_ >= 0) - res.erase(specs.truncate_); - - if( res.size() - w > 0) - { // length w exceeded - // either it was multi-output with first output padding up all width.. - // either it was one big arg and we are fine. - empty_buf( oss_); - oss_.width(0); - put_last(oss_, x ); - string_t tmp = oss_.str(); // minimal-length output - std::streamsize d; - if( (d=w - tmp.size()) <=0 ) - { - // minimal length is already >= w, so no padding (cool!) - res.swap(tmp); - } - else - { // hum.. we need to pad (it was necessarily multi-output) - typedef typename string_t::size_type size_type; - size_type i = 0; - while( i<tmp.size() && tmp[i] == res[i] ) // find where we should pad. - ++i; - tmp.insert(i, static_cast<size_type>( d ), oss_.fill()); - res.swap( tmp ); - } - } - else - { // okay, only one thing was printed and padded, so res is fine. - } - } - - prev_state.apply_on(oss_); - empty_buf( oss_); - oss_.clear(); -} // end- put(..) - - -} // local namespace - - - - - -template<class T> -void distribute(basic_format& self, T x) - // call put(x, ..) on every occurence of the current argument : -{ - if(self.cur_arg_ >= self.num_args_) - { - if( self.exceptions() & too_many_args_bit ) - boost::throw_exception(too_many_args()); // too many variables have been supplied ! - else return; - } - for(unsigned long i=0; i < self.items_.size(); ++i) - { - if(self.items_[i].argN_ == self.cur_arg_) - { - put<T> (x, self.items_[i], self.items_[i].res_, self.oss_ ); - } - } -} - -template<class T> -basic_format& feed(basic_format& self, T x) -{ - if(self.dumped_) self.clear(); - distribute<T> (self, x); - ++self.cur_arg_; - if(self.bound_.size() != 0) - { - while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) - ++self.cur_arg_; - } - - // this arg is finished, reset the stream's format state - self.state0_.apply_on(self.oss_); - return self; -} - - -} // namespace detail -} // namespace io -} // namespace boost - - -#endif // BOOST_FORMAT_FEED_ARGS_HPP diff --git a/nix/boost/format/format_class.hpp b/nix/boost/format/format_class.hpp deleted file mode 100644 index 6875623acb..0000000000 --- a/nix/boost/format/format_class.hpp +++ /dev/null @@ -1,135 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// format_class.hpp : class interface -// ------------------------------------------------------------------------------ - - -#ifndef BOOST_FORMAT_CLASS_HPP -#define BOOST_FORMAT_CLASS_HPP - -#include <vector> -#include <string> - -#include <boost/format/format_fwd.hpp> -#include <boost/format/internals_fwd.hpp> - -#include <boost/format/internals.hpp> - -namespace boost { - -class basic_format -{ -public: - typedef std::string string_t; - typedef BOOST_IO_STD ostringstream internal_stream_t; -private: - typedef BOOST_IO_STD ostream stream_t; - typedef io::detail::stream_format_state stream_format_state; - typedef io::detail::format_item format_item_t; - -public: - basic_format(const char* str); - basic_format(const string_t& s); -#ifndef BOOST_NO_STD_LOCALE - basic_format(const char* str, const std::locale & loc); - basic_format(const string_t& s, const std::locale & loc); -#endif // no locale - basic_format(const basic_format& x); - basic_format& operator= (const basic_format& x); - - basic_format& clear(); // empty the string buffers (except bound arguments, see clear_binds() ) - - // pass arguments through those operators : - template<class T> basic_format& operator%(const T& x) - { - return io::detail::feed<const T&>(*this,x); - } - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - template<class T> basic_format& operator%(T& x) - { - return io::detail::feed<T&>(*this,x); - } -#endif - - - // system for binding arguments : - template<class T> - basic_format& bind_arg(int argN, const T& val) - { - return io::detail::bind_arg_body(*this, argN, val); - } - basic_format& clear_bind(int argN); - basic_format& clear_binds(); - - // modify the params of a directive, by applying a manipulator : - template<class T> - basic_format& modify_item(int itemN, const T& manipulator) - { - return io::detail::modify_item_body(*this, itemN, manipulator) ; - } - - // Choosing which errors will throw exceptions : - unsigned char exceptions() const; - unsigned char exceptions(unsigned char newexcept); - - // final output - string_t str() const; - friend BOOST_IO_STD ostream& - operator<< ( BOOST_IO_STD ostream& , const basic_format& ); - - - template<class T> friend basic_format& - io::detail::feed(basic_format&, T); - - template<class T> friend - void io::detail::distribute(basic_format&, T); - - template<class T> friend - basic_format& io::detail::modify_item_body(basic_format&, int, const T&); - - template<class T> friend - basic_format& io::detail::bind_arg_body(basic_format&, int, const T&); - -// make the members private only if the friend templates are supported -private: - - // flag bits, used for style_ - enum style_values { ordered = 1, // set only if all directives are positional directives - special_needs = 4 }; - - // parse the format string : - void parse(const string_t&); - - int style_; // style of format-string : positional or not, etc - int cur_arg_; // keep track of wich argument will come - int num_args_; // number of expected arguments - mutable bool dumped_; // true only after call to str() or << - std::vector<format_item_t> items_; // vector of directives (aka items) - string_t prefix_; // piece of string to insert before first item - - std::vector<bool> bound_; // stores which arguments were bound - // size = num_args OR zero - internal_stream_t oss_; // the internal stream. - stream_format_state state0_; // reference state for oss_ - unsigned char exceptions_; -}; // class basic_format - - -} // namespace boost - - -#endif // BOOST_FORMAT_CLASS_HPP diff --git a/nix/boost/format/format_fwd.hpp b/nix/boost/format/format_fwd.hpp deleted file mode 100644 index 97c55f6684..0000000000 --- a/nix/boost/format/format_fwd.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// format_fwd.hpp : forward declarations, for primary header format.hpp -// ------------------------------------------------------------------------------ - -#ifndef BOOST_FORMAT_FWD_HPP -#define BOOST_FORMAT_FWD_HPP - -#include <string> -#include <iosfwd> - -namespace boost { - -class basic_format; - -typedef basic_format format; - -namespace io { -enum format_error_bits { bad_format_string_bit = 1, - too_few_args_bit = 2, too_many_args_bit = 4, - out_of_range_bit = 8, - all_error_bits = 255, no_error_bits=0 }; - -// Convertion: format to string -std::string str(const basic_format& ) ; - -} // namespace io - - -BOOST_IO_STD ostream& -operator<<( BOOST_IO_STD ostream&, const basic_format&); - - -} // namespace boost - -#endif // BOOST_FORMAT_FWD_HPP diff --git a/nix/boost/format/format_implementation.cc b/nix/boost/format/format_implementation.cc deleted file mode 100644 index aa191afe11..0000000000 --- a/nix/boost/format/format_implementation.cc +++ /dev/null @@ -1,256 +0,0 @@ -// -*- C++ -*- -// Boost general library format --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream - -// ---------------------------------------------------------------------------- -// format_implementation.hpp Implementation of the basic_format class -// ---------------------------------------------------------------------------- - - -#ifndef BOOST_FORMAT_IMPLEMENTATION_HPP -#define BOOST_FORMAT_IMPLEMENTATION_HPP - -#include <boost/throw_exception.hpp> -#include <boost/assert.hpp> -#include <boost/format.hpp> - -namespace boost { - -// -------- format:: ------------------------------------------- -basic_format::basic_format(const char* str) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - items_(), oss_(), exceptions_(io::all_error_bits) -{ - state0_.set_by_stream(oss_); - string_t emptyStr; - if( !str) str = emptyStr.c_str(); - parse( str ); -} - -#ifndef BOOST_NO_STD_LOCALE -basic_format::basic_format(const char* str, const std::locale & loc) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - items_(), oss_(), exceptions_(io::all_error_bits) -{ - oss_.imbue( loc ); - state0_.set_by_stream(oss_); - string_t emptyStr; - if( !str) str = emptyStr.c_str(); - parse( str ); -} - -basic_format::basic_format(const string_t& s, const std::locale & loc) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - items_(), oss_(), exceptions_(io::all_error_bits) -{ - oss_.imbue( loc ); - state0_.set_by_stream(oss_); - parse(s); -} -#endif //BOOST_NO_STD_LOCALE - -basic_format::basic_format(const string_t& s) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - items_(), oss_(), exceptions_(io::all_error_bits) -{ - state0_.set_by_stream(oss_); - parse(s); -} - -basic_format:: basic_format(const basic_format& x) - : style_(x.style_), cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false), - items_(x.items_), prefix_(x.prefix_), bound_(x.bound_), - oss_(), // <- we obviously can't copy x.oss_ - state0_(x.state0_), exceptions_(x.exceptions_) -{ - state0_.apply_on(oss_); -} - -basic_format& basic_format::operator= (const basic_format& x) -{ - if(this == &x) - return *this; - state0_ = x.state0_; - state0_.apply_on(oss_); - - // plus all the other (trivial) assignments : - exceptions_ = x.exceptions_; - items_ = x.items_; - prefix_ = x.prefix_; - bound_=x.bound_; - style_=x.style_; - cur_arg_=x.cur_arg_; - num_args_=x.num_args_; - dumped_=x.dumped_; - return *this; -} - - -unsigned char basic_format::exceptions() const -{ - return exceptions_; -} - -unsigned char basic_format::exceptions(unsigned char newexcept) -{ - unsigned char swp = exceptions_; - exceptions_ = newexcept; - return swp; -} - - -basic_format& basic_format ::clear() - // empty the string buffers (except bound arguments, see clear_binds() ) - // and make the format object ready for formatting a new set of arguments -{ - BOOST_ASSERT( bound_.size()==0 || num_args_ == static_cast<int>(bound_.size()) ); - - for(unsigned long i=0; i<items_.size(); ++i){ - items_[i].state_ = items_[i].ref_state_; - // clear converted strings only if the corresponding argument is not bound : - if( bound_.size()==0 || !bound_[ items_[i].argN_ ] ) items_[i].res_.resize(0); - } - cur_arg_=0; dumped_=false; - // maybe first arg is bound: - if(bound_.size() != 0) - { - while(cur_arg_ < num_args_ && bound_[cur_arg_] ) ++cur_arg_; - } - return *this; -} - -basic_format& basic_format ::clear_binds() - // cancel all bindings, and clear() -{ - bound_.resize(0); - clear(); - return *this; -} - -basic_format& basic_format::clear_bind(int argN) - // cancel the binding of ONE argument, and clear() -{ - if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) - { - if( exceptions() & io::out_of_range_bit ) - boost::throw_exception(io::out_of_range()); // arg not in range. - else return *this; - } - bound_[argN-1]=false; - clear(); - return *this; -} - - - -std::string basic_format::str() const -{ - dumped_=true; - if(items_.size()==0) - return prefix_; - if( cur_arg_ < num_args_) - if( exceptions() & io::too_few_args_bit ) - boost::throw_exception(io::too_few_args()); // not enough variables have been supplied ! - - unsigned long sz = prefix_.size(); - unsigned long i; - for(i=0; i < items_.size(); ++i) - sz += items_[i].res_.size() + items_[i].appendix_.size(); - string_t res; - res.reserve(sz); - - res += prefix_; - for(i=0; i < items_.size(); ++i) - { - const format_item_t& item = items_[i]; - res += item.res_; - if( item.argN_ == format_item_t::argN_tabulation) - { - BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation); - std::streamsize n = item.state_.width_ - res.size(); - if( n > 0 ) - res.append( n, item.state_.fill_ ); - } - res += item.appendix_; - } - return res; -} - -namespace io { -namespace detail { - -template<class T> -basic_format& bind_arg_body( basic_format& self, - int argN, - const T& val) - // bind one argument to a fixed value - // this is persistent over clear() calls, thus also over str() and << -{ - if(self.dumped_) self.clear(); // needed, because we will modify cur_arg_.. - if(argN<1 || argN > self.num_args_) - { - if( self.exceptions() & io::out_of_range_bit ) - boost::throw_exception(io::out_of_range()); // arg not in range. - else return self; - } - if(self.bound_.size()==0) - self.bound_.assign(self.num_args_,false); - else - BOOST_ASSERT( self.num_args_ == static_cast<signed int>(self.bound_.size()) ); - int o_cur_arg = self.cur_arg_; - self.cur_arg_ = argN-1; // arrays begin at 0 - - self.bound_[self.cur_arg_]=false; // if already set, we unset and re-sets.. - self.operator%(val); // put val at the right place, because cur_arg is set - - - // Now re-position cur_arg before leaving : - self.cur_arg_ = o_cur_arg; - self.bound_[argN-1]=true; - if(self.cur_arg_ == argN-1 ) - // hum, now this arg is bound, so move to next free arg - { - while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) ++self.cur_arg_; - } - // In any case, we either have all args, or are on a non-binded arg : - BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]); - return self; -} - -template<class T> -basic_format& modify_item_body( basic_format& self, - int itemN, - const T& manipulator) - // applies a manipulator to the format_item describing a given directive. - // this is a permanent change, clear or clear_binds won't cancel that. -{ - if(itemN<1 || itemN >= static_cast<signed int>(self.items_.size() )) - { - if( self.exceptions() & io::out_of_range_bit ) - boost::throw_exception(io::out_of_range()); // item not in range. - else return self; - } - self.items_[itemN-1].ref_state_.apply_manip( manipulator ); - self.items_[itemN-1].state_ = self.items_[itemN-1].ref_state_; - return self; -} - -} // namespace detail - -} // namespace io - -} // namespace boost - - - -#endif // BOOST_FORMAT_IMPLEMENTATION_HPP diff --git a/nix/boost/format/free_funcs.cc b/nix/boost/format/free_funcs.cc deleted file mode 100644 index 151db37a0a..0000000000 --- a/nix/boost/format/free_funcs.cc +++ /dev/null @@ -1,71 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// free_funcs.hpp : implementation of the free functions declared in namespace format -// ------------------------------------------------------------------------------ - -#ifndef BOOST_FORMAT_FUNCS_HPP -#define BOOST_FORMAT_FUNCS_HPP - -#include "boost/format.hpp" -#include "boost/throw_exception.hpp" - -namespace boost { - -namespace io { - inline - std::string str(const basic_format& f) - // adds up all pieces of strings and converted items, and return the formatted string - { - return f.str(); - } -} // - namespace io - -BOOST_IO_STD ostream& -operator<<( BOOST_IO_STD ostream& os, - const boost::basic_format& f) - // effect: "return os << str(f);" but we can try to do it faster -{ - typedef boost::basic_format format_t; - if(f.items_.size()==0) - os << f.prefix_; - else { - if(f.cur_arg_ < f.num_args_) - if( f.exceptions() & io::too_few_args_bit ) - boost::throw_exception(io::too_few_args()); // not enough variables have been supplied ! - if(f.style_ & format_t::special_needs) - os << f.str(); - else { - // else we dont have to count chars output, so we dump directly to os : - os << f.prefix_; - for(unsigned long i=0; i<f.items_.size(); ++i) - { - const format_t::format_item_t& item = f.items_[i]; - os << item.res_; - os << item.appendix_; - - } - } - } - f.dumped_=true; - return os; -} - - - -} // namespace boost - - -#endif // BOOST_FORMAT_FUNCS_HPP diff --git a/nix/boost/format/group.hpp b/nix/boost/format/group.hpp deleted file mode 100644 index ac63f3f0ba..0000000000 --- a/nix/boost/format/group.hpp +++ /dev/null @@ -1,680 +0,0 @@ - -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream - -// ---------------------------------------------------------------------------- - -// group.hpp : encapsulates a group of manipulators along with an argument -// -// group_head : cut the last element of a group out. -// (is overloaded below on each type of group) - -// group_last : returns the last element of a group -// (is overloaded below on each type of group) - -// ---------------------------------------------------------------------------- - - -#ifndef BOOST_FORMAT_GROUP_HPP -#define BOOST_FORMAT_GROUP_HPP - - -namespace boost { -namespace io { - - -namespace detail { - - -// empty group, but useful even though. -struct group0 -{ - group0() {} -}; - -template <class Ch, class Tr> -inline -BOOST_IO_STD ostream& -operator << ( BOOST_IO_STD ostream& os, - const group0& ) -{ - return os; -} - -template <class T1> -struct group1 -{ - T1 a1_; - group1(T1 a1) - : a1_(a1) - {} -}; - -template <class Ch, class Tr, class T1> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group1<T1>& x) -{ - os << x.a1_; - return os; -} - - - - -template <class T1,class T2> -struct group2 -{ - T1 a1_; - T2 a2_; - group2(T1 a1,T2 a2) - : a1_(a1),a2_(a2) - {} -}; - -template <class Ch, class Tr, class T1,class T2> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group2<T1,T2>& x) -{ - os << x.a1_<< x.a2_; - return os; -} - -template <class T1,class T2,class T3> -struct group3 -{ - T1 a1_; - T2 a2_; - T3 a3_; - group3(T1 a1,T2 a2,T3 a3) - : a1_(a1),a2_(a2),a3_(a3) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group3<T1,T2,T3>& x) -{ - os << x.a1_<< x.a2_<< x.a3_; - return os; -} - -template <class T1,class T2,class T3,class T4> -struct group4 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - group4(T1 a1,T2 a2,T3 a3,T4 a4) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group4<T1,T2,T3,T4>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5> -struct group5 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group5<T1,T2,T3,T4,T5>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5,class T6> -struct group6 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group6<T1,T2,T3,T4,T5,T6>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> -struct group7 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group7<T1,T2,T3,T4,T5,T6,T7>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> -struct group8 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group8<T1,T2,T3,T4,T5,T6,T7,T8>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> -struct group9 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - T9 a9_; - group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group9<T1,T2,T3,T4,T5,T6,T7,T8,T9>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; - return os; -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> -struct group10 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - T9 a9_; - T10 a10_; - group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) - {} -}; - -template <class Ch, class Tr, class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> -inline -BOOST_IO_STD ostream& -operator << (BOOST_IO_STD ostream& os, - const group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; - return os; -} - - - - -template <class T1,class T2> -inline -group1<T1> -group_head( group2<T1,T2> const& x) -{ - return group1<T1> (x.a1_); -} - -template <class T1,class T2> -inline -group1<T2> -group_last( group2<T1,T2> const& x) -{ - return group1<T2> (x.a2_); -} - - - -template <class T1,class T2,class T3> -inline -group2<T1,T2> -group_head( group3<T1,T2,T3> const& x) -{ - return group2<T1,T2> (x.a1_,x.a2_); -} - -template <class T1,class T2,class T3> -inline -group1<T3> -group_last( group3<T1,T2,T3> const& x) -{ - return group1<T3> (x.a3_); -} - - - -template <class T1,class T2,class T3,class T4> -inline -group3<T1,T2,T3> -group_head( group4<T1,T2,T3,T4> const& x) -{ - return group3<T1,T2,T3> (x.a1_,x.a2_,x.a3_); -} - -template <class T1,class T2,class T3,class T4> -inline -group1<T4> -group_last( group4<T1,T2,T3,T4> const& x) -{ - return group1<T4> (x.a4_); -} - - - -template <class T1,class T2,class T3,class T4,class T5> -inline -group4<T1,T2,T3,T4> -group_head( group5<T1,T2,T3,T4,T5> const& x) -{ - return group4<T1,T2,T3,T4> (x.a1_,x.a2_,x.a3_,x.a4_); -} - -template <class T1,class T2,class T3,class T4,class T5> -inline -group1<T5> -group_last( group5<T1,T2,T3,T4,T5> const& x) -{ - return group1<T5> (x.a5_); -} - - - -template <class T1,class T2,class T3,class T4,class T5,class T6> -inline -group5<T1,T2,T3,T4,T5> -group_head( group6<T1,T2,T3,T4,T5,T6> const& x) -{ - return group5<T1,T2,T3,T4,T5> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6> -inline -group1<T6> -group_last( group6<T1,T2,T3,T4,T5,T6> const& x) -{ - return group1<T6> (x.a6_); -} - - - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> -inline -group6<T1,T2,T3,T4,T5,T6> -group_head( group7<T1,T2,T3,T4,T5,T6,T7> const& x) -{ - return group6<T1,T2,T3,T4,T5,T6> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7> -inline -group1<T7> -group_last( group7<T1,T2,T3,T4,T5,T6,T7> const& x) -{ - return group1<T7> (x.a7_); -} - - - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> -inline -group7<T1,T2,T3,T4,T5,T6,T7> -group_head( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) -{ - return group7<T1,T2,T3,T4,T5,T6,T7> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8> -inline -group1<T8> -group_last( group8<T1,T2,T3,T4,T5,T6,T7,T8> const& x) -{ - return group1<T8> (x.a8_); -} - - - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> -inline -group8<T1,T2,T3,T4,T5,T6,T7,T8> -group_head( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) -{ - return group8<T1,T2,T3,T4,T5,T6,T7,T8> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9> -inline -group1<T9> -group_last( group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> const& x) -{ - return group1<T9> (x.a9_); -} - - - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> -inline -group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> -group_head( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) -{ - return group9<T1,T2,T3,T4,T5,T6,T7,T8,T9> (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9,class T10> -inline -group1<T10> -group_last( group10<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> const& x) -{ - return group1<T10> (x.a10_); -} - - - - - -} // namespace detail - - - -// helper functions - - -inline detail::group1< detail::group0 > -group() { return detail::group1< detail::group0 > ( detail::group0() ); } - -template <class T1, class Var> -inline -detail::group1< detail::group2<T1, Var const&> > - group(T1 a1, Var const& var) -{ - return detail::group1< detail::group2<T1, Var const&> > - ( detail::group2<T1, Var const&> - (a1, var) - ); -} - -template <class T1,class T2, class Var> -inline -detail::group1< detail::group3<T1,T2, Var const&> > - group(T1 a1,T2 a2, Var const& var) -{ - return detail::group1< detail::group3<T1,T2, Var const&> > - ( detail::group3<T1,T2, Var const&> - (a1,a2, var) - ); -} - -template <class T1,class T2,class T3, class Var> -inline -detail::group1< detail::group4<T1,T2,T3, Var const&> > - group(T1 a1,T2 a2,T3 a3, Var const& var) -{ - return detail::group1< detail::group4<T1,T2,T3, Var const&> > - ( detail::group4<T1,T2,T3, Var const&> - (a1,a2,a3, var) - ); -} - -template <class T1,class T2,class T3,class T4, class Var> -inline -detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) -{ - return detail::group1< detail::group5<T1,T2,T3,T4, Var const&> > - ( detail::group5<T1,T2,T3,T4, Var const&> - (a1,a2,a3,a4, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5, class Var> -inline -detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) -{ - return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var const&> > - ( detail::group6<T1,T2,T3,T4,T5, Var const&> - (a1,a2,a3,a4,a5, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> -inline -detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) -{ - return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var const&> > - ( detail::group7<T1,T2,T3,T4,T5,T6, Var const&> - (a1,a2,a3,a4,a5,a6, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> -inline -detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) -{ - return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> > - ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var const&> - (a1,a2,a3,a4,a5,a6,a7, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> -inline -detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) -{ - return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> > - ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var const&> - (a1,a2,a3,a4,a5,a6,a7,a8, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> -inline -detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) -{ - return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> > - ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var const&> - (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) - ); -} - - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - -template <class T1, class Var> -inline -detail::group1< detail::group2<T1, Var&> > - group(T1 a1, Var& var) -{ - return detail::group1< detail::group2<T1, Var&> > - ( detail::group2<T1, Var&> - (a1, var) - ); -} - -template <class T1,class T2, class Var> -inline -detail::group1< detail::group3<T1,T2, Var&> > - group(T1 a1,T2 a2, Var& var) -{ - return detail::group1< detail::group3<T1,T2, Var&> > - ( detail::group3<T1,T2, Var&> - (a1,a2, var) - ); -} - -template <class T1,class T2,class T3, class Var> -inline -detail::group1< detail::group4<T1,T2,T3, Var&> > - group(T1 a1,T2 a2,T3 a3, Var& var) -{ - return detail::group1< detail::group4<T1,T2,T3, Var&> > - ( detail::group4<T1,T2,T3, Var&> - (a1,a2,a3, var) - ); -} - -template <class T1,class T2,class T3,class T4, class Var> -inline -detail::group1< detail::group5<T1,T2,T3,T4, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) -{ - return detail::group1< detail::group5<T1,T2,T3,T4, Var&> > - ( detail::group5<T1,T2,T3,T4, Var&> - (a1,a2,a3,a4, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5, class Var> -inline -detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) -{ - return detail::group1< detail::group6<T1,T2,T3,T4,T5, Var&> > - ( detail::group6<T1,T2,T3,T4,T5, Var&> - (a1,a2,a3,a4,a5, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6, class Var> -inline -detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) -{ - return detail::group1< detail::group7<T1,T2,T3,T4,T5,T6, Var&> > - ( detail::group7<T1,T2,T3,T4,T5,T6, Var&> - (a1,a2,a3,a4,a5,a6, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7, class Var> -inline -detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) -{ - return detail::group1< detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> > - ( detail::group8<T1,T2,T3,T4,T5,T6,T7, Var&> - (a1,a2,a3,a4,a5,a6,a7, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8, class Var> -inline -detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) -{ - return detail::group1< detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> > - ( detail::group9<T1,T2,T3,T4,T5,T6,T7,T8, Var&> - (a1,a2,a3,a4,a5,a6,a7,a8, var) - ); -} - -template <class T1,class T2,class T3,class T4,class T5,class T6,class T7,class T8,class T9, class Var> -inline -detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) -{ - return detail::group1< detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> > - ( detail::group10<T1,T2,T3,T4,T5,T6,T7,T8,T9, Var&> - (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) - ); -} - - -#endif //end- #ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - - -} // namespace io - -} // namespace boost - - -#endif // BOOST_FORMAT_GROUP_HPP diff --git a/nix/boost/format/internals.hpp b/nix/boost/format/internals.hpp deleted file mode 100644 index d25eb4c864..0000000000 --- a/nix/boost/format/internals.hpp +++ /dev/null @@ -1,167 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream - -// ---------------------------------------------------------------------------- -// internals.hpp : internal structs. included by format.hpp -// stream_format_state, and format_item -// ---------------------------------------------------------------------------- - - -#ifndef BOOST_FORMAT_INTERNALS_HPP -#define BOOST_FORMAT_INTERNALS_HPP - - -#include <string> -#include <sstream> - -namespace boost { -namespace io { -namespace detail { - - -// -------------- -// set of params that define the format state of a stream - -struct stream_format_state -{ - typedef std::ios basic_ios; - - std::streamsize width_; - std::streamsize precision_; - char fill_; - std::ios::fmtflags flags_; - - stream_format_state() : width_(-1), precision_(-1), fill_(0), flags_(std::ios::dec) {} - stream_format_state(basic_ios& os) {set_by_stream(os); } - - void apply_on(basic_ios & os) const; //- applies format_state to the stream - template<class T> void apply_manip(T manipulator) //- modifies state by applying manipulator. - { apply_manip_body<T>( *this, manipulator) ; } - void reset(); //- sets to default state. - void set_by_stream(const basic_ios& os); //- sets to os's state. -}; - - - -// -------------- -// format_item : stores all parameters that can be defined by directives in the format-string - -struct format_item -{ - enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; - - enum arg_values { argN_no_posit = -1, // non-positional directive. argN will be set later. - argN_tabulation = -2, // tabulation directive. (no argument read) - argN_ignored = -3 // ignored directive. (no argument read) - }; - typedef BOOST_IO_STD ios basic_ios; - typedef detail::stream_format_state stream_format_state; - typedef std::string string_t; - typedef BOOST_IO_STD ostringstream internal_stream_t; - - - int argN_; //- argument number (starts at 0, eg : %1 => argN=0) - // negative values are used for items that don't process - // an argument - string_t res_; //- result of the formatting of this item - string_t appendix_; //- piece of string between this item and the next - - stream_format_state ref_state_;// set by parsing the format_string, is only affected by modify_item - stream_format_state state_; // always same as ref_state, _unless_ modified by manipulators 'group(..)' - - // non-stream format-state parameters - signed int truncate_; //- is >=0 for directives like %.5s (take 5 chars from the string) - unsigned int pad_scheme_; //- several possible padding schemes can mix. see pad_values - - format_item() : argN_(argN_no_posit), truncate_(-1), pad_scheme_(0) {} - - void compute_states(); // sets states according to truncate and pad_scheme. -}; - - - -// ----------------------------------------------------------- -// Definitions -// ----------------------------------------------------------- - -// --- stream_format_state:: ------------------------------------------- -inline -void stream_format_state::apply_on(basic_ios & os) const - // set the state of this stream according to our params -{ - if(width_ != -1) - os.width(width_); - if(precision_ != -1) - os.precision(precision_); - if(fill_ != 0) - os.fill(fill_); - os.flags(flags_); -} - -inline -void stream_format_state::set_by_stream(const basic_ios& os) - // set our params according to the state of this stream -{ - flags_ = os.flags(); - width_ = os.width(); - precision_ = os.precision(); - fill_ = os.fill(); -} - -template<class T> inline -void apply_manip_body( stream_format_state& self, - T manipulator) - // modify our params according to the manipulator -{ - BOOST_IO_STD stringstream ss; - self.apply_on( ss ); - ss << manipulator; - self.set_by_stream( ss ); -} - -inline -void stream_format_state::reset() - // set our params to standard's default state -{ - width_=-1; precision_=-1; fill_=0; - flags_ = std::ios::dec; -} - - -// --- format_items:: ------------------------------------------- -inline -void format_item::compute_states() - // reflect pad_scheme_ on state_ and ref_state_ - // because some pad_schemes has complex consequences on several state params. -{ - if(pad_scheme_ & zeropad) - { - if(ref_state_.flags_ & std::ios::left) - { - pad_scheme_ = pad_scheme_ & (~zeropad); // ignore zeropad in left alignment - } - else - { - ref_state_.fill_='0'; - ref_state_.flags_ |= std::ios::internal; - } - } - state_ = ref_state_; -} - - -} } } // namespaces boost :: io :: detail - - -#endif // BOOST_FORMAT_INTERNALS_HPP diff --git a/nix/boost/format/internals_fwd.hpp b/nix/boost/format/internals_fwd.hpp deleted file mode 100644 index a8ebf7c3ab..0000000000 --- a/nix/boost/format/internals_fwd.hpp +++ /dev/null @@ -1,65 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// internals_fwd.hpp : forward declarations, for internal headers -// ------------------------------------------------------------------------------ - -#ifndef BOOST_FORMAT_INTERNAL_FWD_HPP -#define BOOST_FORMAT_INTERNAL_FWD_HPP - -#include "boost/format/format_fwd.hpp" - - -namespace boost { -namespace io { - -namespace detail { - struct stream_format_state; - struct format_item; -} - - -namespace detail { - - // these functions were intended as methods, - // but MSVC have problems with template member functions : - - // defined in format_implementation.hpp : - template<class T> - basic_format& modify_item_body( basic_format& self, - int itemN, const T& manipulator); - - template<class T> - basic_format& bind_arg_body( basic_format& self, - int argN, const T& val); - - template<class T> - void apply_manip_body( stream_format_state& self, - T manipulator); - - // argument feeding (defined in feed_args.hpp ) : - template<class T> - void distribute(basic_format& self, T x); - - template<class T> - basic_format& feed(basic_format& self, T x); - -} // namespace detail - -} // namespace io -} // namespace boost - - -#endif // BOOST_FORMAT_INTERNAL_FWD_HPP diff --git a/nix/boost/format/macros_default.hpp b/nix/boost/format/macros_default.hpp deleted file mode 100644 index 4fd84a163f..0000000000 --- a/nix/boost/format/macros_default.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rdiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// macros_default.hpp : configuration for the format library -// provides default values for the stl workaround macros -// ------------------------------------------------------------------------------ - -#ifndef BOOST_FORMAT_MACROS_DEFAULT_HPP -#define BOOST_FORMAT_MACROS_DEFAULT_HPP - -// *** This should go to "boost/config/suffix.hpp". - -#ifndef BOOST_IO_STD -# define BOOST_IO_STD std:: -#endif - -// **** Workaround for io streams, stlport and msvc. -#ifdef BOOST_IO_NEEDS_USING_DECLARATION -namespace boost { - using std::char_traits; - using std::basic_ostream; - using std::basic_ostringstream; - namespace io { - using std::basic_ostream; - namespace detail { - using std::basic_ios; - using std::basic_ostream; - using std::basic_ostringstream; - } - } -} -#endif - -// ------------------------------------------------------------------------------ - -#endif // BOOST_FORMAT_MACROS_DEFAULT_HPP diff --git a/nix/boost/format/parsing.cc b/nix/boost/format/parsing.cc deleted file mode 100644 index 34c36adeb7..0000000000 --- a/nix/boost/format/parsing.cc +++ /dev/null @@ -1,454 +0,0 @@ -// -*- C++ -*- -// Boost general library 'format' --------------------------- -// See http://www.boost.org for updates, documentation, and revision history. - -// (C) Samuel Krempp 2001 -// krempp@crans.ens-cachan.fr -// Permission to copy, use, modify, sell and -// distribute this software is granted provided this copyright notice appears -// in all copies. This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. - -// ideas taken from Rudiger Loos's format class -// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing) - -// ------------------------------------------------------------------------------ -// parsing.hpp : implementation of the parsing member functions -// ( parse, parse_printf_directive) -// ------------------------------------------------------------------------------ - - -#ifndef BOOST_FORMAT_PARSING_HPP -#define BOOST_FORMAT_PARSING_HPP - - -#include <boost/format.hpp> -#include <boost/throw_exception.hpp> -#include <boost/assert.hpp> - - -namespace boost { -namespace io { -namespace detail { - - template<class Stream> inline - bool wrap_isdigit(char c, Stream &os) - { -#ifndef BOOST_NO_LOCALE_ISIDIGIT - return std::isdigit(c, os.rdbuf()->getloc() ); -# else - using namespace std; - return isdigit(c); -#endif - } //end- wrap_isdigit(..) - - template<class Res> inline - Res str2int(const std::string& s, - std::string::size_type start, - BOOST_IO_STD ios &os, - const Res = Res(0) ) - // Input : char string, with starting index - // a basic_ios& merely to call its widen/narrow member function in the desired locale. - // Effects : reads s[start:] and converts digits into an integral n, of type Res - // Returns : n - { - Res n = 0; - while(start<s.size() && wrap_isdigit(s[start], os) ) { - char cur_ch = s[start]; - BOOST_ASSERT(cur_ch != 0 ); // since we called isdigit, this should not happen. - n *= 10; - n += cur_ch - '0'; // 22.2.1.1.2 of the C++ standard - ++start; - } - return n; - } - - void skip_asterisk(const std::string & buf, - std::string::size_type * pos_p, - BOOST_IO_STD ios &os) - // skip printf's "asterisk-fields" directives in the format-string buf - // Input : char string, with starting index *pos_p - // a basic_ios& merely to call its widen/narrow member function in the desired locale. - // Effects : advance *pos_p by skipping printf's asterisk fields. - // Returns : nothing - { - using namespace std; - BOOST_ASSERT( pos_p != 0); - if(*pos_p >= buf.size() ) return; - if(buf[ *pos_p]=='*') { - ++ (*pos_p); - while (*pos_p < buf.size() && wrap_isdigit(buf[*pos_p],os)) ++(*pos_p); - if(buf[*pos_p]=='$') ++(*pos_p); - } - } - - - inline void maybe_throw_exception( unsigned char exceptions) - // auxiliary func called by parse_printf_directive - // for centralising error handling - // it either throws if user sets the corresponding flag, or does nothing. - { - if(exceptions & io::bad_format_string_bit) - boost::throw_exception(io::bad_format_string()); - } - - - - bool parse_printf_directive(const std::string & buf, - std::string::size_type * pos_p, - detail::format_item * fpar, - BOOST_IO_STD ios &os, - unsigned char exceptions) - // Input : a 'printf-directive' in the format-string, starting at buf[ *pos_p ] - // a basic_ios& merely to call its widen/narrow member function in the desired locale. - // a bitset'excpetions' telling whether to throw exceptions on errors. - // Returns : true if parse somehow succeeded (possibly ignoring errors if exceptions disabled) - // false if it failed so bad that the directive should be printed verbatim - // Effects : - *pos_p is incremented so that buf[*pos_p] is the first char after the directive - // - *fpar is set with the parameters read in the directive - { - typedef format_item format_item_t; - BOOST_ASSERT( pos_p != 0); - std::string::size_type &i1 = *pos_p, - i0; - fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive - - bool in_brackets=false; - if(buf[i1]=='|') - { - in_brackets=true; - if( ++i1 >= buf.size() ) { - maybe_throw_exception(exceptions); - return false; - } - } - - // the flag '0' would be picked as a digit for argument order, but here it's a flag : - if(buf[i1]=='0') - goto parse_flags; - - // handle argument order (%2$d) or possibly width specification: %2d - i0 = i1; // save position before digits - while (i1 < buf.size() && wrap_isdigit(buf[i1], os)) - ++i1; - if (i1!=i0) - { - if( i1 >= buf.size() ) { - maybe_throw_exception(exceptions); - return false; - } - int n=str2int(buf,i0, os, int(0) ); - - // %N% case : this is already the end of the directive - if( buf[i1] == '%' ) - { - fpar->argN_ = n-1; - ++i1; - if( in_brackets) - maybe_throw_exception(exceptions); - // but don't return. maybe "%" was used in lieu of '$', so we go on. - else return true; - } - - if ( buf[i1]=='$' ) - { - fpar->argN_ = n-1; - ++i1; - } - else - { - // non-positionnal directive - fpar->ref_state_.width_ = n; - fpar->argN_ = format_item_t::argN_no_posit; - goto parse_precision; - } - } - - parse_flags: - // handle flags - while ( i1 <buf.size()) // as long as char is one of + - = # 0 l h or ' ' - { - // misc switches - switch (buf[i1]) - { - case '\'' : break; // no effect yet. (painful to implement) - case 'l': - case 'h': // short/long modifier : for printf-comaptibility (no action needed) - break; - case '-': - fpar->ref_state_.flags_ |= std::ios::left; - break; - case '=': - fpar->pad_scheme_ |= format_item_t::centered; - break; - case ' ': - fpar->pad_scheme_ |= format_item_t::spacepad; - break; - case '+': - fpar->ref_state_.flags_ |= std::ios::showpos; - break; - case '0': - fpar->pad_scheme_ |= format_item_t::zeropad; - // need to know alignment before really setting flags, - // so just add 'zeropad' flag for now, it will be processed later. - break; - case '#': - fpar->ref_state_.flags_ |= std::ios::showpoint | std::ios::showbase; - break; - default: - goto parse_width; - } - ++i1; - } // loop on flag. - if( i1>=buf.size()) { - maybe_throw_exception(exceptions); - return true; - } - - parse_width: - // handle width spec - skip_asterisk(buf, &i1, os); // skips 'asterisk fields' : *, or *N$ - i0 = i1; // save position before digits - while (i1<buf.size() && wrap_isdigit(buf[i1], os)) - i1++; - - if (i1!=i0) - { fpar->ref_state_.width_ = str2int( buf,i0, os, std::streamsize(0) ); } - - parse_precision: - if( i1>=buf.size()) { - maybe_throw_exception(exceptions); - return true; - } - // handle precision spec - if (buf[i1]=='.') - { - ++i1; - skip_asterisk(buf, &i1, os); - i0 = i1; // save position before digits - while (i1<buf.size() && wrap_isdigit(buf[i1], os)) - ++i1; - - if(i1==i0) - fpar->ref_state_.precision_ = 0; - else - fpar->ref_state_.precision_ = str2int(buf,i0, os, std::streamsize(0) ); - } - - // handle formatting-type flags : - while( i1<buf.size() && - ( buf[i1]=='l' || buf[i1]=='L' || buf[i1]=='h') ) - ++i1; - if( i1>=buf.size()) { - maybe_throw_exception(exceptions); - return true; - } - - if( in_brackets && buf[i1]=='|' ) - { - ++i1; - return true; - } - switch (buf[i1]) - { - case 'X': - fpar->ref_state_.flags_ |= std::ios::uppercase; - case 'p': // pointer => set hex. - case 'x': - fpar->ref_state_.flags_ &= ~std::ios::basefield; - fpar->ref_state_.flags_ |= std::ios::hex; - break; - - case 'o': - fpar->ref_state_.flags_ &= ~std::ios::basefield; - fpar->ref_state_.flags_ |= std::ios::oct; - break; - - case 'E': - fpar->ref_state_.flags_ |= std::ios::uppercase; - case 'e': - fpar->ref_state_.flags_ &= ~std::ios::floatfield; - fpar->ref_state_.flags_ |= std::ios::scientific; - - fpar->ref_state_.flags_ &= ~std::ios::basefield; - fpar->ref_state_.flags_ |= std::ios::dec; - break; - - case 'f': - fpar->ref_state_.flags_ &= ~std::ios::floatfield; - fpar->ref_state_.flags_ |= std::ios::fixed; - case 'u': - case 'd': - case 'i': - fpar->ref_state_.flags_ &= ~std::ios::basefield; - fpar->ref_state_.flags_ |= std::ios::dec; - break; - - case 'T': - ++i1; - if( i1 >= buf.size()) - maybe_throw_exception(exceptions); - else - fpar->ref_state_.fill_ = buf[i1]; - fpar->pad_scheme_ |= format_item_t::tabulation; - fpar->argN_ = format_item_t::argN_tabulation; - break; - case 't': - fpar->ref_state_.fill_ = ' '; - fpar->pad_scheme_ |= format_item_t::tabulation; - fpar->argN_ = format_item_t::argN_tabulation; - break; - - case 'G': - fpar->ref_state_.flags_ |= std::ios::uppercase; - break; - case 'g': // 'g' conversion is default for floats. - fpar->ref_state_.flags_ &= ~std::ios::basefield; - fpar->ref_state_.flags_ |= std::ios::dec; - - // CLEAR all floatield flags, so stream will CHOOSE - fpar->ref_state_.flags_ &= ~std::ios::floatfield; - break; - - case 'C': - case 'c': - fpar->truncate_ = 1; - break; - case 'S': - case 's': - fpar->truncate_ = fpar->ref_state_.precision_; - fpar->ref_state_.precision_ = -1; - break; - case 'n' : - fpar->argN_ = format_item_t::argN_ignored; - break; - default: - maybe_throw_exception(exceptions); - } - ++i1; - - if( in_brackets ) - { - if( i1<buf.size() && buf[i1]=='|' ) - { - ++i1; - return true; - } - else maybe_throw_exception(exceptions); - } - return true; - } - -} // detail namespace -} // io namespace - - -// ----------------------------------------------- -// format :: parse(..) - -void basic_format::parse(const string_t & buf) - // parse the format-string -{ - using namespace std; - const char arg_mark = '%'; - bool ordered_args=true; - int max_argN=-1; - string_t::size_type i1=0; - int num_items=0; - - // A: find upper_bound on num_items and allocates arrays - i1=0; - while( (i1=buf.find(arg_mark,i1)) != string::npos ) - { - if( i1+1 >= buf.size() ) { - if(exceptions() & io::bad_format_string_bit) - boost::throw_exception(io::bad_format_string()); // must not end in "bla bla %" - else break; // stop there, ignore last '%' - } - if(buf[i1+1] == buf[i1] ) { i1+=2; continue; } // escaped "%%" / "##" - ++i1; - - // in case of %N% directives, dont count it double (wastes allocations..) : - while(i1 < buf.size() && io::detail::wrap_isdigit(buf[i1],oss_)) ++i1; - if( i1 < buf.size() && buf[i1] == arg_mark ) ++ i1; - - ++num_items; - } - items_.assign( num_items, format_item_t() ); - - // B: Now the real parsing of the format string : - num_items=0; - i1 = 0; - string_t::size_type i0 = i1; - bool special_things=false; - int cur_it=0; - while( (i1=buf.find(arg_mark,i1)) != string::npos ) - { - string_t & piece = (cur_it==0) ? prefix_ : items_[cur_it-1].appendix_; - - if( buf[i1+1] == buf[i1] ) // escaped mark, '%%' - { - piece += buf.substr(i0, i1-i0) + buf[i1]; - i1+=2; i0=i1; - continue; - } - BOOST_ASSERT( static_cast<unsigned int>(cur_it) < items_.size() || cur_it==0); - - if(i1!=i0) piece += buf.substr(i0, i1-i0); - ++i1; - - bool parse_ok; - parse_ok = io::detail::parse_printf_directive(buf, &i1, &items_[cur_it], oss_, exceptions()); - if( ! parse_ok ) continue; // the directive will be printed verbatim - - i0=i1; - items_[cur_it].compute_states(); // process complex options, like zeropad, into stream params. - - int argN=items_[cur_it].argN_; - if(argN == format_item_t::argN_ignored) - continue; - if(argN ==format_item_t::argN_no_posit) - ordered_args=false; - else if(argN == format_item_t::argN_tabulation) special_things=true; - else if(argN > max_argN) max_argN = argN; - ++num_items; - ++cur_it; - } // loop on %'s - BOOST_ASSERT(cur_it == num_items); - - // store the final piece of string - string_t & piece = (cur_it==0) ? prefix_ : items_[cur_it-1].appendix_; - piece += buf.substr(i0); - - if( !ordered_args) - { - if(max_argN >= 0 ) // dont mix positional with non-positionnal directives - { - if(exceptions() & io::bad_format_string_bit) - boost::throw_exception(io::bad_format_string()); - // else do nothing. => positionnal arguments are processed as non-positionnal - } - // set things like it would have been with positional directives : - int non_ordered_items = 0; - for(int i=0; i< num_items; ++i) - if(items_[i].argN_ == format_item_t::argN_no_posit) - { - items_[i].argN_ = non_ordered_items; - ++non_ordered_items; - } - max_argN = non_ordered_items-1; - } - - // C: set some member data : - items_.resize(num_items); - - if(special_things) style_ |= special_needs; - num_args_ = max_argN + 1; - if(ordered_args) style_ |= ordered; - else style_ &= ~ordered; -} - -} // namespace boost - - -#endif // BOOST_FORMAT_PARSING_HPP diff --git a/nix/boost/throw_exception.hpp b/nix/boost/throw_exception.hpp deleted file mode 100644 index 07b4ae5cea..0000000000 --- a/nix/boost/throw_exception.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED -#define BOOST_THROW_EXCEPTION_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/throw_exception.hpp -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. -// This software is provided "as is" without express or implied -// warranty, and with no claim as to its suitability for any purpose. -// -// http://www.boost.org/libs/utility/throw_exception.html -// - -//#include <boost/config.hpp> - -#ifdef BOOST_NO_EXCEPTIONS -# include <exception> -#endif - -namespace boost -{ - -#ifdef BOOST_NO_EXCEPTIONS - -void throw_exception(std::exception const & e); // user defined - -#else - -template<class E> void throw_exception(E const & e) -{ - throw e; -} - -#endif - -} // namespace boost - -#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index f455343c18..bf2e9150d6 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -7,14 +7,14 @@ #include "local-store.hh" #include "util.hh" #include "archive.hh" -#include "affinity.hh" #include "builtins.hh" #include "spawn.hh" #include <map> -#include <sstream> #include <algorithm> #include <regex> +#include <format> +#include <string_view> #include <limits.h> #include <time.h> @@ -29,7 +29,7 @@ #include <errno.h> #include <stdio.h> #include <cstring> -#include <stdint.h> +#include <cassert> #include <pwd.h> #include <grp.h> @@ -195,7 +195,7 @@ public: abort(); } - void trace(const format & f); + void trace(std::string_view s); string getName() { @@ -372,8 +372,7 @@ void Goal::waiteeDone(GoalPtr waitee, ExitCode result) assert(waitees.find(waitee) != waitees.end()); waitees.erase(waitee); - trace(format("waitee `%1%' done; %2% left") % - waitee->name % waitees.size()); + trace(std::format("waitee `{}' done; {} left", waitee->name, waitees.size())); if (result == ecFailed || result == ecNoSubstituters || result == ecIncompleteClosure) ++nrFailed; @@ -414,9 +413,9 @@ void Goal::amDone(ExitCode result) } -void Goal::trace(const format & f) +void Goal::trace(std::string_view f) { - debug(format("%1%: %2%") % name % f); + debug(std::format("{}: {}", name, f)); } @@ -483,34 +482,34 @@ void UserLock::acquire() /* Get the members of the build-users-group. */ struct group * gr = getgrnam(settings.buildUsersGroup.c_str()); if (!gr) - throw Error(format("the group `%1%' specified in `build-users-group' does not exist") - % settings.buildUsersGroup); + throw Error(std::format("the group `{}' specified in `build-users-group' does not exist", + settings.buildUsersGroup)); gid = gr->gr_gid; /* Copy the result of getgrnam. */ Strings users; for (char * * p = gr->gr_mem; *p; ++p) { - debug(format("found build user `%1%'") % *p); + debug(std::format("found build user `{}'", *p)); users.push_back(*p); } if (users.empty()) - throw Error(format("the build users group `%1%' has no members") - % settings.buildUsersGroup); + throw Error(std::format("the build users group `{}' has no members", + settings.buildUsersGroup)); /* Find a user account that isn't currently in use for another build. */ for (auto& i : users) { - debug(format("trying user `%1%'") % i); + debug(std::format("trying user `{}'", i)); struct passwd * pw = getpwnam(i.c_str()); if (!pw) - throw Error(format("the user `%1%' in the group `%2%' does not exist") - % i % settings.buildUsersGroup); + throw Error(std::format("the user `{}' in the group `{}' does not exist", + i, settings.buildUsersGroup)); createDirs(settings.nixStateDir + "/userpool"); - fnUserLock = (format("%1%/userpool/%2%") % settings.nixStateDir % pw->pw_uid).str(); + fnUserLock = std::format("{}/userpool/{}", settings.nixStateDir, pw->pw_uid); if (lockedPaths.find(fnUserLock) != lockedPaths.end()) /* We already have a lock on this one. */ @@ -518,7 +517,7 @@ void UserLock::acquire() AutoCloseFD fd = open(fnUserLock.c_str(), O_RDWR | O_CREAT, 0600); if (fd == -1) - throw SysError(format("opening user lock `%1%'") % fnUserLock); + throw SysError(std::format("opening user lock `{}'", fnUserLock)); closeOnExec(fd); if (lockFile(fd, ltWrite, false)) { @@ -529,8 +528,8 @@ void UserLock::acquire() /* Sanity check... */ if (uid == getuid() || uid == geteuid()) - throw Error(format("the build user should not be a member of `%1%'") - % settings.buildUsersGroup); + throw Error(std::format("the build user should not be a member of `{}'", + settings.buildUsersGroup)); /* Get the list of supplementary groups of this build user. This is usually either empty or contains a group such as "kvm". */ @@ -539,7 +538,7 @@ void UserLock::acquire() int err = getgrouplist(pw->pw_name, pw->pw_gid, supplementaryGIDs.data(), &ngroups); if (err == -1) - throw Error(format("failed to get list of supplementary groups for ‘%1%’") % pw->pw_name); + throw Error(std::format("failed to get list of supplementary groups for `{}'", pw->pw_name)); supplementaryGIDs.resize(ngroups); @@ -547,9 +546,9 @@ void UserLock::acquire() } } - throw Error(format("all build users are currently in use; " - "consider creating additional users and adding them to the `%1%' group") - % settings.buildUsersGroup); + throw Error(std::format("all build users are currently in use; " + "consider creating additional users and adding them to the `{}' group", + settings.buildUsersGroup)); } @@ -582,7 +581,7 @@ string rewriteHashes(string s, const HashRewrites & rewrites) assert(i.first.size() == i.second.size()); size_t j = 0; while ((j = s.find(i.first, j)) != string::npos) { - debug(format("rewriting @ %1%") % j); + debug(std::format("rewriting @ {}", j)); s.replace(j, i.second.size(), i.second); } } @@ -716,7 +715,7 @@ public: void timedOut() override; - string key() + string key() override { /* Ensure that derivations get built in order of their name, i.e. a derivation named "aardvark" always comes before @@ -725,7 +724,7 @@ public: return "b$" + storePathToName(drvPath) + "$" + drvPath; } - void work(); + void work() override; Path getDrvPath() { @@ -771,8 +770,8 @@ private: void deleteTmpDir(bool force); /* Callback used by the worker to write to the log. */ - void handleChildOutput(int fd, const string & data); - void handleEOF(int fd); + void handleChildOutput(int fd, const string & data) override; + void handleEOF(int fd) override; /* Return the set of (in)valid paths. */ PathSet checkPathValidity(bool returnValid, bool checkHash); @@ -806,7 +805,7 @@ DerivationGoal::DerivationGoal(const Path & drvPath, const StringSet & wantedOut { this->drvPath = drvPath; state = &DerivationGoal::init; - name = (format("building of `%1%'") % drvPath).str(); + name = std::format("building of `{}'", drvPath); trace("created"); /* Prevent the .chroot directory from being @@ -862,7 +861,7 @@ void DerivationGoal::killChild() void DerivationGoal::timedOut() { if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-failed %1% - timeout") % drvPath); + printMsg(lvlError, std::format("@ build-failed {} - timeout", drvPath)); killChild(); done(BuildResult::TimedOut); } @@ -896,7 +895,7 @@ void DerivationGoal::init() trace("init"); if (settings.readOnlyMode) - throw Error(format("cannot build derivation `%1%' - no write access to the store") % drvPath); + throw Error(std::format("cannot build derivation `{}' - no write access to the store", drvPath)); /* The first thing to do is to make sure that the derivation exists. If it doesn't, it may be created through a @@ -917,7 +916,7 @@ void DerivationGoal::haveDerivation() trace("loading derivation"); if (nrFailed != 0) { - printMsg(lvlError, format("cannot build missing derivation ‘%1%’") % drvPath); + printMsg(lvlError, std::format("cannot build missing derivation `{}'", drvPath)); done(BuildResult::MiscFailure); return; } @@ -968,7 +967,7 @@ void DerivationGoal::outputsSubstituted() trace("all outputs substituted (maybe)"); if (nrFailed > 0 && nrFailed > nrNoSubstituters + nrIncompleteClosure && !settings.tryFallback) - throw Error(format("some substitutes for the outputs of derivation `%1%' failed (usually happens due to networking issues); try `--fallback' to build derivation from source ") % drvPath); + throw Error(std::format("some substitutes for the outputs of derivation `{}' failed (usually happens due to networking issues); try `--fallback' to build derivation from source ", drvPath)); /* If the substitutes form an incomplete closure, then we should build the dependencies of this derivation, but after that, we @@ -993,7 +992,7 @@ void DerivationGoal::outputsSubstituted() return; } if (buildMode == bmCheck && nrInvalid > 0) - throw Error(format("`%1%' is missing outputs; build it normally before using `--check'") % drvPath); + throw Error(std::format("`{}' is missing outputs; build it normally before using `--check'", drvPath)); /* Otherwise, at least one of the output paths could not be produced using a substitute. So we have to build instead. */ @@ -1051,7 +1050,7 @@ void DerivationGoal::repairClosure() PathSet broken; for (auto& i : outputClosure) { if (worker.store.pathContentsGood(i)) continue; - printMsg(lvlError, format("found corrupted or missing path `%1%' in the output closure of `%2%'") % i % drvPath); + printMsg(lvlError, std::format("found corrupted or missing path `{}' in the output closure of `{}'", i, drvPath)); Path drvPath2 = outputsToDrv[i]; if (drvPath2 == "") addWaitee(worker.makeSubstitutionGoal(i, true)); @@ -1072,7 +1071,7 @@ void DerivationGoal::closureRepaired() { trace("closure repaired"); if (nrFailed > 0) - throw Error(format("some paths in the output closure of derivation ‘%1%’ could not be repaired") % drvPath); + throw Error(std::format("some paths in the output closure of derivation `{}' could not be repaired", drvPath)); done(BuildResult::AlreadyValid); } @@ -1083,8 +1082,8 @@ void DerivationGoal::inputsRealised() if (nrFailed != 0) { printMsg(lvlError, - format("cannot build derivation `%1%': %2% dependencies couldn't be built") - % drvPath % nrFailed); + std::format("cannot build derivation `{}': {} dependencies couldn't be built", + drvPath, nrFailed)); done(BuildResult::DependencyFailed); return; } @@ -1099,7 +1098,7 @@ void DerivationGoal::inputsRealised() /* The outputs are referenceable paths. */ for (auto& i : drv.outputs) { - debug(format("building path `%1%'") % i.second.path); + debug(std::format("building path `{}'", i.second.path)); allPaths.insert(i.second.path); } @@ -1117,15 +1116,15 @@ void DerivationGoal::inputsRealised() computeFSClosure(worker.store, inDrv.outputs[j].path, inputPaths); else throw Error( - format("derivation `%1%' requires non-existent output `%2%' from input derivation `%3%'") - % drvPath % j % i.first); + std::format("derivation `{}' requires non-existent output `{}' from input derivation `{}'", + drvPath, j, i.first)); } /* Second, the input sources. */ for (auto& i : drv.inputSrcs) computeFSClosure(worker.store, i, inputPaths); - debug(format("added input paths %1%") % showPaths(inputPaths)); + debug(std::format("added input paths {}", showPaths(inputPaths))); allPaths.insert(inputPaths.begin(), inputPaths.end()); @@ -1187,8 +1186,8 @@ void DerivationGoal::tryToBuild() goal to sleep until another goal finishes, then try again. */ for (auto& i : drv.outputs) if (pathIsLockedByMe(i.second.path)) { - debug(format("putting derivation `%1%' to sleep because `%2%' is locked by another goal") - % drvPath % i.second.path); + debug(std::format("putting derivation `{}' to sleep because `{}' is locked by another goal", + drvPath, i.second.path)); worker.waitForAnyGoal(shared_from_this()); return; } @@ -1212,7 +1211,7 @@ void DerivationGoal::tryToBuild() build this derivation, so no further checks are necessary. */ validPaths = checkPathValidity(true, buildMode == bmRepair); if (buildMode != bmCheck && validPaths.size() == drv.outputs.size()) { - debug(format("skipping build of derivation `%1%', someone beat us to it") % drvPath); + debug(std::format("skipping build of derivation `{}', someone beat us to it", drvPath)); outputLocks.setDeletion(true); outputLocks.unlock(); done(BuildResult::AlreadyValid); @@ -1229,7 +1228,7 @@ void DerivationGoal::tryToBuild() Path path = i.second.path; if (worker.store.isValidPath(path)) continue; if (!pathExists(path)) continue; - debug(format("removing invalid path `%1%'") % path); + debug(std::format("removing invalid path `{}'", path)); deletePath(path); } @@ -1284,8 +1283,8 @@ void DerivationGoal::tryToBuild() outputLocks.unlock(); buildUser.release(); if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-failed %1% - %2% %3%") - % drvPath % 0 % e.msg()); + printMsg(lvlError, std::format("@ build-failed {} - {} {}", + drvPath, 0, e.msg())); worker.permanentFailure = true; done(BuildResult::InputRejected, e.msg()); return; @@ -1303,11 +1302,11 @@ void replaceValidPath(const Path & storePath, const Path tmpPath) tmpPath (the replacement), so we have to move it out of the way first. We'd better not be interrupted here, because if we're repairing (say) Glibc, we end up with a broken system. */ - Path oldPath = (format("%1%.old-%2%-%3%") % storePath % getpid() % rand()).str(); + Path oldPath = std::format("{}.old-{}-{}", storePath, getpid(), rand()); if (pathExists(storePath)) rename(storePath.c_str(), oldPath.c_str()); if (rename(tmpPath.c_str(), storePath.c_str()) == -1) - throw SysError(format("moving `%1%' to `%2%'") % tmpPath % storePath); + throw SysError(std::format("moving `{}' to `{}'", tmpPath, storePath)); if (pathExists(oldPath)) deletePath(oldPath); } @@ -1349,7 +1348,7 @@ static void secureFilePerms(Path path, bool allowSpecialFiles = false) /* FALLTHROUGH */ default: - throw Error(format("file `%1%' has an unsupported type") % path); + throw Error(std::format("file `{}' has an unsupported type", path)); } } @@ -1373,7 +1372,7 @@ void DerivationGoal::buildDone() status = pid.wait(true); } - debug(format("builder process for `%1%' finished") % drvPath); + debug(std::format("builder process for `{}' finished", drvPath)); /* So the child is gone now. */ worker.childTerminated(savedPid); @@ -1436,8 +1435,8 @@ void DerivationGoal::buildDone() if (diskFull) printMsg(lvlError, "note: build failure may have been caused by lack of free disk space"); - throw BuildError(format("builder for `%1%' %2%") - % drvPath % statusToString(status)); + throw BuildError(std::format("builder for `{}' {}", + drvPath, statusToString(status))); } if (fixedOutput) { @@ -1451,8 +1450,8 @@ void DerivationGoal::buildDone() copyFileRecursively(output, pivot, true); int err = rename(pivot.c_str(), output.c_str()); if (err != 0) - throw SysError(format("renaming `%1%' to `%2%'") - % pivot % output); + throw SysError(std::format("renaming `{}' to `{}'", + pivot, output)); } } } @@ -1496,20 +1495,20 @@ void DerivationGoal::buildDone() if (hook && WIFEXITED(status) && WEXITSTATUS(status) == 101) { if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-failed %1% - timeout") % drvPath); + printMsg(lvlError, std::format("@ build-failed {} - timeout", drvPath)); st = BuildResult::TimedOut; } else if (hook && (!WIFEXITED(status) || WEXITSTATUS(status) != 100)) { if (settings.printBuildTrace) - printMsg(lvlError, format("@ hook-failed %1% - %2% %3%") - % drvPath % status % e.msg()); + printMsg(lvlError, std::format("@ hook-failed {} - {} {}", + drvPath, status, e.msg())); } else { if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-failed %1% - %2% %3%") - % drvPath % 1 % e.msg()); + printMsg(lvlError, std::format("@ build-failed {} - {} {}", + drvPath, 1, e.msg())); st = statusOk(status) ? BuildResult::OutputRejected : @@ -1536,7 +1535,7 @@ void DerivationGoal::buildDone() buildUser.release(); if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-succeeded %1% -") % drvPath); + printMsg(lvlError, std::format("@ build-succeeded {} -", drvPath)); done(BuildResult::Built); } @@ -1549,10 +1548,10 @@ HookReply DerivationGoal::tryBuildHook() if (!worker.hook) { Strings args = { "offload", - settings.thisSystem.c_str(), - (format("%1%") % settings.maxSilentTime).str().c_str(), - (format("%1%") % settings.printBuildTrace).str().c_str(), - (format("%1%") % settings.buildTimeout).str().c_str() + settings.thisSystem, + std::format("{}", settings.maxSilentTime), + std::format("{}", settings.printBuildTrace), + std::format("{}", settings.buildTimeout) }; worker.hook = std::make_shared<Agent>(settings.guixProgram, args); @@ -1565,9 +1564,9 @@ HookReply DerivationGoal::tryBuildHook() for (auto& i : features) checkStoreName(i); /* !!! abuse */ /* Send the request to the hook. */ - writeLine(worker.hook->toAgent.writeSide, (format("%1% %2% %3% %4%") - % (worker.getNrLocalBuilds() < settings.maxBuildJobs ? "1" : "0") - % drv.platform % drvPath % concatStringsSep(",", features)).str()); + writeLine(worker.hook->toAgent.writeSide, std::format("{} {} {} {}", + (worker.getNrLocalBuilds() < settings.maxBuildJobs ? "1" : "0"), + drv.platform, drvPath, concatStringsSep(",", features))); /* Read the first line of input, which should be a word indicating whether the hook wishes to perform the build. */ @@ -1582,14 +1581,14 @@ HookReply DerivationGoal::tryBuildHook() writeToStderr(s); } - debug(format("hook reply is `%1%'") % reply); + debug(std::format("hook reply is `{}'", reply)); if (reply == "decline" || reply == "postpone") return reply == "decline" ? rpDecline : rpPostpone; else if (reply != "accept") - throw Error(format("bad hook reply `%1%'") % reply); + throw Error(std::format("bad hook reply `{}'", reply)); - printMsg(lvlTalkative, format("using hook to build path(s) %1%") % showPaths(missingPaths)); + printMsg(lvlTalkative, std::format("using hook to build path(s) {}", showPaths(missingPaths))); hook = worker.hook; worker.hook.reset(); @@ -1624,8 +1623,8 @@ HookReply DerivationGoal::tryBuildHook() worker.childStarted(shared_from_this(), hook->pid, fds, false, true); if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-started %1% - %2% %3% %4%") - % drvPath % drv.platform % logFile % hook->pid); + printMsg(lvlError, std::format("@ build-started {} - {} {} {}", + drvPath, drv.platform, logFile, pid_t(hook->pid))); return rpAccept; } @@ -1634,7 +1633,7 @@ HookReply DerivationGoal::tryBuildHook() void chmod_(const Path & path, mode_t mode) { if (chmod(path.c_str(), mode) == -1) - throw SysError(format("setting permissions on `%1%'") % path); + throw SysError(std::format("setting permissions on `{}'", path)); } @@ -1652,7 +1651,7 @@ static void initializeUserNamespace(pid_t child, bool haveCapSetGID = false) { writeFile("/proc/" + std::to_string(child) + "/uid_map", - (format("%d %d 1") % guestUID % hostUID).str()); + std::format("{} {} 1", guestUID, hostUID)); if (!haveCapSetGID && !extraGIDs.empty()) { try { @@ -1668,8 +1667,8 @@ static void initializeUserNamespace(pid_t child, runProgram("newgidmap", true, args); printMsg(lvlChatty, - format("mapped %1% extra GIDs into namespace of PID %2%") - % extraGIDs.size() % child); + std::format("mapped {} extra GIDs into namespace of PID {}", + extraGIDs.size(), child)); return; } catch (const ExecError &e) { @@ -1680,10 +1679,10 @@ static void initializeUserNamespace(pid_t child, if (!haveCapSetGID) writeFile("/proc/" + std::to_string(child) + "/setgroups", "deny"); - auto content = (format("%d %d 1\n") % guestGID % hostGID).str(); + auto content = std::format("{} {} 1\n", guestGID, hostGID); if (haveCapSetGID) { for (auto &mapping: extraGIDs) { - content += (format("%d %d 1\n") % mapping.second % mapping.first).str(); + content += std::format("{} {} 1\n", mapping.second, mapping.first); } } writeFile("/proc/" + std::to_string(child) + "/gid_map", content); @@ -1963,7 +1962,7 @@ static void prepareSlirpChrootAction(SpawnContext & sctx) struct stat st; if(stat(fs.c_str(), &st) != 0) { if(errno == EACCES) continue; /* Not accessible anyway */ - else throw SysError(format("stat of `%1%'") % fs); + else throw SysError(std::format("stat of `{}'", fs)); } ctx.readOnlyFilesInChroot.insert(fs); @@ -2408,7 +2407,7 @@ void DerivationGoal::execBuilderOrBuiltin(SpawnContext & ctx) buildDrv(drv, drvPath, output); } else - throw Error(format("unsupported builtin function '%1%'") % string(drv.builder, 8)); + throw Error(std::format("unsupported builtin function '{}'", string(drv.builder, 8))); _exit(0); } catch (std::exception & e) { writeFull(STDERR_FILENO, "error: " + string(e.what()) + "\n"); @@ -2427,7 +2426,7 @@ void DerivationGoal::execBuilderOrBuiltin(SpawnContext & ctx) chroot. */ ctx.program = canonPath(ctx.program, true); if(!isInStore(ctx.program)) - throw Error(format("derivation builder `%1' is outside the store") % ctx.program); + throw Error(std::format("derivation builder `{}' is outside the store", ctx.program)); /* If DRV targets the same operating system kernel, try to execute it: there might be binfmt_misc set up for user-land emulation of other architectures. However, if it targets a different operating @@ -2450,13 +2449,13 @@ void DerivationGoal::execBuilderOrBuiltin(SpawnContext & ctx) that invoke QEMU. */ if (error == ENOEXEC && !canBuildLocally(drv.platform)) { if (settings.printBuildTrace) - printMsg(lvlError, format("@ unsupported-platform %1% %2%") % drvPath % drv.platform); - throw Error(format("a `%1%' is required to build `%3%', but I am a `%2%'") - % drv.platform % settings.thisSystem % drvPath); + printMsg(lvlError, std::format("@ unsupported-platform {} {}", drvPath, drv.platform)); + throw Error(std::format("a `{}' is required to build `{}', but I am a `{}'", + drv.platform, settings.thisSystem, drvPath)); } errno = error; - throw SysError(format("executing `%1%'") % drv.builder); + throw SysError(std::format("executing `{}'", drv.builder)); } @@ -2468,13 +2467,14 @@ void execBuilderOrBuiltinAction(SpawnContext & ctx) void DerivationGoal::startBuilder() { - auto f = format( - buildMode == bmRepair ? "repairing path(s) %1%" : - buildMode == bmCheck ? "checking path(s) %1%" : - nrRounds > 1 ? "building path(s) %1% (round %2%/%3%)" : - "building path(s) %1%"); - f.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit); - startNest(nest, lvlInfo, f % showPaths(missingPaths) % curRound % nrRounds); + auto path = showPaths(missingPaths); + auto f = std::vformat( + buildMode == bmRepair ? "repairing path(s) {0}" : + buildMode == bmCheck ? "checking path(s) {0}" : + nrRounds > 1 ? "building path(s) {0} (round {1}/{2})" : + "building path(s) {0}", + std::make_format_args(path, curRound, nrRounds)); + startNest(nest, lvlInfo, f); /* A ChrootBuildSpawnContext reference can be passed to procedures expecting a SpawnContext reference */ @@ -2558,7 +2558,7 @@ void DerivationGoal::startBuilder() ctx.env["NIX_STORE"] = settings.nixStore; /* The maximum number of cores to utilize for parallel building. */ - ctx.env["NIX_BUILD_CORES"] = (format("%d") % settings.buildCores).str(); + ctx.env["NIX_BUILD_CORES"] = std::format("{}", settings.buildCores); /* Add all bindings specified in the derivation. */ for (auto& i : drv.env) @@ -2630,7 +2630,7 @@ void DerivationGoal::startBuilder() string s = get(drv.env, "exportReferencesGraph"); Strings ss = tokenizeString<Strings>(s); if (ss.size() % 2 != 0) - throw BuildError(format("odd number of tokens in `exportReferencesGraph': `%1%'") % s); + throw BuildError(std::format("odd number of tokens in `exportReferencesGraph': `{}'", s)); for (Strings::iterator i = ss.begin(); i != ss.end(); ) { string fileName = *i++; checkStoreName(fileName); /* !!! abuse of this function */ @@ -2638,12 +2638,12 @@ void DerivationGoal::startBuilder() /* Check that the store path is valid. */ Path storePath = *i++; if (!isInStore(storePath)) - throw BuildError(format("`exportReferencesGraph' contains a non-store path `%1%'") - % storePath); + throw BuildError(std::format("`exportReferencesGraph' contains a non-store path `{}'", + storePath)); storePath = toStorePath(storePath); if (!worker.store.isValidPath(storePath)) - throw BuildError(format("`exportReferencesGraph' contains an invalid path `%1%'") - % storePath); + throw BuildError(std::format("`exportReferencesGraph' contains an invalid path `{}'", + storePath)); /* If there are derivations in the graph, then include their outputs as well. This is useful if you want to do things @@ -2680,7 +2680,7 @@ void DerivationGoal::startBuilder() /* Change ownership of the temporary build directory. */ if (chown(tmpDir.c_str(), buildUser.getUID(), buildUser.getGID()) == -1) - throw SysError(format("cannot change ownership of '%1%'") % tmpDir); + throw SysError(std::format("cannot change ownership of '{}'", tmpDir)); ctx.setuid = true; ctx.user = buildUser.getUID(); @@ -2711,7 +2711,7 @@ void DerivationGoal::startBuilder() if(fixedOutput) { if(findProgram(settings.slirp4netns) == "") - printMsg(lvlError, format("`%1%' can't be found in PATH, network access disabled") % settings.slirp4netns); + printMsg(lvlError, std::format("`{}' can't be found in PATH, network access disabled", settings.slirp4netns)); else { if(!pathExists("/dev/net/tun")) printMsg(lvlError, "`/dev/net/tun' is missing, network access disabled"); @@ -2737,15 +2737,15 @@ void DerivationGoal::startBuilder() ctx.hostname = "localhost"; ctx.domainname = "(none)"; /* kernel default */ - printMsg(lvlChatty, format("setting up chroot environment in `%1%'") % chrootRootDir); + printMsg(lvlChatty, std::format("setting up chroot environment in `{}'", chrootRootDir)); if (mkdir(chrootRootTop.c_str(), 0750) == -1) - throw SysError(format("cannot create build root container '%1%'") % chrootRootTop); + throw SysError(std::format("cannot create build root container '{}'", chrootRootTop)); if (mkdir(chrootRootDir.c_str(), 0750) == -1) - throw SysError(format("cannot create build root '%1%'") % chrootRootDir); + throw SysError(std::format("cannot create build root '{}'", chrootRootDir)); if (buildUser.enabled() && chown(chrootRootDir.c_str(), 0, buildUser.getGID()) == -1) - throw SysError(format("cannot change ownership of ‘%1%’") % chrootRootDir); + throw SysError(std::format("cannot change ownership of `{}'", chrootRootDir)); /* Create a writable /tmp in the chroot. Many builders need this. (Of course they should really respect $TMPDIR @@ -2760,17 +2760,17 @@ void DerivationGoal::startBuilder() createDirs(chrootRootDir + "/etc"); writeFile(chrootRootDir + "/etc/passwd", - (format( - "nixbld:x:%1%:%2%:Nix build user:/:/noshell\n" - "nobody:x:65534:65534:Nobody:/:/noshell\n") - % (buildUser.enabled() ? buildUser.getUID() : guestUID) - % (buildUser.enabled() ? buildUser.getGID() : guestGID)).str()); + std::format( + "nixbld:x:{}:{}:Nix build user:/:/noshell\n" + "nobody:x:65534:65534:Nobody:/:/noshell\n", + buildUser.enabled() ? buildUser.getUID() : guestUID, + buildUser.enabled() ? buildUser.getGID() : guestGID)); /* Declare the build user's group so that programs get a consistent view of the system (e.g., "id -gn"). */ writeFile(chrootRootDir + "/etc/group", - (format("nixbld:!:%1%:\n") - % (buildUser.enabled() ? buildUser.getGID() : guestGID)).str()); + std::format("nixbld:!:{}:\n", + buildUser.enabled() ? buildUser.getGID() : guestGID)); if (fixedOutput) { /* Fixed-output derivations typically need to access the network, @@ -2834,7 +2834,7 @@ void DerivationGoal::startBuilder() if (buildUser.enabled() && chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1) /* As an extra security precaution, make the fake store only writable by the build user. */ - throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir); + throw SysError(std::format("cannot change ownership of `{}'", chrootStoreDir)); /* Make the closure of the inputs available in the chroot, rather than the whole store. This prevents any access to undeclared @@ -2902,7 +2902,7 @@ void DerivationGoal::startBuilder() ctx.phases = getBasicSpawnPhases(); if (pathExists(homeDir)) - throw Error(format("directory `%1%' exists; please remove it") % homeDir); + throw Error(std::format("directory `{}' exists; please remove it", homeDir)); /* We're not doing a chroot build, but we have some valid output paths. Since we can't just overwrite or delete @@ -2930,7 +2930,7 @@ void DerivationGoal::startBuilder() replacePhase(ctx.phases, "exec", execBuilderOrBuiltinAction); /* Run the builder. */ - printMsg(lvlChatty, format("executing builder `%1%'") % drv.builder); + printMsg(lvlChatty, std::format("executing builder `{}'", drv.builder)); /* Create the log file. */ Path logFile = openLogFile(); @@ -3070,8 +3070,8 @@ void DerivationGoal::startBuilder() if (!msg.empty()) throw Error(msg); if (settings.printBuildTrace) { - printMsg(lvlError, format("@ build-started %1% - %2% %3% %4%") - % drvPath % drv.platform % logFile % pid); + printMsg(lvlError, std::format("@ build-started {} - {} {} {}", + drvPath, drv.platform, logFile, pid_t(pid))); } } @@ -3090,8 +3090,7 @@ PathSet parseReferenceSpecifiers(const Derivation & drv, string attr) else if (drv.outputs.find(i) != drv.outputs.end()) result.insert(drv.outputs.find(i)->second.path); else throw BuildError( - format("derivation contains an invalid reference specifier `%1%'") - % i); + std::format("derivation contains an invalid reference specifier `{}'", i)); } return result; } @@ -3142,9 +3141,9 @@ void DerivationGoal::registerOutputs() if (lstat(actualPath.c_str(), &st) == -1) { if (errno == ENOENT) throw BuildError( - format("builder for `%1%' failed to produce output path `%2%'") - % drvPath % path); - throw SysError(format("getting attributes of path `%1%'") % actualPath); + std::format("builder for `{}' failed to produce output path `{}'", + drvPath, path)); + throw SysError(std::format("getting attributes of path `{}'", actualPath)); } #ifndef __CYGWIN__ @@ -3154,13 +3153,13 @@ void DerivationGoal::registerOutputs() user. */ if ((!S_ISLNK(st.st_mode) && (st.st_mode & (S_IWGRP | S_IWOTH))) || (buildUser.enabled() && st.st_uid != buildUser.getUID())) - throw BuildError(format("suspicious ownership or permission on `%1%'; rejecting this build output") % path); + throw BuildError(std::format("suspicious ownership or permission on `{}'; rejecting this build output", path)); #endif /* Apply hash rewriting if necessary. */ bool rewritten = false; if (!rewritesFromTmp.empty()) { - printMsg(lvlError, format("warning: rewriting hashes in `%1%'; cross fingers") % path); + printMsg(lvlError, std::format("warning: rewriting hashes in `{}'; cross fingers", path)); /* Canonicalise first. This ensures that the path we're rewriting doesn't contain a hard link to /etc/shadow or @@ -3179,7 +3178,7 @@ void DerivationGoal::registerOutputs() } startNest(nest, lvlTalkative, - format("scanning for references inside `%1%'") % path); + std::format("scanning for references inside `{}'", path)); /* Check that fixed-output derivations produced the right outputs (i.e., the content hash should match the specified @@ -3194,17 +3193,17 @@ void DerivationGoal::registerOutputs() execute permission. */ if (!S_ISREG(st.st_mode) || (st.st_mode & S_IXUSR) != 0) throw BuildError( - format("output path `%1% should be a non-executable regular file") % path); + std::format("output path `{}' should be a non-executable regular file", path)); } /* Check the hash. */ Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath); if (h != h2) { if (settings.printBuildTrace) - printMsg(lvlError, format("@ hash-mismatch %1% %2% %3% %4%") - % path % i.second.hashAlgo - % printHash16or32(h) % printHash16or32(h2)); - throw BuildError(format("hash mismatch for store item '%1%'") % path); + printMsg(lvlError, std::format("@ hash-mismatch {} {} {} {}", + path, i.second.hashAlgo, + printHash16or32(h), printHash16or32(h2))); + throw BuildError(std::format("hash mismatch for store item '{}'", path)); } } @@ -3224,16 +3223,16 @@ void DerivationGoal::registerOutputs() if (buildMode != bmCheck) { if (S_ISDIR(st.st_mode)) { if (lstat(actualPath.c_str(), &st) == -1) - throw SysError(format("getting canonicalized permissions of directory `%1%'") % actualPath); + throw SysError(std::format("getting canonicalized permissions of directory `{}'", actualPath)); /* Change mode on the directory to allow for rename(2). */ if (chmod(actualPath.c_str(), st.st_mode | 0700) == -1) - throw SysError(format("making `%1%' writable for move from chroot to store") % actualPath); + throw SysError(std::format("making `{}' writable for move from chroot to store", actualPath)); } if (rename(actualPath.c_str(), path.c_str()) == -1) - throw SysError(format("moving build output `%1%' from the chroot to the store") % path); + throw SysError(std::format("moving build output `{}' from the chroot to the store", path)); if (S_ISDIR(st.st_mode) && chmod(path.c_str(), st.st_mode) == -1) - throw SysError(format("restoring permissions on directory `%1%'") % actualPath); + throw SysError(std::format("restoring permissions on directory `{}'", actualPath)); } } if (buildMode != bmCheck) actualPath = path; @@ -3254,16 +3253,16 @@ void DerivationGoal::registerOutputs() Path dst = path + checkSuffix; if (pathExists(dst)) deletePath(dst); if (rename(actualPath.c_str(), dst.c_str())) - throw SysError(format("renaming `%1%' to `%2%'") % actualPath % dst); - throw Error(format("derivation `%1%' may not be deterministic: output `%2%' differs from `%3%'") - % drvPath % path % dst); + throw SysError(std::format("renaming `{}' to `{}'", actualPath, dst)); + throw Error(std::format("derivation `{}' may not be deterministic: output `{}' differs from `{}'", + drvPath, path, dst)); } else - throw Error(format("derivation `%1%' may not be deterministic: output `%2%' differs") - % drvPath % path); + throw Error(std::format("derivation `{}' may not be deterministic: output `{}' differs", + drvPath, path)); } if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-succeeded %1% -") % drvPath); + printMsg(lvlError, std::format("@ build-succeeded {} -", drvPath)); continue; } @@ -3273,9 +3272,9 @@ void DerivationGoal::registerOutputs() for (auto& i : inputPaths) { PathSet::iterator j = references.find(i); if (j == references.end()) - debug(format("unreferenced input: `%1%'") % i); + debug(std::format("unreferenced input: `{}'", i)); else - debug(format("referenced input: `%1%'") % i); + debug(std::format("referenced input: `{}'", i)); } /* Enforce `allowedReferences' and friends. */ @@ -3297,10 +3296,10 @@ void DerivationGoal::registerOutputs() for (auto & i : used) if (allowed) { if (spec.find(i) == spec.end()) - throw BuildError(format("output (`%1%') is not allowed to refer to path `%2%'") % actualPath % i); + throw BuildError(std::format("output (`{}') is not allowed to refer to path `{}'", actualPath, i)); } else { if (spec.find(i) != spec.end()) - throw BuildError(format("output (`%1%') is not allowed to refer to path `%2%'") % actualPath % i); + throw BuildError(std::format("output (`{}') is not allowed to refer to path `{}'", actualPath, i)); } }; @@ -3333,12 +3332,12 @@ void DerivationGoal::registerOutputs() Path prev = i->path + checkSuffix; if (pathExists(prev)) throw NotDeterministic( - format("output ‘%1%’ of ‘%2%’ differs from ‘%3%’ from previous round") - % i->path % drvPath % prev); + std::format("output `{}' of `{}' differs from `{}' from previous round", + i->path, drvPath, prev)); else throw NotDeterministic( - format("output ‘%1%’ of ‘%2%’ differs from previous round") - % i->path % drvPath); + std::format("output `{}' of `{}' differs from previous round", + i->path, drvPath)); } assert(false); // shouldn't happen } @@ -3350,7 +3349,7 @@ void DerivationGoal::registerOutputs() if (curRound < nrRounds) { Path dst = i.second.path + checkSuffix; if (rename(i.second.path.c_str(), dst.c_str())) - throw SysError(format("renaming ‘%1%’ to ‘%2%’") % i.second.path % dst); + throw SysError(std::format("renaming `{}' to `{}'", i.second.path, dst)); } } @@ -3380,20 +3379,20 @@ Path DerivationGoal::openLogFile() string baseName = baseNameOf(drvPath); /* Create a log file. */ - Path dir = (format("%1%/%2%/%3%/") % settings.nixLogDir % drvsLogDir % string(baseName, 0, 2)).str(); + Path dir = std::format("{}/{}/{}/", settings.nixLogDir, drvsLogDir, string(baseName, 0, 2)); createDirs(dir); switch (settings.logCompression) { case COMPRESSION_GZIP: { - Path logFileName = (format("%1%/%2%.gz") % dir % string(baseName, 2)).str(); + Path logFileName = std::format("{}/{}.gz", dir, string(baseName, 2)); AutoCloseFD fd = open(logFileName.c_str(), O_CREAT | O_WRONLY | O_TRUNC, 0666); - if (fd == -1) throw SysError(format("creating log file `%1%'") % logFileName); + if (fd == -1) throw SysError(std::format("creating log file `{}'", logFileName)); closeOnExec(fd); /* Note: FD will be closed by 'gzclose'. */ if (!(gzLogFile = gzdopen(fd.borrow(), "w"))) - throw Error(format("cannot open compressed log file `%1%'") % logFileName); + throw Error(std::format("cannot open compressed log file `{}'", logFileName)); gzbuffer(gzLogFile, 32768); gzsetparams(gzLogFile, Z_BEST_COMPRESSION, Z_DEFAULT_STRATEGY); @@ -3403,26 +3402,26 @@ Path DerivationGoal::openLogFile() #if HAVE_BZLIB_H case COMPRESSION_BZIP2: { - Path logFileName = (format("%1%/%2%.bz2") % dir % string(baseName, 2)).str(); + Path logFileName = std::format("{}/{}.bz2", dir, string(baseName, 2)); AutoCloseFD fd = open(logFileName.c_str(), O_CREAT | O_WRONLY | O_TRUNC, 0666); - if (fd == -1) throw SysError(format("creating log file `%1%'") % logFileName); + if (fd == -1) throw SysError(std::format("creating log file `{}'", logFileName)); closeOnExec(fd); if (!(fLogFile = fdopen(fd.borrow(), "w"))) - throw SysError(format("opening log file `%1%'") % logFileName); + throw SysError(std::format("opening log file `{}'", logFileName)); int err; if (!(bzLogFile = BZ2_bzWriteOpen(&err, fLogFile, 9, 0, 0))) - throw Error(format("cannot open compressed log file `%1%'") % logFileName); + throw Error(std::format("cannot open compressed log file `{}'", logFileName)); return logFileName; } #endif case COMPRESSION_NONE: { - Path logFileName = (format("%1%/%2%") % dir % string(baseName, 2)).str(); + Path logFileName = std::format("{}/{}", dir, string(baseName, 2)); fdLogFile = open(logFileName.c_str(), O_CREAT | O_WRONLY | O_TRUNC, 0666); - if (fdLogFile == -1) throw SysError(format("creating log file `%1%'") % logFileName); + if (fdLogFile == -1) throw SysError(std::format("creating log file `{}'", logFileName)); closeOnExec(fdLogFile); return logFileName; } @@ -3438,14 +3437,14 @@ void DerivationGoal::closeLogFile() int err; err = gzclose(gzLogFile); gzLogFile = NULL; - if (err != Z_OK) throw Error(format("cannot close compressed log file (gzip error = %1%)") % err); + if (err != Z_OK) throw Error(std::format("cannot close compressed log file (gzip error = {})", err)); } #if HAVE_BZLIB_H else if (bzLogFile) { int err; BZ2_bzWriteClose(&err, bzLogFile, 0, 0, 0); bzLogFile = 0; - if (err != BZ_OK) throw Error(format("cannot close compressed log file (BZip2 error = %1%)") % err); + if (err != BZ_OK) throw Error(std::format("cannot close compressed log file (BZip2 error = {})", err)); } #endif @@ -3463,7 +3462,7 @@ static void _chown(const Path & path, uid_t uid, gid_t gid) checkInterrupt(); if (lchown(path.c_str(), uid, gid) == -1) { - throw SysError(format("change owner and group of `%1%'") % path); + throw SysError(std::format("change owner and group of `{}'", path)); } struct stat st = lstat(path); if (S_ISDIR(st.st_mode)) { @@ -3486,8 +3485,7 @@ void DerivationGoal::deleteTmpDir(bool force) if (settings.keepFailed && !force) { printMsg(lvlError, - format("note: keeping build directory `%2%'") - % drvPath % top); + std::format("note: keeping build directory `{}'", top)); chmod(tmpDir.c_str(), 0755); // Change the ownership if clientUid is set. Never change the @@ -3516,8 +3514,8 @@ void DerivationGoal::deleteTmpDir(bool force) /* When running as an unprivileged user and without CAP_CHOWN, we cannot chown the build tree. Print a message and keep going. */ - printMsg(lvlInfo, format("cannot change ownership of build directory '%1%': %2%") - % tmpDir % strerror(e.errNo)); + printMsg(lvlInfo, std::format("cannot change ownership of build directory '{}': {}", + tmpDir, strerror(e.errNo))); } if (top != tmpDir) { @@ -3568,8 +3566,8 @@ void DerivationGoal::handleChildOutput(int fd, const string & data) logSize += data.size(); if (settings.maxLogSize && logSize > settings.maxLogSize) { printMsg(lvlError, - format("%1% killed after writing more than %2% bytes of log output") - % getName() % settings.maxLogSize); + std::format("{} killed after writing more than {} bytes of log output", + getName(), settings.maxLogSize)); timedOut(); // not really a timeout, but close enough return; } @@ -3580,13 +3578,13 @@ void DerivationGoal::handleChildOutput(int fd, const string & data) if (data.size() > 0) { int count, err; count = gzwrite(gzLogFile, data.data(), data.size()); - if (count == 0) throw Error(format("cannot write to compressed log file (gzip error = %1%)") % gzerror(gzLogFile, &err)); + if (count == 0) throw Error(std::format("cannot write to compressed log file (gzip error = {})", gzerror(gzLogFile, &err))); } #if HAVE_BZLIB_H } else if (bzLogFile) { int err; BZ2_bzWrite(&err, bzLogFile, (unsigned char *) data.data(), data.size()); - if (err != BZ_OK) throw Error(format("cannot write to compressed log file (BZip2 error = %1%)") % err); + if (err != BZ_OK) throw Error(std::format("cannot write to compressed log file (BZip2 error = {})", err)); #endif } else if (fdLogFile != -1) writeFull(fdLogFile, data); @@ -3623,10 +3621,10 @@ bool DerivationGoal::pathFailed(const Path & path) if (!worker.store.hasPathFailed(path)) return false; - printMsg(lvlError, format("builder for `%1%' failed previously (cached)") % path); + printMsg(lvlError, std::format("builder for `{}' failed previously (cached)", path)); if (settings.printBuildTrace) - printMsg(lvlError, format("@ build-failed %1% - cached") % drvPath); + printMsg(lvlError, std::format("@ build-failed {} - cached", drvPath)); done(BuildResult::CachedFailure); @@ -3644,8 +3642,8 @@ Path DerivationGoal::addHashRewrite(const Path & path) rewritesToTmp[h1] = h2; rewritesFromTmp[h2] = h1; redirectedOutputs[path] = p; - printMsg(lvlChatty, format("output '%1%' redirected to '%2%'") - % path % p); + printMsg(lvlChatty, std::format("output '{}' redirected to '{}'", + path, p)); return p; } @@ -3734,7 +3732,7 @@ SubstitutionGoal::SubstitutionGoal(const Path & storePath, Worker & worker, bool { this->storePath = storePath; state = &SubstitutionGoal::init; - name = (format("substitution of `%1%'") % storePath).str(); + name = std::format("substitution of `{}'", storePath); trace("created"); } @@ -3748,7 +3746,7 @@ SubstitutionGoal::~SubstitutionGoal() void SubstitutionGoal::timedOut() { if (settings.printBuildTrace) - printMsg(lvlError, format("@ substituter-failed %1% timeout") % storePath); + printMsg(lvlError, std::format("@ substituter-failed {} timeout", storePath)); if (substituter) { pid_t savedPid = substituter->pid; substituter.reset(); @@ -3777,7 +3775,7 @@ void SubstitutionGoal::init() } if (settings.readOnlyMode) - throw Error(format("cannot substitute path `%1%' - no write access to the store") % storePath); + throw Error(std::format("cannot substitute path `{}' - no write access to the store", storePath)); tryNext(); } @@ -3794,7 +3792,7 @@ void SubstitutionGoal::tryNext() if (k == infos.end()) { /* None left. Terminate this goal and let someone else deal with it. */ - debug(format("path `%1%' is required, but there is no substituter that can build it") % storePath); + debug(std::format("path `{}' is required, but there is no substituter that can build it", storePath)); /* Hack: don't indicate failure if there were no substituters. In that case the calling derivation should just do a build. */ @@ -3823,7 +3821,7 @@ void SubstitutionGoal::referencesValid() trace("all references realised"); if (nrFailed > 0) { - debug(format("some references of path `%1%' could not be realised") % storePath); + debug(std::format("some references of path `{}' could not be realised", storePath)); amDone(nrNoSubstituters > 0 || nrIncompleteClosure > 0 ? ecIncompleteClosure : ecFailed); return; } @@ -3855,8 +3853,8 @@ void SubstitutionGoal::tryToRun() first, but let's be defensive). */ outputLock.reset(); // make sure this goal's lock is gone if (pathIsLockedByMe(storePath)) { - debug(format("restarting substitution of `%1%' because it's locked by another goal") - % storePath); + debug(std::format("restarting substitution of `{}' because it's locked by another goal", + storePath)); worker.waitForAnyGoal(shared_from_this()); return; /* restart in the tryToRun() state when another goal finishes */ } @@ -3870,14 +3868,14 @@ void SubstitutionGoal::tryToRun() /* Check again whether the path is invalid. */ if (!repair && worker.store.isValidPath(storePath)) { - debug(format("store path `%1%' has become valid") % storePath); + debug(std::format("store path `{}' has become valid", storePath)); outputLock->setDeletion(true); outputLock.reset(); amDone(ecSuccess); return; } - printMsg(lvlInfo, format("fetching path `%1%'...") % storePath); + printMsg(lvlInfo, std::format("fetching path `{}'...", storePath)); destPath = repair ? storePath + ".tmp" : storePath; @@ -3901,7 +3899,7 @@ void SubstitutionGoal::tryToRun() /* Send the request to the substituter. */ writeLine(substituter->toAgent.writeSide, - (format("substitute %1% %2%") % storePath % destPath).str()); + std::format("substitute {} {}", storePath, destPath)); set<int> fds; fds.insert(substituter->fromAgent.readSide); @@ -3913,7 +3911,7 @@ void SubstitutionGoal::tryToRun() if (settings.printBuildTrace) /* The second element in the message used to be the name of the substituter but we're left with only one. */ - printMsg(lvlError, format("@ substituter-started %1% substitute") % storePath); + printMsg(lvlError, std::format("@ substituter-started {} substitute", storePath)); } @@ -3939,35 +3937,33 @@ void SubstitutionGoal::finished() auto statusList = tokenizeString<vector<string> >(status); if (statusList.empty()) { - throw SubstError(format("fetching path `%1%' (empty status)") - % storePath); + throw SubstError(std::format("fetching path `{}' (empty status)", storePath)); } else if (statusList[0] == "hash-mismatch") { if (settings.printBuildTrace) { auto hashType = statusList[1]; auto expectedHash = statusList[2]; auto actualHash = statusList[3]; - printMsg(lvlError, format("@ hash-mismatch %1% %2% %3% %4%") - % storePath - % hashType % expectedHash % actualHash); + printMsg(lvlError, std::format("@ hash-mismatch {} {} {} {}", + storePath, hashType, expectedHash, actualHash)); } - throw SubstError(format("hash mismatch for substituted item `%1%'") % storePath); + throw SubstError(std::format("hash mismatch for substituted item `{}'", storePath)); } else if (statusList[0] == "success") { if (!pathExists(destPath)) - throw SubstError(format("substitute did not produce path `%1%'") % destPath); + throw SubstError(std::format("substitute did not produce path `{}'", destPath)); std::string hashStr = statusList[1]; size_t n = hashStr.find(':'); if (n == string::npos) - throw Error(format("bad hash from substituter: %1%") % hashStr); + throw Error(std::format("bad hash from substituter: {}", hashStr)); HashType hashType = parseHashType(string(hashStr, 0, n)); switch (hashType) { case htUnknown: - throw Error(format("unknown hash algorithm in `%1%'") % hashStr); + throw Error(std::format("unknown hash algorithm in `{}'", hashStr)); case htSHA256: hash.first = parseHash16or32(hashType, string(hashStr, n + 1)); if (!string2Int(statusList[2], hash.second)) - throw Error(format("invalid nar size for '%1%' substitute") % storePath); + throw Error(std::format("invalid nar size for '{}' substitute", storePath)); break; default: /* The database only stores SHA256 hashes, so compute it. */ @@ -3976,16 +3972,16 @@ void SubstitutionGoal::finished() } } else - throw SubstError(format("fetching path `%1%' (status: '%2%')") - % storePath % status); + throw SubstError(std::format("fetching path `{}' (status: '{}')", + storePath, status)); } catch (SubstError & e) { printMsg(lvlInfo, e.msg()); if (settings.printBuildTrace) { - printMsg(lvlError, format("@ substituter-failed %1% %2% %3%") - % storePath % status % e.msg()); + printMsg(lvlError, std::format("@ substituter-failed {} {} {}", + storePath, status, e.msg())); } amDone(ecFailed); @@ -4011,10 +4007,10 @@ void SubstitutionGoal::finished() worker.store.markContentsGood(storePath); printMsg(lvlChatty, - format("substitution of path `%1%' succeeded") % storePath); + std::format("substitution of path `{}' succeeded", storePath)); if (settings.printBuildTrace) - printMsg(lvlError, format("@ substituter-succeeded %1%") % storePath); + printMsg(lvlError, std::format("@ substituter-succeeded {}", storePath)); amDone(ecSuccess); } @@ -4042,7 +4038,7 @@ void SubstitutionGoal::handleChildOutput(int fd, const string & data) status = trimmed; worker.wakeUp(shared_from_this()); } else { - printMsg(lvlError, format("unexpected substituter message '%1%'") % input); + printMsg(lvlError, std::format("unexpected substituter message '{}'", input)); } input = (end != string::npos) ? input.substr(end + 1) : ""; @@ -4234,7 +4230,7 @@ void Worker::run(const Goals & _topGoals) { for (auto& i : _topGoals) topGoals.insert(i); - startNest(nest, lvlDebug, format("entered goal loop")); + startNest(nest, lvlDebug, "entered goal loop"); while (1) { @@ -4308,7 +4304,7 @@ void Worker::waitForInput() if (nearest != LONG_MAX) { timeout.tv_sec = std::max((time_t) 1, nearest - before); useTimeout = true; - printMsg(lvlVomit, format("sleeping %1% seconds") % timeout.tv_sec); + printMsg(lvlVomit, std::format("sleeping {} seconds", timeout.tv_sec)); } /* If we are polling goals that are waiting for a lock, then wake @@ -4365,15 +4361,14 @@ void Worker::waitForInput() ssize_t rd = read(k, buffer, sizeof(buffer)); if (rd == -1) { if (errno != EINTR) - throw SysError(format("reading from %1%") - % goal->getName()); + throw SysError(std::format("reading from {}", goal->getName())); } else if (rd == 0) { - debug(format("%1%: got EOF") % goal->getName()); + debug(std::format("{}: got EOF", goal->getName())); goal->handleEOF(k); j->second.fds.erase(k); } else { - printMsg(lvlVomit, format("%1%: read %2% bytes") - % goal->getName() % rd); + printMsg(lvlVomit, std::format("{}: read {} bytes", + goal->getName(), rd)); string data((char *) buffer, rd); j->second.lastOutput = after; goal->handleChildOutput(k, data); @@ -4387,8 +4382,8 @@ void Worker::waitForInput() after - j->second.lastOutput >= (time_t) settings.maxSilentTime) { printMsg(lvlError, - format("%1% timed out after %2% seconds of silence") - % goal->getName() % settings.maxSilentTime); + std::format("{} timed out after {} seconds of silence", + goal->getName(), settings.maxSilentTime)); goal->timedOut(); } @@ -4398,8 +4393,8 @@ void Worker::waitForInput() after - j->second.timeStarted >= (time_t) settings.buildTimeout) { printMsg(lvlError, - format("%1% timed out after %2% seconds") - % goal->getName() % settings.buildTimeout); + std::format("{} timed out after %2% seconds", + goal->getName(), settings.buildTimeout)); goal->timedOut(); } } @@ -4427,7 +4422,7 @@ unsigned int Worker::exitStatus() void LocalStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode) { startNest(nest, lvlDebug, - format("building %1%") % showPaths(drvPaths)); + std::format("building {}", showPaths(drvPaths))); Worker worker(*this); @@ -4451,7 +4446,7 @@ void LocalStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode) } if (!failed.empty()) - throw Error(format("build of %1% failed") % showPaths(failed), worker.exitStatus()); + throw Error(std::format("build of {} failed", showPaths(failed)), worker.exitStatus()); } @@ -4467,7 +4462,7 @@ void LocalStore::ensurePath(const Path & path) worker.run(goals); if (goal->getExitCode() != Goal::ecSuccess) - throw Error(format("path `%1%' does not exist and cannot be created") % path, worker.exitStatus()); + throw Error(std::format("path `{}' does not exist and cannot be created", path), worker.exitStatus()); } @@ -4488,7 +4483,7 @@ void LocalStore::repairPath(const Path & path) goals.insert(worker.makeDerivationGoal(deriver, StringSet(), bmRepair)); worker.run(goals); } else - throw Error(format("cannot repair path `%1%'") % path, worker.exitStatus()); + throw Error(std::format("cannot repair path `{}'", path), worker.exitStatus()); } } diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc index 6bf467354a..b1a32480b5 100644 --- a/nix/libstore/builtins.cc +++ b/nix/libstore/builtins.cc @@ -22,6 +22,7 @@ #include <unistd.h> #include <cstdlib> +#include <format> namespace nix { @@ -53,7 +54,7 @@ static void builtinDownload(const Derivation &drv, const string program = settings.guixProgram; execv(program.c_str(), (char *const *) argv); - throw SysError(format("failed to run download program '%1%'") % program); + throw SysError(std::format("failed to run download program '{}'", program)); } static const std::map<std::string, derivationBuilder> builtins = diff --git a/nix/libstore/builtins.hh b/nix/libstore/builtins.hh index 396ea14ebc..602a5a1c58 100644 --- a/nix/libstore/builtins.hh +++ b/nix/libstore/builtins.hh @@ -21,7 +21,6 @@ #pragma once #include <derivations.hh> -#include <map> #include <string> namespace nix { diff --git a/nix/libstore/derivations.cc b/nix/libstore/derivations.cc index 0c3a249228..c253a2a438 100644 --- a/nix/libstore/derivations.cc +++ b/nix/libstore/derivations.cc @@ -4,6 +4,9 @@ #include "util.hh" #include "misc.hh" +#include <format> + +#include <cassert> namespace nix { @@ -20,7 +23,7 @@ void DerivationOutput::parseHashInfo(bool & recursive, HashType & hashType, Hash hashType = parseHashType(algo); if (hashType == htUnknown) - throw Error(format("unknown hash algorithm `%1%'") % algo); + throw Error(std::format("unknown hash algorithm `{}'", algo)); hash = parseHash(hashType, this->hash); } @@ -48,7 +51,7 @@ static Path parsePath(std::istream & str) { string s = parseString(str); if (s.size() == 0 || s[0] != '/') - throw FormatError(format("bad path `%1%' in derivation") % s); + throw FormatError(std::format("bad path `{}' in derivation", s)); return s; } @@ -117,7 +120,7 @@ Derivation readDerivation(const Path & drvPath) try { return parseDerivation(readFile(drvPath)); } catch (FormatError & e) { - throw Error(format("error parsing derivation `%1%': %2%") % drvPath % e.msg()); + throw Error(std::format("error parsing derivation `{}': {}", drvPath, e.msg())); } } diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc index 610270f907..96440077fb 100644 --- a/nix/libstore/gc.cc +++ b/nix/libstore/gc.cc @@ -6,6 +6,7 @@ #include <queue> #include <random> #include <algorithm> +#include <format> #include <sys/types.h> #include <sys/stat.h> @@ -30,18 +31,17 @@ static string gcRootsDir = "gcroots"; yielded the GC lock. */ int LocalStore::openGCLock(LockType lockType) { - Path fnGCLock = (format("%1%/%2%") - % settings.nixStateDir % gcLockName).str(); + Path fnGCLock = std::format("{}/{}", settings.nixStateDir, gcLockName); - debug(format("acquiring global GC lock `%1%'") % fnGCLock); + debug(std::format("acquiring global GC lock `{}'", fnGCLock)); AutoCloseFD fdGCLock = open(fnGCLock.c_str(), O_RDWR | O_CREAT, 0600); if (fdGCLock == -1) - throw SysError(format("opening global GC lock `%1%'") % fnGCLock); + throw SysError(std::format("opening global GC lock `{}'", fnGCLock)); closeOnExec(fdGCLock); if (!lockFile(fdGCLock, lockType, false)) { - printMsg(lvlError, format("waiting for the big garbage collector lock...")); + printMsg(lvlError, "waiting for the big garbage collector lock..."); lockFile(fdGCLock, lockType, true); } @@ -59,14 +59,12 @@ static void makeSymlink(const Path & link, const Path & target) createDirs(dirOf(link)); /* Create the new symlink. */ - Path tempLink = (format("%1%.tmp-%2%-%3%") - % link % getpid() % rand()).str(); + Path tempLink = std::format("{}.tmp-{}-{}", link, getpid(), rand()); createSymlink(target, tempLink); /* Atomically replace the old one. */ if (rename(tempLink.c_str(), link.c_str()) == -1) - throw SysError(format("cannot rename `%1%' to `%2%'") - % tempLink % link); + throw SysError(std::format("cannot rename `{}' to `{}'", tempLink, link)); } @@ -79,8 +77,8 @@ void LocalStore::syncWithGC() void LocalStore::addIndirectRoot(const Path & path) { string hash = printHash32(hashString(htSHA1, path)); - Path realRoot = canonPath((format("%1%/%2%/auto/%3%") - % settings.nixStateDir % gcRootsDir % hash).str()); + Path realRoot = canonPath(std::format("{}/{}/auto/{}", + settings.nixStateDir, gcRootsDir, hash)); makeSymlink(realRoot, path); } @@ -93,28 +91,28 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath, assertStorePath(storePath); if (isInStore(gcRoot)) - throw Error(format( - "creating a garbage collector root (%1%) in the store is forbidden " - "(are you running nix-build inside the store?)") % gcRoot); + throw Error(std::format( + "creating a garbage collector root ({}) in the store is forbidden " + "(are you running nix-build inside the store?)", gcRoot)); if (indirect) { /* Don't clobber the link if it already exists and doesn't point to the store. */ if (pathExists(gcRoot) && (!isLink(gcRoot) || !isInStore(readLink(gcRoot)))) - throw Error(format("cannot create symlink `%1%'; already exists") % gcRoot); + throw Error(std::format("cannot create symlink `{}'; already exists", gcRoot)); makeSymlink(gcRoot, storePath); store.addIndirectRoot(gcRoot); } else { if (!allowOutsideRootsDir) { - Path rootsDir = canonPath((format("%1%/%2%") % settings.nixStateDir % gcRootsDir).str()); + Path rootsDir = canonPath(std::format("{}/{}", settings.nixStateDir, gcRootsDir)); if (string(gcRoot, 0, rootsDir.size() + 1) != rootsDir + "/") - throw Error(format( - "path `%1%' is not a valid garbage collector root; " - "it's not in the directory `%2%'") - % gcRoot % rootsDir); + throw Error(std::format( + "path `{}' is not a valid garbage collector root; " + "it's not in the directory `{}'", + gcRoot, rootsDir)); } if (baseNameOf(gcRoot) == baseNameOf(storePath)) @@ -132,10 +130,10 @@ Path addPermRoot(StoreAPI & store, const Path & _storePath, Roots roots = store.findRoots(); if (roots.find(gcRoot) == roots.end()) printMsg(lvlError, - format( - "warning: `%1%' is not in a directory where the garbage collector looks for roots; " - "therefore, `%2%' might be removed by the garbage collector") - % gcRoot % storePath); + std::format( + "warning: `{}' is not in a directory where the garbage collector looks for roots; " + "therefore, `{}' might be removed by the garbage collector", + gcRoot, storePath)); } /* Grab the global GC root, causing us to block while a GC is in @@ -153,11 +151,10 @@ void LocalStore::addTempRoot(const Path & path) if (fdTempRoots == -1) { while (1) { - Path dir = (format("%1%/%2%") % settings.nixStateDir % tempRootsDir).str(); + Path dir = std::format("{}/{}", settings.nixStateDir, tempRootsDir); createDirs(dir); - fnTempRoots = (format("%1%/%2%") - % dir % getpid()).str(); + fnTempRoots = std::format("{}/{}", dir, getpid()); AutoCloseFD fdGCLock = openGCLock(ltRead); @@ -170,14 +167,14 @@ void LocalStore::addTempRoot(const Path & path) fdGCLock.close(); - debug(format("acquiring read lock on `%1%'") % fnTempRoots); + debug(std::format("acquiring read lock on `{}'", fnTempRoots)); lockFile(fdTempRoots, ltRead, true); /* Check whether the garbage collector didn't get in our way. */ struct stat st; if (fstat(fdTempRoots, &st) == -1) - throw SysError(format("statting `%1%'") % fnTempRoots); + throw SysError(std::format("statting `{}'", fnTempRoots)); if (st.st_size == 0) break; /* The garbage collector deleted this file before we could @@ -189,14 +186,14 @@ void LocalStore::addTempRoot(const Path & path) /* Upgrade the lock to a write lock. This will cause us to block if the garbage collector is holding our lock. */ - debug(format("acquiring write lock on `%1%'") % fnTempRoots); + debug(std::format("acquiring write lock on `{}'", fnTempRoots)); lockFile(fdTempRoots, ltWrite, true); string s = path + '\0'; writeFull(fdTempRoots, s); /* Downgrade to a read lock. */ - debug(format("downgrading to read lock on `%1%'") % fnTempRoots); + debug(std::format("downgrading to read lock on `{}'", fnTempRoots)); lockFile(fdTempRoots, ltRead, true); } @@ -210,17 +207,17 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds) /* Read the `temproots' directory for per-process temporary root files. */ DirEntries tempRootFiles = readDirectory( - (format("%1%/%2%") % settings.nixStateDir % tempRootsDir).str()); + std::format("{}/{}", settings.nixStateDir, tempRootsDir)); for (auto & i : tempRootFiles) { - Path path = (format("%1%/%2%/%3%") % settings.nixStateDir % tempRootsDir % i.name).str(); + Path path = std::format("{}/{}/{}", settings.nixStateDir, tempRootsDir, i.name); - debug(format("reading temporary root file `%1%'") % path); + debug(std::format("reading temporary root file `{}'", path)); FDPtr fd(new AutoCloseFD(open(path.c_str(), O_RDWR, 0666))); if (*fd == -1) { /* It's okay if the file has disappeared. */ if (errno == ENOENT) continue; - throw SysError(format("opening temporary roots file `%1%'") % path); + throw SysError(std::format("opening temporary roots file `{}'", path)); } /* This should work, but doesn't, for some reason. */ @@ -231,7 +228,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds) only succeed if the owning process has died. In that case we don't care about its temporary roots. */ if (lockFile(*fd, ltWrite, false)) { - printMsg(lvlError, format("removing stale temporary roots file `%1%'") % path); + printMsg(lvlError, std::format("removing stale temporary roots file `{}'", path)); unlink(path.c_str()); writeFull(*fd, "d"); continue; @@ -240,7 +237,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds) /* Acquire a read lock. This will prevent the owning process from upgrading to a write lock, therefore it will block in addTempRoot(). */ - debug(format("waiting for read lock on `%1%'") % path); + debug(std::format("waiting for read lock on `{}'", path)); lockFile(*fd, ltRead, true); /* Read the entire file. */ @@ -251,7 +248,7 @@ static void readTempRoots(PathSet & tempRoots, FDs & fds) while ((end = contents.find((char) 0, pos)) != string::npos) { Path root(contents, pos, end - pos); - debug(format("got temporary root `%1%'") % root); + debug(std::format("got temporary root `{}'", root)); assertStorePath(root); tempRoots.insert(root); pos = end + 1; @@ -269,7 +266,7 @@ static void foundRoot(StoreAPI & store, if (store.isValidPath(storePath)) roots[path] = storePath; else - printMsg(lvlInfo, format("skipping invalid root from `%1%' to `%2%'") % path % storePath); + printMsg(lvlInfo, std::format("skipping invalid root from `{}' to `{}'", path, storePath)); } @@ -295,7 +292,7 @@ static void findRoots(StoreAPI & store, const Path & path, unsigned char type, R target = absPath(target, dirOf(path)); if (!pathExists(target)) { if (isInDir(path, settings.nixStateDir + "/" + gcRootsDir + "/auto")) { - printMsg(lvlInfo, format("removing stale link from `%1%' to `%2%'") % path % target); + printMsg(lvlInfo, std::format("removing stale link from `{}' to `{}'", path, target)); unlink(path.c_str()); } } else { @@ -318,8 +315,8 @@ static void findRoots(StoreAPI & store, const Path & path, unsigned char type, R catch (SysError & e) { /* We only ignore permanent failures. */ if (e.errNo == EACCES || e.errNo == ENOENT || e.errNo == ENOTDIR) - printMsg(lvlInfo, format("cannot read potential root '%1%': %2%") - % path % strerror(e.errNo)); + printMsg(lvlInfo, std::format("cannot read potential root '{}': {}", + path, strerror(e.errNo))); else throw; } @@ -342,8 +339,8 @@ Roots LocalStore::findRoots() static void addAdditionalRoots(StoreAPI & store, PathSet & roots) { - debug(format("executing `%1% gc --list-busy' to find additional roots") - % settings.guixProgram); + debug(std::format("executing `{} gc --list-busy' to find additional roots", + settings.guixProgram)); const Strings args = { "gc", "--list-busy" }; string result = runProgram(settings.guixProgram, false, args); @@ -354,7 +351,7 @@ static void addAdditionalRoots(StoreAPI & store, PathSet & roots) if (isInStore(i)) { Path path = toStorePath(i); if (roots.find(path) == roots.end() && store.isValidPath(path)) { - debug(format("got additional root `%1%'") % path); + debug(std::format("got additional root `{}'", path)); roots.insert(path); } } @@ -424,17 +421,17 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path) struct stat st; if (lstat(path.c_str(), &st)) { if (errno == ENOENT) return; - throw SysError(format("getting status of %1%") % path); + throw SysError(std::format("getting status of {}", path)); } if (state.options.maxFreed != ULLONG_MAX) { auto freed = state.results.bytesFreed + state.bytesInvalidated; double fraction = ((double) freed) / (double) state.options.maxFreed; unsigned int percentage = (fraction > 1. ? 1. : fraction) * 100.; - printMsg(lvlInfo, format("[%1%%%] deleting '%2%'") % percentage % path); + printMsg(lvlInfo, std::format("[{}%] deleting '{}'", percentage, path)); } else { auto freed = state.results.bytesFreed + state.bytesInvalidated; - printMsg(lvlInfo, format("[%1%] deleting '%2%'") % showBytes(freed) % path); + printMsg(lvlInfo, std::format("[{}] deleting '{}'", showBytes(freed), path)); } state.results.paths.insert(path); @@ -450,17 +447,17 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path) // size. try { if (chmod(path.c_str(), st.st_mode | S_IWUSR) == -1) - throw SysError(format("making `%1%' writable") % path); + throw SysError(std::format("making `{}' writable", path)); Path tmp = state.trashDir + "/" + baseNameOf(path); if (rename(path.c_str(), tmp.c_str())) - throw SysError(format("unable to rename `%1%' to `%2%'") % path % tmp); + throw SysError(std::format("unable to rename `{}' to `{}'", path, tmp)); state.bytesInvalidated += size; } catch (SysError & e) { /* In a Docker container, rename(2) returns EXDEV when the source and destination are not both on the "top layer". See: https://bugs.gnu.org/41607 */ if (e.errNo == ENOSPC || e.errNo == EXDEV) { - printMsg(lvlInfo, format("note: can't create move `%1%': %2%") % path % e.msg()); + printMsg(lvlInfo, std::format("note: can't create move `{}': {}", path, e.msg())); deleteGarbage(state, path); } } @@ -468,7 +465,7 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path) deleteGarbage(state, path); if (state.results.bytesFreed + state.bytesInvalidated > state.options.maxFreed) { - printMsg(lvlInfo, format("deleted or invalidated more than %1% bytes; stopping") % state.options.maxFreed); + printMsg(lvlInfo, std::format("deleted or invalidated more than {} bytes; stopping", state.options.maxFreed)); throw GCLimitReached(); } } @@ -487,7 +484,7 @@ bool LocalStore::canReachRoot(GCState & state, PathSet & visited, const Path & p } if (state.roots.find(path) != state.roots.end()) { - printMsg(lvlDebug, format("cannot delete `%1%' because it's a root") % path); + printMsg(lvlDebug, std::format("cannot delete `{}' because it's a root", path)); state.alive.insert(path); return true; } @@ -535,7 +532,7 @@ void LocalStore::tryToDelete(GCState & state, const Path & path) if (path == linksDir || path == state.trashDir) return; - startNest(nest, lvlDebug, format("considering whether to delete `%1%'") % path); + startNest(nest, lvlDebug, std::format("considering whether to delete `{}'", path)); if (!isValidPath(path)) { /* A lock file belonging to a path that we're building right @@ -550,7 +547,7 @@ void LocalStore::tryToDelete(GCState & state, const Path & path) PathSet visited; if (canReachRoot(state, visited, path)) { - printMsg(lvlDebug, format("cannot delete `%1%' because it's still reachable") % path); + printMsg(lvlDebug, std::format("cannot delete `{}' because it's still reachable", path)); } else { /* No path we visited was a root, so everything is garbage. But we only delete ‘path’ and its referrers here so that @@ -571,7 +568,7 @@ void LocalStore::tryToDelete(GCState & state, const Path & path) void LocalStore::removeUnusedLinks(const GCState & state) { AutoCloseDir dir = opendir(linksDir.c_str()); - if (!dir) throw SysError(format("opening directory `%1%'") % linksDir); + if (!dir) throw SysError(std::format("opening directory `{}'", linksDir)); long long actualSize = 0, unsharedSize = 0; @@ -596,15 +593,15 @@ void LocalStore::removeUnusedLinks(const GCState & state) statx_flags &= ~AT_STATX_DONT_SYNC; if (statx(AT_FDCWD, path.c_str(), statx_flags, STATX_SIZE | STATX_NLINK, &st) == -1) - throw SysError(format("statting `%1%'") % path); + throw SysError(std::format("statting `{}'", path)); } else { - throw SysError(format("statting `%1%'") % path); + throw SysError(std::format("statting `{}'", path)); } } #else struct stat st; if (lstat(path.c_str(), &st) == -1) - throw SysError(format("statting `%1%'") % path); + throw SysError(std::format("statting `{}'", path)); #endif /* Drop links for files smaller than 'deduplicationMinSize', even if @@ -616,10 +613,10 @@ void LocalStore::removeUnusedLinks(const GCState & state) continue; } - printMsg(lvlTalkative, format("deleting unused link `%1%'") % path); + printMsg(lvlTalkative, std::format("deleting unused link `{}'", path)); if (unlink(path.c_str()) == -1) - throw SysError(format("deleting `%1%'") % path); + throw SysError(std::format("deleting `{}'", path)); state.results.bytesFreed += st.st_size; #undef st_size @@ -628,11 +625,11 @@ void LocalStore::removeUnusedLinks(const GCState & state) struct stat st; if (stat(linksDir.c_str(), &st) == -1) - throw SysError(format("statting `%1%'") % linksDir); + throw SysError(std::format("statting `{}'", linksDir)); long long overhead = st.st_size; long long freedbytes = (unsharedSize - actualSize - overhead); - printMsg(lvlInfo, format("note: currently hard linking saves %1%") % showBytes(freedbytes)); + printMsg(lvlInfo, std::format("note: currently hard linking saves {}", showBytes(freedbytes))); } @@ -662,7 +659,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) /* Find the roots. Since we've grabbed the GC lock, the set of permanent roots cannot increase now. */ - printMsg(lvlError, format("finding garbage collector roots...")); + printMsg(lvlError, "finding garbage collector roots..."); Roots rootMap = options.ignoreLiveness ? Roots() : findRoots(); for (auto& i : rootMap) state.roots.insert(i.second); @@ -690,7 +687,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) createDirs(state.trashDir); } catch (SysError & e) { if (e.errNo == ENOSPC) { - printMsg(lvlInfo, format("note: can't create trash directory: %1%") % e.msg()); + printMsg(lvlInfo, std::format("note: can't create trash directory: {}", e.msg())); state.moveToTrash = false; } } @@ -705,20 +702,20 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) assertStorePath(i); tryToDelete(state, i); if (state.dead.find(i) == state.dead.end()) - throw Error(format("cannot delete path `%1%' since it is still alive") % i); + throw Error(std::format("cannot delete path `{}' since it is still alive", i)); } } else if (options.maxFreed > 0) { if (state.shouldDelete) - printMsg(lvlError, format("deleting garbage...")); + printMsg(lvlError, "deleting garbage..."); else - printMsg(lvlError, format("determining live/dead paths...")); + printMsg(lvlError, "determining live/dead paths..."); try { AutoCloseDir dir = opendir(settings.nixStore.c_str()); - if (!dir) throw SysError(format("opening directory `%1%'") % settings.nixStore); + if (!dir) throw SysError(std::format("opening directory `{}'", settings.nixStore)); /* Read the store and immediately delete all paths that aren't valid. When using --max-freed etc., deleting @@ -773,12 +770,12 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) fds.clear(); /* Delete the trash directory. */ - printMsg(lvlInfo, format("deleting `%1%'") % state.trashDir); + printMsg(lvlInfo, std::format("deleting `{}'", state.trashDir)); deleteGarbage(state, state.trashDir); /* Clean up the links directory. */ if (options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific) { - printMsg(lvlError, format("deleting unused links...")); + printMsg(lvlError, "deleting unused links..."); removeUnusedLinks(state); } diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc index 31da8d4769..16f43f6abc 100644 --- a/nix/libstore/globals.cc +++ b/nix/libstore/globals.cc @@ -6,7 +6,7 @@ #include <map> #include <algorithm> - +#include <format> namespace nix { @@ -156,8 +156,8 @@ void Settings::_get(bool & res, const string & name) if (i == settings.end()) return; if (i->second == "true") res = true; else if (i->second == "false") res = false; - else throw Error(format("configuration option `%1%' should be either `true' or `false', not `%2%'") - % name % i->second); + else throw Error(std::format("configuration option `{}' should be either `true' or `false', not `{}'", + name, i->second)); } @@ -183,7 +183,7 @@ template<class N> void Settings::_get(N & res, const string & name) SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; if (!string2Int(i->second, res)) - throw Error(format("configuration setting `%1%' should have an integer value") % name); + throw Error(std::format("configuration setting `{}' should have an integer value", name)); } diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index 50ef707fdf..f11f48bcf0 100644 --- a/nix/libstore/local-store.cc +++ b/nix/libstore/local-store.cc @@ -9,7 +9,9 @@ #include <iostream> #include <algorithm> +#include <format> #include <cstring> +#include <cassert> #include <sys/types.h> #include <sys/stat.h> @@ -45,12 +47,12 @@ void checkStoreNotSymlink() struct stat st; while (path != "/") { if (lstat(path.c_str(), &st)) - throw SysError(format("getting status of `%1%'") % path); + throw SysError(std::format("getting status of `{}'", path)); if (S_ISLNK(st.st_mode)) - throw Error(format( - "the path `%1%' is a symlink; " - "this is not allowed for the store and its parent directories") - % path); + throw Error(std::format( + "the path `{}' is a symlink; " + "this is not allowed for the store and its parent directories", + path)); path = dirOf(path); } } @@ -86,25 +88,24 @@ LocalStore::LocalStore(bool reserveSpace) if (getuid() == 0 && settings.buildUsersGroup != "") { if (chmod(perUserDir.c_str(), 0755) == -1) - throw SysError(format("could not set permissions on '%1%' to 755") - % perUserDir); + throw SysError(std::format("could not set permissions on '{}' to 755", perUserDir)); mode_t perm = 01775; struct group * gr = getgrnam(settings.buildUsersGroup.c_str()); if (!gr) - throw Error(format("the group `%1%' specified in `build-users-group' does not exist") - % settings.buildUsersGroup); + throw Error(std::format("the group `{}' specified in `build-users-group' does not exist", + settings.buildUsersGroup)); else { struct stat st; if (stat(settings.nixStore.c_str(), &st)) - throw SysError(format("getting attributes of path '%1%'") % settings.nixStore); + throw SysError(std::format("getting attributes of path '{}'", settings.nixStore)); if (st.st_uid != 0 || st.st_gid != gr->gr_gid || (st.st_mode & ~S_IFMT) != perm) { if (chown(settings.nixStore.c_str(), 0, gr->gr_gid) == -1) - throw SysError(format("changing ownership of path '%1%'") % settings.nixStore); + throw SysError(std::format("changing ownership of path '{}'", settings.nixStore)); if (chmod(settings.nixStore.c_str(), perm) == -1) - throw SysError(format("changing permissions on path '%1%'") % settings.nixStore); + throw SysError(std::format("changing permissions on path '{}'", settings.nixStore)); } } } @@ -159,20 +160,20 @@ LocalStore::LocalStore(bool reserveSpace) upgrade. */ int curSchema = getSchema(); if (curSchema > nixSchemaVersion) - throw Error(format("current store schema is version %1%, but I only support %2%") - % curSchema % nixSchemaVersion); + throw Error(std::format("current store schema is version {}, but I only support {}", + curSchema, nixSchemaVersion)); else if (curSchema == 0) { /* new store */ curSchema = nixSchemaVersion; openDB(true); - writeFile(schemaPath, (format("%1%") % nixSchemaVersion).str()); + writeFile(schemaPath, std::format("{}", nixSchemaVersion)); } else if (curSchema < nixSchemaVersion) { /* Guix always used version 7 of the schema. */ throw Error( - format("Your store database uses an implausibly old schema, version %1%.") - % curSchema); + std::format("Your store database uses an implausibly old schema, version {}.", + curSchema)); } else openDB(false); @@ -198,7 +199,7 @@ int LocalStore::getSchema() if (pathExists(schemaPath)) { string s = readFile(schemaPath); if (!string2Int(s, curSchema)) - throw Error(format("`%1%' is corrupt") % schemaPath); + throw Error(std::format("`{}' is corrupt", schemaPath)); } return curSchema; } @@ -207,13 +208,13 @@ int LocalStore::getSchema() void LocalStore::openDB(bool create) { if (access(settings.nixDBPath.c_str(), R_OK | W_OK)) - throw SysError(format("store database directory `%1%' is not writable") % settings.nixDBPath); + throw SysError(std::format("store database directory `{}' is not writable", settings.nixDBPath)); /* Open the store database. */ string dbPath = settings.nixDBPath + "/db.sqlite"; if (sqlite3_open_v2(dbPath.c_str(), &db.db, SQLITE_OPEN_READWRITE | (create ? SQLITE_OPEN_CREATE : 0), 0) != SQLITE_OK) - throw Error(format("cannot open store database `%1%'") % dbPath); + throw Error(std::format("cannot open store database `{}'", dbPath)); if (sqlite3_busy_timeout(db, 60 * 60 * 1000) != SQLITE_OK) throwSQLiteError(db, "setting timeout"); @@ -317,7 +318,7 @@ void LocalStore::makeStoreWritable() throw SysError("setting up a private mount namespace"); if (mount(0, settings.nixStore.c_str(), "none", MS_REMOUNT | MS_BIND, 0) == -1) - throw SysError(format("remounting %1% writable") % settings.nixStore); + throw SysError(std::format("remounting {} writable", settings.nixStore)); } #endif } @@ -338,7 +339,7 @@ static void canonicaliseTimestampAndPermissions(const Path & path, const struct | 0444 | (st.st_mode & S_IXUSR ? 0111 : 0); if (chmod(path.c_str(), mode) == -1) - throw SysError(format("changing mode of `%1%' to %2$o") % path % mode); + throw SysError(std::format("changing mode of `{}' to {:o}", path, mode)); } } @@ -356,7 +357,7 @@ static void canonicaliseTimestampAndPermissions(const Path & path, const struct #else if (!S_ISLNK(st.st_mode) && utimes(path.c_str(), times) == -1) #endif - throw SysError(format("changing modification time of `%1%'") % path); + throw SysError(std::format("changing modification time of `{}'", path)); } } @@ -365,7 +366,7 @@ void canonicaliseTimestampAndPermissions(const Path & path) { struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); canonicaliseTimestampAndPermissions(path, st); } @@ -376,11 +377,11 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); /* Really make sure that the path is of a supported type. */ if (!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))) - throw Error(format("file ‘%1%’ has an unsupported type") % path); + throw Error(std::format("file `{}' has an unsupported type", path)); /* Fail if the file is not owned by the build user. This prevents us from messing up the ownership/permissions of files @@ -391,7 +392,7 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe if (fromUid != (uid_t) -1 && st.st_uid != fromUid) { assert(!S_ISDIR(st.st_mode)); if (inodesSeen.find(Inode(st.st_dev, st.st_ino)) == inodesSeen.end()) - throw BuildError(format("invalid ownership on file `%1%'") % path); + throw BuildError(std::format("invalid ownership on file `{}'", path)); mode_t mode = st.st_mode & ~S_IFMT; assert(S_ISLNK(st.st_mode) || (st.st_uid == geteuid() && (mode == 0444 || mode == 0555) && st.st_mtime == mtimeStore)); return; @@ -415,8 +416,8 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe if (!S_ISLNK(st.st_mode) && chown(path.c_str(), geteuid(), getegid()) == -1) #endif - throw SysError(format("changing owner of `%1%' to %2%") - % path % geteuid()); + throw SysError(std::format("changing owner of `{}' to {}", + path, geteuid())); } if (S_ISDIR(st.st_mode)) { @@ -435,11 +436,11 @@ void canonicalisePathMetaData(const Path & path, uid_t fromUid, InodesSeen & ino be a symlink, since we can't change its ownership. */ struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); if (st.st_uid != geteuid()) { assert(S_ISLNK(st.st_mode)); - throw Error(format("wrong ownership of top-level store path `%1%'") % path); + throw Error(std::format("wrong ownership of top-level store path `{}'", path)); } } @@ -460,7 +461,7 @@ void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation & if (isFixedOutputDrv(drv)) { DerivationOutputs::const_iterator out = drv.outputs.find("out"); if (out == drv.outputs.end()) - throw Error(format("derivation `%1%' does not have an output named `out'") % drvPath); + throw Error(std::format("derivation `{}' does not have an output named `out'", drvPath)); bool recursive; HashType ht; Hash h; out->second.parseHashInfo(recursive, ht, h); @@ -468,8 +469,8 @@ void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation & StringPairs::const_iterator j = drv.env.find("out"); if (out->second.path != outPath || j == drv.env.end() || j->second != outPath) - throw Error(format("derivation `%1%' has incorrect output `%2%', should be `%3%'") - % drvPath % out->second.path % outPath); + throw Error(std::format("derivation `{}' has incorrect output `{}', should be `{}'", + drvPath, out->second.path, outPath)); } else { @@ -485,8 +486,8 @@ void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation & Path outPath = makeOutputPath(i.first, h, drvName); StringPairs::const_iterator j = drv.env.find(i.first); if (i.second.path != outPath || j == drv.env.end() || j->second != outPath) - throw Error(format("derivation `%1%' has incorrect output `%2%', should be `%3%'") - % drvPath % i.second.path % outPath); + throw Error(std::format("derivation `{}' has incorrect output `{}', should be `{}'", + drvPath, i.second.path, outPath)); } } } @@ -583,12 +584,12 @@ Hash parseHashField(const Path & path, const string & s) { string::size_type colon = s.find(':'); if (colon == string::npos) - throw Error(format("corrupt hash `%1%' in valid-path entry for `%2%'") - % s % path); + throw Error(std::format("corrupt hash `{}' in valid-path entry for `{}'", + s, path)); HashType ht = parseHashType(string(s, 0, colon)); if (ht == htUnknown) - throw Error(format("unknown hash type `%1%' in valid-path entry for `%2%'") - % string(s, 0, colon) % path); + throw Error(std::format("unknown hash type `{}' in valid-path entry for `{}'", + string(s, 0, colon), path)); return parseHash(ht, string(s, colon + 1)); } @@ -606,7 +607,7 @@ ValidPathInfo LocalStore::queryPathInfo(const Path & path) auto useQueryPathInfo(stmtQueryPathInfo.use()(path)); if (!useQueryPathInfo.next()) - throw Error(format("path `%1%' is not valid") % path); + throw Error(std::format("path `{}' is not valid", path)); info.id = useQueryPathInfo.getInt(0); @@ -647,7 +648,7 @@ uint64_t LocalStore::queryValidPathId(const Path & path) { auto use(stmtQueryPathInfo.use()(path)); if (!use.next()) - throw Error(format("path ‘%1%’ is not valid") % path); + throw Error(std::format("path `%1%' is not valid", path)); return use.getInt(0); } @@ -809,8 +810,8 @@ string LocalStore::getLineFromSubstituter(Agent & run) if (errno == EINTR) continue; throw SysError("reading from substituter's stderr"); } - if (n == 0) throw EndOfFile(format("`%1% substitute' died unexpectedly") - % settings.guixProgram); + if (n == 0) throw EndOfFile(std::format("`{} substitute' died unexpectedly", + settings.guixProgram)); err.append(buf, n); string::size_type p; while (((p = err.find('\n')) != string::npos) @@ -840,7 +841,7 @@ template<class T> T LocalStore::getIntLineFromSubstituter(Agent & run) string s = getLineFromSubstituter(run); T res; if (!string2Int(s, res)) - throw Error(format("integer expected from stream: %1%") % s); + throw Error(std::format("integer expected from stream: {}", s)); return res; } @@ -897,7 +898,7 @@ void LocalStore::querySubstitutablePathInfos(PathSet & paths, SubstitutablePathI Path path = getLineFromSubstituter(run); if (path == "") break; if (paths.find(path) == paths.end()) - throw Error(format("got unexpected path `%1%' from substituter") % path); + throw Error(std::format("got unexpected path `{}' from substituter", path)); paths.erase(path); SubstitutablePathInfo & info(infos[path]); info.deriver = getLineFromSubstituter(run); @@ -990,7 +991,7 @@ void LocalStore::registerValidPaths(const ValidPathInfos & infos) there are no referrers. */ void LocalStore::invalidatePath(const Path & path) { - debug(format("invalidating path `%1%'") % path); + debug(std::format("invalidating path `{}'", path)); drvHashes.erase(path); @@ -1060,7 +1061,7 @@ Path LocalStore::addToStore(const string & name, const Path & _srcPath, bool recursive, HashType hashAlgo, PathFilter & filter, bool repair) { Path srcPath(absPath(_srcPath)); - debug(format("adding `%1%' to the store") % srcPath); + debug(std::format("adding `{}' to the store", srcPath)); /* Read the whole path into memory. This is not a very scalable method for very large paths, but `copyPath' is mainly used for @@ -1139,9 +1140,9 @@ static void checkSecrecy(const Path & path) { struct stat st; if (stat(path.c_str(), &st)) - throw SysError(format("getting status of `%1%'") % path); + throw SysError(std::format("getting status of `{}'", path)); if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) - throw Error(format("file `%1%' should be secret (inaccessible to everybody else)!") % path); + throw Error(std::format("file `{}' should be secret (inaccessible to everybody else)!", path)); } @@ -1212,9 +1213,9 @@ static std::string signHash(const string &secretKey, const Hash &hash) auto hexHash = printHash(hash); writeLine(agent->toAgent.writeSide, - (format("sign %1%:%2% %3%:%4%") - % secretKey.size() % secretKey - % hexHash.size() % hexHash).str()); + std::format("sign {}:{} {}:{}", + secretKey.size(), secretKey, + hexHash.size(), hexHash)); return readAuthenticateReply(agent->fromAgent.readSide); } @@ -1226,8 +1227,7 @@ static std::string verifySignature(const string &signature) auto agent = authenticationAgent(); writeLine(agent->toAgent.writeSide, - (format("verify %1%:%2%") - % signature.size() % signature).str()); + std::format("verify {}:{}", signature.size(), signature)); return readAuthenticateReply(agent->fromAgent.readSide); } @@ -1237,10 +1237,10 @@ void LocalStore::exportPath(const Path & path, bool sign, { assertStorePath(path); - printMsg(lvlInfo, format("exporting path `%1%'") % path); + printMsg(lvlInfo, std::format("exporting path `{}'", path)); if (!isValidPath(path)) - throw Error(format("path `%1%' is not valid") % path); + throw Error(std::format("path `{}' is not valid", path)); HashAndWriteSink hashAndWriteSink(sink); @@ -1252,8 +1252,8 @@ void LocalStore::exportPath(const Path & path, bool sign, Hash hash = hashAndWriteSink.currentHash(); Hash storedHash = queryPathHash(path); if (hash != storedHash && storedHash != Hash(storedHash.type)) - throw Error(format("hash of path `%1%' has changed from `%2%' to `%3%'!") % path - % printHash(storedHash) % printHash(hash)); + throw Error(std::format("hash of path `{}' has changed from `{}' to `{}'!", + path, printHash(storedHash), printHash(hash))); writeInt(EXPORT_MAGIC, hashAndWriteSink); @@ -1347,7 +1347,7 @@ Path LocalStore::importPath(bool requireSignature, Source & source) bool haveSignature = readInt(hashAndReadSource) == 1; if (requireSignature && !haveSignature) - throw Error(format("imported archive of `%1%' lacks a signature") % dstPath); + throw Error(std::format("imported archive of `{}' lacks a signature", dstPath)); if (haveSignature) { string signature = readString(hashAndReadSource); @@ -1387,8 +1387,8 @@ Path LocalStore::importPath(bool requireSignature, Source & source) if (pathExists(dstPath)) deletePath(dstPath); if (rename(unpacked.c_str(), dstPath.c_str()) == -1) - throw SysError(format("cannot move `%1%' to `%2%'") - % unpacked % dstPath); + throw SysError(std::format("cannot move `{}' to `{}'", + unpacked, dstPath)); canonicalisePathMetaData(dstPath, -1); @@ -1438,8 +1438,8 @@ void LocalStore::invalidatePathChecked(const Path & path) PathSet referrers; queryReferrers_(path, referrers); referrers.erase(path); /* ignore self-references */ if (!referrers.empty()) - throw PathInUse(format("cannot delete path `%1%' because it is in use by %2%") - % path % showPaths(referrers)); + throw PathInUse(std::format("cannot delete path `{}' because it is in use by {}", + path, showPaths(referrers))); invalidatePath(path); } @@ -1450,7 +1450,7 @@ void LocalStore::invalidatePathChecked(const Path & path) bool LocalStore::verifyStore(bool checkContents, bool repair) { - printMsg(lvlError, format("reading the store...")); + printMsg(lvlError, "reading the store..."); bool errors = false; @@ -1483,13 +1483,13 @@ bool LocalStore::verifyStore(bool checkContents, bool repair) ValidPathInfo info = queryPathInfo(i); /* Check the content hash (optionally - slow). */ - printMsg(lvlTalkative, format("checking contents of `%1%'") % i); + printMsg(lvlTalkative, std::format("checking contents of `{}'", i)); HashResult current = hashPath(info.hash.type, i); if (info.hash != nullHash && info.hash != current.first) { - printMsg(lvlError, format("path `%1%' was modified! " - "expected hash `%2%', got `%3%'") - % i % printHash(info.hash) % printHash(current.first)); + printMsg(lvlError, std::format("path `{}' was modified! " + "expected hash `{}', got `{}'", + i, printHash(info.hash), printHash(current.first))); if (repair) repairPath(i); else errors = true; } else { @@ -1497,14 +1497,14 @@ bool LocalStore::verifyStore(bool checkContents, bool repair) /* Fill in missing hashes. */ if (info.hash == nullHash) { - printMsg(lvlError, format("fixing missing hash on `%1%'") % i); + printMsg(lvlError, std::format("fixing missing hash on `{}'", i)); info.hash = current.first; update = true; } /* Fill in missing narSize fields (from old stores). */ if (info.narSize == 0) { - printMsg(lvlError, format("updating size field on `%1%' to %2%") % i % current.second); + printMsg(lvlError, std::format("updating size field on `{}' to {}", i, current.second)); info.narSize = current.second; update = true; } @@ -1517,9 +1517,9 @@ bool LocalStore::verifyStore(bool checkContents, bool repair) /* It's possible that the path got GC'ed, so ignore errors on invalid paths. */ if (isValidPath(i)) - printMsg(lvlError, format("error: %1%") % e.msg()); + printMsg(lvlError, std::format("error: {}", e.msg())); else - printMsg(lvlError, format("warning: %1%") % e.msg()); + printMsg(lvlError, std::format("warning: {}", e.msg())); errors = true; } } @@ -1538,7 +1538,7 @@ void LocalStore::verifyPath(const Path & path, const PathSet & store, done.insert(path); if (!isStorePath(path)) { - printMsg(lvlError, format("path `%1%' is not in the store") % path); + printMsg(lvlError, std::format("path `{}' is not in the store", path)); invalidatePath(path); return; } @@ -1556,15 +1556,15 @@ void LocalStore::verifyPath(const Path & path, const PathSet & store, } if (canInvalidate) { - printMsg(lvlError, format("path `%1%' disappeared, removing from database...") % path); + printMsg(lvlError, std::format("path `{}' disappeared, removing from database...", path)); invalidatePath(path); } else { - printMsg(lvlError, format("path `%1%' disappeared, but it still has valid referrers!") % path); + printMsg(lvlError, std::format("path `{}' disappeared, but it still has valid referrers!", path)); if (repair) try { repairPath(path); } catch (Error & e) { - printMsg(lvlError, format("warning: %1%") % e.msg()); + printMsg(lvlError, std::format("warning: {}", e.msg())); errors = true; } else errors = true; @@ -1581,7 +1581,7 @@ bool LocalStore::pathContentsGood(const Path & path) { std::map<Path, bool>::iterator i = pathContentsGoodCache.find(path); if (i != pathContentsGoodCache.end()) return i->second; - printMsg(lvlInfo, format("checking path `%1%'...") % path); + printMsg(lvlInfo, std::format("checking path `{}'...", path)); ValidPathInfo info = queryPathInfo(path); bool res; if (!pathExists(path)) @@ -1592,7 +1592,7 @@ bool LocalStore::pathContentsGood(const Path & path) res = info.hash == nullHash || info.hash == current.first; } pathContentsGoodCache[path] = res; - if (!res) printMsg(lvlError, format("path `%1%' is corrupted or missing!") % path); + if (!res) printMsg(lvlError, std::format("path `{}' is corrupted or missing!", path)); return res; } @@ -1617,14 +1617,14 @@ void LocalStore::createUser(const std::string & userName, uid_t userId) auto created = createDirs(dir); if (!created.empty()) { if (chmod(dir.c_str(), 0755) == -1) - throw SysError(format("changing permissions of directory '%s'") % dir); + throw SysError(std::format("changing permissions of directory '{}'", dir)); /* The following operation requires CAP_CHOWN or can be handled manually by a user with CAP_CHOWN. */ if (chown(dir.c_str(), userId, -1) == -1) { rmdir(dir.c_str()); string message = strerror(errno); - printMsg(lvlInfo, format("failed to change owner of directory '%1%' to %2%: %3%") % dir % userId % message); + printMsg(lvlInfo, std::format("failed to change owner of directory '{}' to {}: {}", dir, userId, message)); } } } diff --git a/nix/libstore/misc.cc b/nix/libstore/misc.cc index e9904f3c4f..943fb9c971 100644 --- a/nix/libstore/misc.cc +++ b/nix/libstore/misc.cc @@ -4,6 +4,7 @@ #include "local-store.hh" #include "globals.hh" +#include <format> namespace nix { @@ -65,7 +66,7 @@ static void dfsVisit(StoreAPI & store, const PathSet & paths, PathSet & parents) { if (parents.find(path) != parents.end()) - throw BuildError(format("cycle detected in the references of `%1%'") % path); + throw BuildError(std::format("cycle detected in the references of `{}'", path)); if (visited.find(path) != visited.end()) return; visited.insert(path); @@ -99,19 +100,19 @@ Paths topoSortPaths(StoreAPI & store, const PathSet & paths) string showBytes(long long bytes) { if (llabs(bytes > exp2l(60))) { - return (format("%7.2f EiB") % (bytes / exp2l(60))).str(); + return std::format("{:7.2f} EiB", bytes / exp2l(60)); } else if (llabs(bytes > exp2l(50))) { - return (format("%7.2f PiB") % (bytes / exp2l(50))).str(); + return std::format("{:7.2f} PiB", bytes / exp2l(50)); } else if (llabs(bytes > exp2l(40))) { - return (format("%7.2f TiB") % (bytes / exp2l(40))).str(); + return std::format("{:7.2f} TiB", bytes / exp2l(40)); } else if (llabs(bytes > exp2l(30))) { - return (format("%7.2f GiB") % (bytes / exp2l(30))).str(); + return std::format("{:7.2f} GiB", bytes / exp2l(30)); } else if (llabs(bytes > exp2l(20))) { - return (format("%7.2f MiB") % (bytes / exp2l(20))).str(); + return std::format("{:7.2f} MiB", bytes / exp2l(20)); } else if (llabs(bytes > exp2l(10))) { - return (format("%7.2f KiB") % (bytes / exp2l(10))).str(); + return std::format("{:7.2f} KiB", bytes / exp2l(10)); } else { - return (format("%4f bytes") % bytes).str(); + return std::format("{:4} bytes", bytes); } } diff --git a/nix/libstore/optimise-store.cc b/nix/libstore/optimise-store.cc index e17d9160d6..d69c43e997 100644 --- a/nix/libstore/optimise-store.cc +++ b/nix/libstore/optimise-store.cc @@ -12,7 +12,7 @@ #include <unistd.h> #include <errno.h> #include <stdio.h> - +#include <format> namespace nix { @@ -24,9 +24,9 @@ static void makeWritable(const Path & path) { struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); if (chmod(path.c_str(), st.st_mode | S_IWUSR) == -1) - throw SysError(format("changing writability of `%1%'") % path); + throw SysError(std::format("changing writability of `{}'", path)); } @@ -52,7 +52,7 @@ LocalStore::InodeHash LocalStore::loadInodeHash() InodeHash inodeHash; AutoCloseDir dir = opendir(linksDir.c_str()); - if (!dir) throw SysError(format("opening directory `%1%'") % linksDir); + if (!dir) throw SysError(std::format("opening directory `{}'", linksDir)); struct dirent * dirent; while (errno = 0, dirent = readdir(dir)) { /* sic */ @@ -60,9 +60,9 @@ LocalStore::InodeHash LocalStore::loadInodeHash() // We don't care if we hit non-hash files, anything goes inodeHash.insert(dirent->d_ino); } - if (errno) throw SysError(format("reading directory `%1%'") % linksDir); + if (errno) throw SysError(std::format("reading directory `{}'", linksDir)); - printMsg(lvlTalkative, format("loaded %1% hash inodes") % inodeHash.size()); + printMsg(lvlTalkative, std::format("loaded {} hash inodes", inodeHash.size())); return inodeHash; } @@ -73,14 +73,14 @@ Strings LocalStore::readDirectoryIgnoringInodes(const Path & path, const InodeHa Strings names; AutoCloseDir dir = opendir(path.c_str()); - if (!dir) throw SysError(format("opening directory `%1%'") % path); + if (!dir) throw SysError(std::format("opening directory `{}'", path)); struct dirent * dirent; while (errno = 0, dirent = readdir(dir)) { /* sic */ checkInterrupt(); if (inodeHash.count(dirent->d_ino)) { - printMsg(lvlDebug, format("`%1%' is already linked") % dirent->d_name); + printMsg(lvlDebug, std::format("`{}' is already linked", dirent->d_name)); continue; } @@ -88,7 +88,7 @@ Strings LocalStore::readDirectoryIgnoringInodes(const Path & path, const InodeHa if (name == "." || name == "..") continue; names.push_back(name); } - if (errno) throw SysError(format("reading directory `%1%'") % path); + if (errno) throw SysError(std::format("reading directory `{}'", path)); return names; } @@ -100,7 +100,7 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); if (S_ISDIR(st.st_mode)) { Strings names = readDirectoryIgnoringInodes(path, inodeHash); @@ -121,13 +121,13 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa Guix System (example: $fontconfig/var/cache being modified). Skip those files. FIXME: check the modification time. */ if (S_ISREG(st.st_mode) && (st.st_mode & S_IWUSR)) { - printMsg(lvlError, format("skipping suspicious writable file `%1%'") % path); + printMsg(lvlError, std::format("skipping suspicious writable file `{}'", path)); return; } /* This can still happen on top-level files. */ if (st.st_nlink > 1 && inodeHash.count(st.st_ino)) { - printMsg(lvlDebug, format("`%1%' is already linked, with %2% other file(s).") % path % (st.st_nlink - 2)); + printMsg(lvlDebug, std::format("`{}' is already linked, with {} other file(s).", path, (st.st_nlink - 2))); return; } @@ -141,7 +141,7 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa contents of the symlink (i.e. the result of readlink()), not the contents of the target (which may not even exist). */ Hash hash = hashPath(htSHA256, path).first; - printMsg(lvlDebug, format("`%1%' has hash `%2%'") % path % printHash(hash)); + printMsg(lvlDebug, std::format("`{}' has hash `{}'", path, printHash(hash))); /* Check if this is a known hash. */ Path linkPath = linksDir + "/" + printHash32(hash); @@ -164,12 +164,12 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa /* On ext4, that probably means the directory index is full. When that happens, it's fine to ignore it: we just effectively disable deduplication of this file. */ - printMsg(lvlInfo, format("cannot link `%1%' to `%2%': %3%") - % linkPath % path % strerror(ENOSPC)); + printMsg(lvlInfo, std::format("cannot link `{}' to `{}': {}", + linkPath, path, strerror(ENOSPC))); return; default: - throw SysError(format("cannot link `%1%' to `%2%'") % linkPath % path); + throw SysError(std::format("cannot link `{}' to `{}'", linkPath, path)); } } @@ -177,20 +177,20 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa current file with a hard link to that file. */ struct stat stLink; if (lstat(linkPath.c_str(), &stLink)) - throw SysError(format("getting attributes of path `%1%'") % linkPath); + throw SysError(std::format("getting attributes of path `{}'", linkPath)); if (st.st_ino == stLink.st_ino) { - printMsg(lvlDebug, format("`%1%' is already linked to `%2%'") % path % linkPath); + printMsg(lvlDebug, std::format("`{}' is already linked to `{}'", path, linkPath)); return; } if (st.st_size != stLink.st_size) { - printMsg(lvlError, format("removing corrupted link ‘%1%’") % linkPath); + printMsg(lvlError, std::format("removing corrupted link `%1%'", linkPath)); unlink(linkPath.c_str()); goto retry; } - printMsg(lvlTalkative, format("linking ‘%1%’ to ‘%2%’") % path % linkPath); + printMsg(lvlTalkative, std::format("linking `%1%' to `%2%'", path, linkPath)); /* Make the containing directory writable, but only if it's not the store itself (we don't want or need to mess with its @@ -202,8 +202,7 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa its timestamp back to 0. */ MakeReadOnly makeReadOnly(mustToggle ? dirOf(path) : ""); - Path tempLink = (format("%1%/.tmp-link-%2%-%3%") - % settings.nixStore % getpid() % rand()).str(); + Path tempLink = std::format("{}/.tmp-link-{}-{}", settings.nixStore, getpid(), rand()); if (link(linkPath.c_str(), tempLink.c_str()) == -1) { if (errno == EMLINK) { @@ -211,27 +210,27 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path, InodeHa systems). This is likely to happen with empty files. Just shrug and ignore. */ if (st.st_size) - printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); + printMsg(lvlInfo, std::format("`{}' has maximum number of links", linkPath)); return; } - throw SysError(format("cannot link `%1%' to `%2%'") % tempLink % linkPath); + throw SysError(std::format("cannot link `{}' to `{}'", tempLink, linkPath)); } /* Atomically replace the old file with the new hard link. */ if (rename(tempLink.c_str(), path.c_str()) == -1) { int renameErrno = errno; if (unlink(tempLink.c_str()) == -1) - printMsg(lvlError, format("unable to unlink `%1%'") % tempLink); + printMsg(lvlError, std::format("unable to unlink `{}'", tempLink)); if (renameErrno == EMLINK) { /* Some filesystems generate too many links on the rename, rather than on the original link. (Probably it temporarily increases the st_nlink field before decreasing it again.) */ if (st.st_size) - printMsg(lvlInfo, format("`%1%' has maximum number of links") % linkPath); + printMsg(lvlInfo, std::format("`{}' has maximum number of links", linkPath)); return; } - throw SysError(format("cannot rename `%1%' to `%2%'") % tempLink % path); + throw SysError(std::format("cannot rename `{}' to `{}'", tempLink, path)); } stats.filesLinked++; @@ -248,7 +247,7 @@ void LocalStore::optimiseStore(OptimiseStats & stats) for (auto& i : paths) { addTempRoot(i); if (!isValidPath(i)) continue; /* path was GC'ed, probably */ - startNest(nest, lvlChatty, format("hashing files in `%1%'") % i); + startNest(nest, lvlChatty, std::format("hashing files in `{}'", i)); optimisePath_(stats, i, inodeHash); } } @@ -260,9 +259,9 @@ void LocalStore::optimiseStore() optimiseStore(stats); printMsg(lvlError, - format("%1% freed by hard-linking %2% files") - % showBytes(stats.bytesFreed) - % stats.filesLinked); + std::format("{} freed by hard-linking {} files", + showBytes(stats.bytesFreed), + stats.filesLinked)); } void LocalStore::optimisePath(const Path & path) diff --git a/nix/libstore/pathlocks.cc b/nix/libstore/pathlocks.cc index c07f047192..ce4671e209 100644 --- a/nix/libstore/pathlocks.cc +++ b/nix/libstore/pathlocks.cc @@ -3,6 +3,8 @@ #include <cerrno> #include <cstdlib> +#include <cassert> +#include <format> #include <sys/types.h> #include <sys/stat.h> @@ -18,7 +20,7 @@ int openLockFile(const Path & path, bool create) fd = open(path.c_str(), O_RDWR | (create ? O_CREAT : 0), 0600); if (fd == -1 && (create || errno != ENOENT)) - throw SysError(format("opening lock file `%1%'") % path); + throw SysError(std::format("opening lock file `{}'", path)); closeOnExec(fd); @@ -54,14 +56,14 @@ bool lockFile(int fd, LockType lockType, bool wait) while (fcntl(fd, F_SETLKW, &lock) != 0) { checkInterrupt(); if (errno != EINTR) - throw SysError(format("acquiring/releasing lock")); + throw SysError("acquiring/releasing lock"); } } else { while (fcntl(fd, F_SETLK, &lock) != 0) { checkInterrupt(); if (errno == EACCES || errno == EAGAIN) return false; if (errno != EINTR) - throw SysError(format("acquiring/releasing lock")); + throw SysError("acquiring/releasing lock"); } } @@ -109,7 +111,7 @@ bool PathLocks::lockPaths(const PathSet & _paths, Path path = i; Path lockPath = path + ".lock"; - debug(format("locking path `%1%'") % path); + debug(std::format("locking path `{}'", path)); if (lockedPaths.find(lockPath) != lockedPaths.end()) throw Error("deadlock: trying to re-acquire self-held lock"); @@ -134,19 +136,19 @@ bool PathLocks::lockPaths(const PathSet & _paths, } } - debug(format("lock acquired on `%1%'") % lockPath); + debug(std::format("lock acquired on `{}'", lockPath)); /* Check that the lock file hasn't become stale (i.e., hasn't been unlinked). */ struct stat st; if (fstat(fd, &st) == -1) - throw SysError(format("statting lock file `%1%'") % lockPath); + throw SysError(std::format("statting lock file `{}'", lockPath)); if (st.st_size != 0) /* This lock file has been unlinked, so we're holding a lock on a deleted file. This means that other processes may create and acquire a lock on `lockPath', and proceed. So we must retry. */ - debug(format("open lock file `%1%' has become stale") % lockPath); + debug(std::format("open lock file `{}' has become stale", lockPath)); else break; } @@ -178,9 +180,9 @@ void PathLocks::unlock() lockedPaths.erase(i.second); if (close(i.first) == -1) printMsg(lvlError, - format("error (ignored): cannot close lock file on `%1%'") % i.second); + std::format("error (ignored): cannot close lock file on `{}'", i.second)); - debug(format("lock released on `%1%'") % i.second); + debug(std::format("lock released on `{}'", i.second)); } fds.clear(); diff --git a/nix/libstore/references.cc b/nix/libstore/references.cc index d9c8a9fbe3..a8ec39ee34 100644 --- a/nix/libstore/references.cc +++ b/nix/libstore/references.cc @@ -5,7 +5,8 @@ #include <map> #include <cstdlib> - +#include <cassert> +#include <format> namespace nix { @@ -37,8 +38,7 @@ static void search(const unsigned char * s, unsigned int len, if (!match) continue; string ref((const char *) s + i, refLength); if (hashes.find(ref) != hashes.end()) { - debug(format("found reference to `%1%' at offset `%2%'") - % ref % i); + debug(std::format("found reference to `{}' at offset `{}'", ref, i)); seen.insert(ref); hashes.erase(ref); } @@ -93,7 +93,7 @@ PathSet scanForReferences(const string & path, string baseName = baseNameOf(i); string::size_type pos = baseName.find('-'); if (pos == string::npos) - throw Error(format("bad reference `%1%'") % i); + throw Error(std::format("bad reference `{}'", i)); string s = string(baseName, 0, pos); assert(s.size() == refLength); assert(backMap.find(s) == backMap.end()); diff --git a/nix/libstore/sqlite.cc b/nix/libstore/sqlite.cc index e08c67f40e..cbd768155e 100644 --- a/nix/libstore/sqlite.cc +++ b/nix/libstore/sqlite.cc @@ -1,11 +1,14 @@ #include "sqlite.hh" #include "util.hh" +#include <format> +#include <cassert> + #include <sqlite3.h> namespace nix { -[[noreturn]] void throwSQLiteError(sqlite3 * db, const format & f) +[[noreturn]] void throwSQLiteError(sqlite3 * db, std::string_view f) { int err = sqlite3_errcode(db); if (err == SQLITE_BUSY || err == SQLITE_PROTOCOL) { @@ -28,10 +31,10 @@ namespace nix { #else sleep(1); #endif - throw SQLiteBusy(format("%1%: %2%") % f.str() % sqlite3_errmsg(db)); + throw SQLiteBusy(std::format("{}: {}", f, sqlite3_errmsg(db))); } else - throw SQLiteError(format("%1%: %2%") % f.str() % sqlite3_errmsg(db)); + throw SQLiteError(std::format("{}: {}", f, sqlite3_errmsg(db))); } SQLite::~SQLite() diff --git a/nix/libstore/sqlite.hh b/nix/libstore/sqlite.hh index 6cadba6849..0c0bc9e6f5 100644 --- a/nix/libstore/sqlite.hh +++ b/nix/libstore/sqlite.hh @@ -3,6 +3,7 @@ #include <functional> #include <string> #include <cstdint> +#include <string_view> #include "types.hh" @@ -85,7 +86,7 @@ struct SQLiteTxn MakeError(SQLiteError, Error); MakeError(SQLiteBusy, SQLiteError); -[[noreturn]] void throwSQLiteError(sqlite3 * db, const format & f); +[[noreturn]] void throwSQLiteError(sqlite3 * db, std::string_view f); /* Convenience function for retrying a SQLite transaction when the database is busy. */ diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 7282188fb3..0596678b8b 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -3,7 +3,7 @@ #include "util.hh" #include <climits> - +#include <format> namespace nix { @@ -32,14 +32,14 @@ bool isStorePath(const Path & path) void assertStorePath(const Path & path) { if (!isStorePath(path)) - throw Error(format("path `%1%' is not in the store") % path); + throw Error(std::format("path `{}' is not in the store", path)); } Path toStorePath(const Path & path) { if (!isInStore(path)) - throw Error(format("path `%1%' is not in the store") % path); + throw Error(std::format("path `{}' is not in the store", path)); Path::size_type slash = path.find('/', settings.nixStore.size() + 1); if (slash == Path::npos) return path; @@ -61,15 +61,14 @@ void checkStoreName(const string & name) /* Disallow names starting with a dot for possible security reasons (e.g., "." and ".."). */ if (string(name, 0, 1) == ".") - throw Error(format("invalid name: `%1%' (can't begin with dot)") % name); + throw Error(std::format("invalid name: `{}' (can't begin with dot)", name)); for (const auto& i : name) if (!((i >= 'A' && i <= 'Z') || (i >= 'a' && i <= 'z') || (i >= '0' && i <= '9') || validChars.find(i) != string::npos)) { - throw Error(format("invalid character `%1%' in name `%2%'") - % i % name); + throw Error(std::format("invalid character `{}' in name `{}'", i, name)); } } @@ -211,13 +210,13 @@ string StoreAPI::makeValidityRegistration(const PathSet & paths, if (showHash) { s += printHash(info.hash) + "\n"; - s += (format("%1%\n") % info.narSize).str(); + s += std::format("{}\n", info.narSize); } Path deriver = showDerivers ? info.deriver : ""; s += deriver + "\n"; - s += (format("%1%\n") % info.references.size()).str(); + s += std::format("{}\n", info.references.size()); for (auto& j : info.references) s += j + "\n"; diff --git a/nix/libutil/affinity.cc b/nix/libutil/affinity.cc index 3e21f43a2e..d50e9f3e9c 100644 --- a/nix/libutil/affinity.cc +++ b/nix/libutil/affinity.cc @@ -2,6 +2,8 @@ #include "util.hh" #include "affinity.hh" +#include <format> + #if HAVE_SCHED_H #include <sched.h> #endif @@ -20,12 +22,12 @@ void setAffinityTo(int cpu) #if HAVE_SCHED_SETAFFINITY if (sched_getaffinity(0, sizeof(cpu_set_t), &savedAffinity) == -1) return; didSaveAffinity = true; - printMsg(lvlDebug, format("locking this thread to CPU %1%") % cpu); + printMsg(lvlDebug, std::format("locking this thread to CPU {}", cpu)); cpu_set_t newAffinity; CPU_ZERO(&newAffinity); CPU_SET(cpu, &newAffinity); if (sched_setaffinity(0, sizeof(cpu_set_t), &newAffinity) == -1) - printMsg(lvlError, format("failed to lock thread to CPU %1%") % cpu); + printMsg(lvlError, std::format("failed to lock thread to CPU {}", cpu)); #endif } diff --git a/nix/libutil/archive.cc b/nix/libutil/archive.cc index 54bcd21f93..0df5285860 100644 --- a/nix/libutil/archive.cc +++ b/nix/libutil/archive.cc @@ -6,6 +6,7 @@ #include <algorithm> #include <vector> #include <map> +#include <format> #include <strings.h> // for strcasecmp @@ -35,7 +36,7 @@ static void dumpContents(const Path & path, size_t size, writeLongLong(size, sink); AutoCloseFD fd = open(path.c_str(), O_RDONLY); - if (fd == -1) throw SysError(format("opening file `%1%'") % path); + if (fd == -1) throw SysError(std::format("opening file `{}'", path)); unsigned char buf[65536]; size_t left = size; @@ -55,7 +56,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter) { struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting attributes of path `%1%'") % path); + throw SysError(std::format("getting attributes of path `{}'", path)); writeString("(", sink); @@ -98,7 +99,7 @@ static void dump(const Path & path, Sink & sink, PathFilter & filter) writeString(readLink(path), sink); } - else throw Error(format("file `%1%' has an unsupported type") % path); + else throw Error(std::format("file `{}' has an unsupported type", path)); writeString(")", sink); } @@ -227,7 +228,7 @@ static void parse(ParseSink & sink, Source & source, const Path & path) } else if (s == "name") { name = readString(source); if (name.empty() || name == "." || name == ".." || name.find('/') != string::npos || name.find((char) 0) != string::npos) - throw Error(format("NAR contains invalid file name `%1%'") % name); + throw Error(std::format("NAR contains invalid file name `{}'", name)); if (name <= prevName) throw Error("NAR directory is not sorted"); prevName = name; @@ -274,7 +275,7 @@ struct RestoreSink : ParseSink { Path p = dstPath + path; if (mkdir(p.c_str(), 0777) == -1) - throw SysError(format("creating directory `%1%'") % p); + throw SysError(std::format("creating directory `{}'", p)); }; void createRegularFile(const Path & path) @@ -282,7 +283,7 @@ struct RestoreSink : ParseSink Path p = dstPath + path; fd.close(); fd = open(p.c_str(), O_CREAT | O_EXCL | O_WRONLY, 0666); - if (fd == -1) throw SysError(format("creating file `%1%'") % p); + if (fd == -1) throw SysError(std::format("creating file `{}'", p)); } void isExecutable() @@ -304,7 +305,7 @@ struct RestoreSink : ParseSink OpenSolaris). Since preallocation is just an optimisation, ignore it. */ if (errno && errno != EINVAL) - throw SysError(format("preallocating file of %1% bytes") % len); + throw SysError(std::format("preallocating file of {} bytes", len)); } #endif } diff --git a/nix/libutil/hash.cc b/nix/libutil/hash.cc index 3cb4d05318..57b369d4a9 100644 --- a/nix/libutil/hash.cc +++ b/nix/libutil/hash.cc @@ -2,6 +2,9 @@ #include <iostream> #include <cstring> +#include <cassert> +#include <string_view> +#include <format> #include "hash.hh" #include "archive.hh" @@ -73,18 +76,18 @@ string printHash(const Hash & hash) } -Hash parseHash(HashType ht, const string & s) +Hash parseHash(HashType ht, std::string_view s) { Hash hash(ht); if (s.length() != hash.hashSize * 2) { string algo = gcry_md_algo_name(ht); - throw Error(format("invalid %1% hash '%2%' (%3% bytes but expected %4%)") - % algo % s % (s.length() / 2) % hash.hashSize); + throw Error(std::format("invalid {} hash '{}' ({} bytes but expected {})", + algo, s, (s.length() / 2), hash.hashSize)); } for (unsigned int i = 0; i < hash.hashSize; i++) { string s2(s, i * 2, 2); if (!isxdigit(s2[0]) || !isxdigit(s2[1])) - throw Error(format("invalid hash `%1%'") % s); + throw Error(std::format("invalid hash `{}'", s)); std::istringstream str(s2); int n; str >> std::hex >> n; @@ -132,7 +135,7 @@ string printHash16or32(const Hash & hash) } -Hash parseHash32(HashType ht, const string & s) +Hash parseHash32(HashType ht, std::string_view s) { Hash hash(ht); unsigned int len = hashLength32(ht); @@ -144,7 +147,7 @@ Hash parseHash32(HashType ht, const string & s) for (digit = 0; digit < base32Chars.size(); ++digit) /* !!! slow */ if (base32Chars[digit] == c) break; if (digit >= 32) - throw Error(format("invalid base-32 hash '%1%'") % s); + throw Error(std::format("invalid base-32 hash '{}'", s)); unsigned int b = n * 5; unsigned int i = b / 8; unsigned int j = b % 8; @@ -156,7 +159,7 @@ Hash parseHash32(HashType ht, const string & s) } -Hash parseHash16or32(HashType ht, const string & s) +Hash parseHash16or32(HashType ht, std::string_view s) { Hash hash(ht); if (s.size() == hash.hashSize * 2) @@ -166,13 +169,13 @@ Hash parseHash16or32(HashType ht, const string & s) /* base-32 representation */ hash = parseHash32(ht, s); else - throw Error(format("hash `%1%' has wrong length for hash type `%2%'") - % s % printHashType(ht)); + throw Error(std::format("hash `{}' has wrong length for hash type `{}'", + s, printHashType(ht))); return hash; } -bool isHash(const string & s) +bool isHash(std::string_view s) { if (s.length() != 32) return false; for (int i = 0; i < 32; i++) { @@ -247,13 +250,13 @@ Hash hashFile(HashType ht, const Path & path) start(ht, ctx); AutoCloseFD fd = open(path.c_str(), O_RDONLY); - if (fd == -1) throw SysError(format("computing hash of file `%1%'") % path); + if (fd == -1) throw SysError(std::format("computing hash of file `{}'", path)); unsigned char buf[8192]; ssize_t n; while ((n = read(fd, buf, sizeof(buf)))) { checkInterrupt(); - if (n == -1) throw SysError(format("reading file `%1%'") % path); + if (n == -1) throw SysError(std::format("reading file `{}'", path)); update(ht, ctx, buf, n); } diff --git a/nix/libutil/hash.hh b/nix/libutil/hash.hh index ac58651a02..1a6b35f074 100644 --- a/nix/libutil/hash.hh +++ b/nix/libutil/hash.hh @@ -51,7 +51,7 @@ struct Hash string printHash(const Hash & hash); /* Parse a hexadecimal representation of a hash code. */ -Hash parseHash(HashType ht, const string & s); +Hash parseHash(HashType ht, std::string_view s); /* Returns the length of a base-32 hash representation. */ unsigned int hashLength32(const Hash & hash); @@ -63,13 +63,13 @@ string printHash32(const Hash & hash); string printHash16or32(const Hash & hash); /* Parse a base-32 representation of a hash code. */ -Hash parseHash32(HashType ht, const string & s); +Hash parseHash32(HashType ht, std::string_view s); /* Parse a base-16 or base-32 representation of a hash code. */ -Hash parseHash16or32(HashType ht, const string & s); +Hash parseHash16or32(HashType ht, std::string_view s); /* Verify that the given string is a valid hash code. */ -bool isHash(const string & s); +bool isHash(std::string_view s); /* Compute the hash of the given string. */ Hash hashString(HashType ht, const string & s); diff --git a/nix/libutil/serialise.cc b/nix/libutil/serialise.cc index 01aeea25c0..befb049c8a 100644 --- a/nix/libutil/serialise.cc +++ b/nix/libutil/serialise.cc @@ -3,7 +3,7 @@ #include <cstring> #include <cerrno> - +#include <cassert> namespace nix { diff --git a/nix/libutil/spawn.cc b/nix/libutil/spawn.cc index 7855275494..c25c3a681f 100644 --- a/nix/libutil/spawn.cc +++ b/nix/libutil/spawn.cc @@ -30,6 +30,8 @@ #include <cstring> #include <cstdlib> #include <cstdint> +#include <cassert> +#include <format> #if HAVE_SYS_MOUNT_H #include <sys/mount.h> @@ -61,8 +63,11 @@ #define pivot_root(new_root, put_old) (syscall(SYS_pivot_root, new_root,put_old)) #endif - -#define CLONE_ENABLED defined(CLONE_NEWNS) +#if defined(CLONE_NEWNS) +#define CLONE_ENABLED 1 +#else +#define CLONE_ENABLED 0 +#endif #if CLONE_ENABLED #include <sys/ioctl.h> @@ -84,7 +89,7 @@ void addPhaseAfter(Phases & phases, string afterLabel, string addLabel, Action a phases.insert(i, p); return; } - throw Error(format("label `%1%' not found in phases") % afterLabel); + throw Error(std::format("label `{}' not found in phases", afterLabel)); } @@ -98,7 +103,7 @@ void addPhaseBefore(Phases & phases, string beforeLabel, string addLabel, Action phases.insert(i, p); return; } - throw Error(format("label `%1%' not found in phases") % beforeLabel); + throw Error(std::format("label `{}' not found in phases", beforeLabel)); } @@ -127,7 +132,7 @@ void deletePhase(Phases & phases, string delLabel) phases.erase(i); return; } - throw Error(format("label `%1%' not found in phases") % delLabel); + throw Error(std::format("label `{}' not found in phases", delLabel)); } @@ -138,7 +143,7 @@ void replacePhase(Phases & phases, string replaceLabel, Action newAction) (*i).action = newAction; return; } - throw Error(format("label `%1' not found in phases") % replaceLabel); + throw Error(std::format("label `{}' not found in phases", replaceLabel)); } @@ -190,7 +195,7 @@ static void earlyIOSetupAction(SpawnContext & ctx) /* Doesn't make sense for it to be writable, but compatibility... */ AutoCloseFD fd = open(ctx.stdinFile.c_str(), O_RDWR); if(fd == -1) - throw SysError(format("cannot open `%1%'") % ctx.stdinFile); + throw SysError(std::format("cannot open `{}'", ctx.stdinFile)); if(dup2(fd, STDIN_FILENO) == -1) throw SysError("cannot dup2 fd into stdin fd"); } @@ -216,7 +221,7 @@ static void chrootAction(SpawnContext & ctx) if(ctx.doChroot) #if HAVE_CHROOT if(chroot(ctx.chrootRootDir.c_str()) == -1) - throw SysError(format("cannot change root directory to '%1%'") % ctx.chrootRootDir); + throw SysError(std::format("cannot change root directory to '{}'", ctx.chrootRootDir)); #else throw Error("chroot is not supported on this system"); #endif @@ -227,7 +232,7 @@ static void chdirAction(SpawnContext & ctx) { if(ctx.setcwd) if(chdir(ctx.cwd.c_str()) == -1) - throw SysError(format("changing into `%1%'") % ctx.cwd); + throw SysError(std::format("changing into `{}'", ctx.cwd)); } @@ -353,7 +358,7 @@ void execAction(SpawnContext & ctx) // kept public for use in 'build.cc' env = envPtrs.data(); } if(execvpe(ctx.program.c_str(), stringsToCharPtrs(ctx.args).data(), env) == -1) - throw SysError(format("executing `%1%'") % ctx.program); + throw SysError(std::format("executing `{}'", ctx.program)); } @@ -478,11 +483,11 @@ static void makeChrootSeparateFilesystemAction(SpawnContext & sctx) a tmpfs on it. */ if(ctx.mountTmpfsOnChroot) { if(mount("none", ctx.chrootRootDir.c_str(), "tmpfs", 0, 0) == -1) - throw SysError(format("unable to mount tmpfs on `%1%'") % ctx.chrootRootDir); + throw SysError(std::format("unable to mount tmpfs on `{}'", ctx.chrootRootDir)); } else { if(mount(ctx.chrootRootDir.c_str(), ctx.chrootRootDir.c_str(), 0, MS_BIND, 0) == -1) - throw SysError(format("unable to bind mount ‘%1%’") % ctx.chrootRootDir); + throw SysError(std::format("unable to bind mount `{}'", ctx.chrootRootDir)); } } #endif @@ -526,7 +531,7 @@ static void bindMount(Path source, Path target, bool readOnly) #if HAVE_SYS_MOUNT_H && defined(MS_BIND) struct stat st; if (lstat(source.c_str(), &st) == -1) - throw SysError(format("getting attributes of path `%1%'") % source); + throw SysError(std::format("getting attributes of path `{}'", source)); if(S_ISDIR(st.st_mode)) createDirs(target); @@ -545,11 +550,11 @@ static void bindMount(Path source, Path target, bool readOnly) while(true){ if(lstat(target.c_str(), &st2) != -1) { if(!S_ISREG(st2.st_mode)) - throw Error(format("mount target `%1%' exists but is not a regular file") % target); + throw Error(std::format("mount target `{}' exists but is not a regular file", target)); break; } if(errno != ENOENT) { - throw SysError(format("stat'ing path `%1%'") % target); + throw SysError(std::format("stat'ing path `{}'", target)); } AutoCloseFD fd = open(target.c_str(), O_WRONLY | O_NOFOLLOW | O_CREAT | O_EXCL, @@ -561,7 +566,7 @@ static void bindMount(Path source, Path target, bool readOnly) /* Note: because of O_CREAT | O_EXCL, EACCES can only mean a * permission issue with the parent directory */ if(errno != EEXIST) - throw SysError(format("Creating placeholder regular file target mount `%1%'") % target); + throw SysError(std::format("Creating placeholder regular file target mount `{}'", target)); } } @@ -569,7 +574,7 @@ static void bindMount(Path source, Path target, bool readOnly) are in an unprivileged mount namespace and not specifying MS_REC would reveal subtrees that had been covered up. */ if (mount(source.c_str(), target.c_str(), 0, MS_BIND|MS_REC, 0) == -1) - throw SysError(format("bind mount from `%1%' to `%2%' failed") % source % target); + throw SysError(std::format("bind mount from `{}' to `{}' failed", source, target)); if(readOnly) { #if defined(MS_REMOUNT) && defined(MS_RDONLY) /* Extra flags passed with MS_BIND are ignored, hence the extra @@ -581,12 +586,12 @@ static void bindMount(Path source, Path target, bool readOnly) #if HAVE_STATVFS struct statvfs stvfs; if(statvfs(target.c_str(), &stvfs) == -1) - throw SysError(format("statvfs of `%1%'") % target); + throw SysError(std::format("statvfs of `{}'", target)); mount_flags |= statfsToMountFlags(stvfs.f_flag); #endif if (mount(source.c_str(), target.c_str(), 0, mount_flags, 0) == -1) - throw SysError(format("read-only remount of `%1%' failed") % target); + throw SysError(std::format("read-only remount of `{}' failed", target)); #else throw Error("remounting read-only is not supported on this platform"); #endif @@ -631,7 +636,7 @@ static void mountProcAction(SpawnContext & sctx) Path target = (ctx.doChroot ? ctx.chrootRootDir : "") + "/proc"; createDirs(target); if(mount("none", target.c_str(), "proc", 0, 0) == -1) - throw SysError(format("mounting `%1%'") % target); + throw SysError(std::format("mounting `{}'", target)); } #endif } @@ -645,7 +650,7 @@ static void mountDevshmAction(SpawnContext & sctx) Path target = (ctx.doChroot ? ctx.chrootRootDir : "") + "/dev/shm"; createDirs(target); if(mount("none", target.c_str(), "tmpfs", 0, 0) == -1) - throw SysError(format("mounting `%1%'") % target); + throw SysError(std::format("mounting `{}'", target)); } #endif } @@ -661,13 +666,13 @@ static void mountDevptsAction(SpawnContext & sctx) if(pathExists(chroot + "/dev/ptmx")) return; createDirs(target); if(mount("none", target.c_str(), "devpts", 0, "newinstance,mode=0620") == -1) - throw SysError(format("mounting `%1%'") % target); + throw SysError(std::format("mounting `{}'", target)); createSymlink("/dev/pts/ptmx", chroot + "/dev/ptmx"); /* Make sure /dev/pts/ptmx is world-writable. With some Linux versions, it is created with permissions 0. */ Path targetPtmx = chroot + "/dev/pts/ptmx"; if (chmod(targetPtmx.c_str(), 0666) == -1) - throw SysError(format("setting permissions on `%1%'") % targetPtmx); + throw SysError(std::format("setting permissions on `{}'", targetPtmx)); } #endif } @@ -679,16 +684,16 @@ static void pivotRootAction(SpawnContext & sctx) CloneSpawnContext & ctx = (CloneSpawnContext &) sctx; if((ctx.cloneFlags & CLONE_NEWNS) != 0 && ctx.doChroot) { if (chdir(ctx.chrootRootDir.c_str()) == -1) - throw SysError(format("cannot change directory to '%1%'") % ctx.chrootRootDir); + throw SysError(std::format("cannot change directory to '{}'", ctx.chrootRootDir)); if (mkdir("real-root", 0) == -1) throw SysError("cannot create real-root directory"); if (pivot_root(".", "real-root") == -1) - throw SysError(format("cannot pivot old root directory onto '%1%'") % (ctx.chrootRootDir + "/real-root")); + throw SysError(std::format("cannot pivot old root directory onto '{}'", (ctx.chrootRootDir + "/real-root"))); if (chroot(".") == -1) - throw SysError(format("cannot change root directory to '%1%'") % ctx.chrootRootDir); + throw SysError(std::format("cannot change root directory to '{}'", ctx.chrootRootDir)); if (umount2("real-root", MNT_DETACH) == -1) throw SysError("cannot unmount real root filesystem"); @@ -761,7 +766,7 @@ void unshareAndInitUserns(int flags, const string & uidMap, throw SysError("reaping userns init process"); } if(!(WIFEXITED(status) != 0 && WEXITSTATUS(status) == EXIT_SUCCESS)) - throw Error(format("userns init child exited with status %1%") % WEXITSTATUS(status)); + throw Error(std::format("userns init child exited with status {}", WEXITSTATUS(status))); } #endif } diff --git a/nix/libutil/types.hh b/nix/libutil/types.hh index 62889e6fa9..1ea5e96c01 100644 --- a/nix/libutil/types.hh +++ b/nix/libutil/types.hh @@ -5,8 +5,9 @@ #include <string> #include <list> #include <set> +#include <vector> +#include <string_view> -#include <boost/format.hpp> /* Before 4.7, gcc's std::exception uses empty throw() specifiers for * its (virtual) destructor and what() in c++11 mode, in violation of spec @@ -26,16 +27,6 @@ using std::string; using std::list; using std::set; using std::vector; -using boost::format; - - -struct FormatOrString -{ - string s; - FormatOrString(const string & s) : s(s) { }; - FormatOrString(const format & f) : s(f.str()) { }; - FormatOrString(const char * s) : s(s) { }; -}; /* BaseError should generally not be caught, as it has Interrupted as @@ -47,7 +38,7 @@ protected: string err; public: unsigned int status; // exit status - BaseError(const FormatOrString & fs, unsigned int status = 1); + BaseError(std::string_view fs, unsigned int status = 1); #ifdef EXCEPTION_NEEDS_THROW_SPEC ~BaseError() throw () { }; const char * what() const throw () { return err.c_str(); } @@ -56,14 +47,14 @@ public: #endif const string & msg() const { return err; } const string & prefix() const { return prefix_; } - BaseError & addPrefix(const FormatOrString & fs); + BaseError & addPrefix(std::string fs); }; #define MakeError(newClass, superClass) \ class newClass : public superClass \ { \ public: \ - newClass(const FormatOrString & fs, unsigned int status = 1) : superClass(fs, status) { }; \ + newClass(std::string_view fs, unsigned int status = 1) : superClass(fs, status) { }; \ }; MakeError(Error, BaseError) @@ -72,7 +63,7 @@ class SysError : public Error { public: int errNo; - SysError(const FormatOrString & fs); + SysError(std::string_view fs); }; diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc index 77f2547b0a..ddce9879ca 100644 --- a/nix/libutil/util.cc +++ b/nix/libutil/util.cc @@ -9,6 +9,8 @@ #include <cstdlib> #include <sstream> #include <cstring> +#include <cassert> +#include <format> #include <sys/wait.h> #include <unistd.h> @@ -35,22 +37,22 @@ extern char * * environ; namespace nix { -BaseError::BaseError(const FormatOrString & fs, unsigned int status) +BaseError::BaseError(std::string_view fs, unsigned int status) : status(status) { - err = fs.s; + err = fs; } -BaseError & BaseError::addPrefix(const FormatOrString & fs) +BaseError & BaseError::addPrefix(std::string fs) { - prefix_ = fs.s + prefix_; + prefix_ = fs + prefix_; return *this; } -SysError::SysError(const FormatOrString & fs) - : Error(format("%1%: %2%") % fs.s % strerror(errno)) +SysError::SysError(std::string_view fs) + : Error(std::format("{}: {}", fs, strerror(errno))) , errNo(errno) { } @@ -114,7 +116,7 @@ Path canonPath(const Path & path, bool resolveSymlinks) string s; if (path[0] != '/') - throw Error(format("not an absolute path: `%1%'") % path); + throw Error(std::format("not an absolute path: `{}'", path)); string::const_iterator i = path.begin(), end = path.end(); string temp; @@ -150,7 +152,7 @@ Path canonPath(const Path & path, bool resolveSymlinks) the symlink target might contain new symlinks). */ if (resolveSymlinks && isLink(s)) { if (++followCount >= maxFollow) - throw Error(format("infinite symlink recursion in path `%1%'") % path); + throw Error(std::format("infinite symlink recursion in path `{}'", path)); temp = absPath(readLink(s), dirOf(s)) + string(i, end); i = temp.begin(); /* restart */ @@ -168,7 +170,7 @@ Path dirOf(const Path & path) { Path::size_type pos = path.rfind('/'); if (pos == string::npos) - throw Error(format("invalid file name `%1%'") % path); + throw Error(std::format("invalid file name `{}'", path)); return pos == 0 ? "/" : Path(path, 0, pos); } @@ -177,7 +179,7 @@ string baseNameOf(const Path & path) { Path::size_type pos = path.rfind('/'); if (pos == string::npos) - throw Error(format("invalid file name `%1%'") % path); + throw Error(std::format("invalid file name `{}'", path)); return string(path, pos + 1); } @@ -195,7 +197,7 @@ struct stat lstat(const Path & path) { struct stat st; if (lstat(path.c_str(), &st)) - throw SysError(format("getting status of `%1%'") % path); + throw SysError(std::format("getting status of `{}'", path)); return st; } @@ -212,7 +214,7 @@ bool pathExists(const Path & path) #endif if (!res) return true; if (errno != ENOENT && errno != ENOTDIR) - throw SysError(format("getting status of %1%") % path); + throw SysError(std::format("getting status of {}", path)); return false; } @@ -222,14 +224,14 @@ Path readLink(const Path & path) checkInterrupt(); struct stat st = lstat(path); if (!S_ISLNK(st.st_mode)) - throw Error(format("`%1%' is not a symlink") % path); + throw Error(std::format("`{}' is not a symlink", path)); std::vector<char> buf(st.st_size); ssize_t rlsize = readlink(path.c_str(), buf.data(), st.st_size); if (rlsize == -1) - throw SysError(format("reading symbolic link '%1%'") % path); + throw SysError(std::format("reading symbolic link '{}'", path)); else if (rlsize > st.st_size) - throw Error(format("symbolic link ‘%1%’ size overflow %2% > %3%") - % path % rlsize % st.st_size); + throw Error(std::format("symbolic link `{}' size overflow {} > {}", + path, rlsize, st.st_size)); return string(buf.begin(), buf.end()); } @@ -253,7 +255,7 @@ static DirEntries readDirectory(DIR *dir) if (name == "." || name == "..") continue; entries.emplace_back(name, dirent->d_ino, dirent->d_type); } - if (errno) throw SysError(format("reading directory")); + if (errno) throw SysError("reading directory"); return entries; } @@ -261,7 +263,7 @@ static DirEntries readDirectory(DIR *dir) DirEntries readDirectory(const Path & path) { AutoCloseDir dir = opendir(path.c_str()); - if (!dir) throw SysError(format("opening directory `%1%'") % path); + if (!dir) throw SysError(std::format("opening directory `{}'", path)); return readDirectory(dir); } @@ -273,7 +275,7 @@ static DirEntries readDirectory(int fd) if (fdcopy < 0) throw SysError("dup"); AutoCloseDir dir = fdopendir(fdcopy); - if (!dir) throw SysError(format("opening directory from file descriptor `%1%'") % fd); + if (!dir) throw SysError(std::format("opening directory from file descriptor `{}'", fd)); return readDirectory(dir); } @@ -304,7 +306,7 @@ string readFile(const Path & path, bool drain) { AutoCloseFD fd = open(path.c_str(), O_RDONLY); if (fd == -1) - throw SysError(format("reading file `%1%'") % path); + throw SysError(std::format("reading file `{}'", path)); return drain ? drainFD(fd) : readFile(fd); } @@ -313,7 +315,7 @@ void writeFile(const Path & path, const string & s) { AutoCloseFD fd = open(path.c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0666); if (fd == -1) - throw SysError(format("writing file '%1%'") % path); + throw SysError(std::format("writing file '{}'", path)); writeFull(fd, s); } @@ -349,7 +351,7 @@ static void _deletePathAt(int fd, const Path & path, const Path & fullPath, unsi { checkInterrupt(); - printMsg(lvlVomit, format("%1%") % fullPath); + printMsg(lvlVomit, std::format("{}", fullPath)); #ifdef HAVE_STATX # define st_mode stx_mode @@ -364,7 +366,7 @@ static void _deletePathAt(int fd, const Path & path, const Path & fullPath, unsi struct stat st; #endif if (fstatat(fd, path.c_str(), &st, AT_SYMLINK_NOFOLLOW)) - throw SysError(format("getting status of `%1%'") % fullPath); + throw SysError(std::format("getting status of `{}'", fullPath)); /* Note: if another process modifies what is at 'path' between now and when we actually delete it, this may be inaccurate, but I know of no @@ -380,17 +382,17 @@ static void _deletePathAt(int fd, const Path & path, const Path & fullPath, unsi O_NOFOLLOW | O_CLOEXEC); if(!dirfd.isOpen()) - throw SysError(format("opening `%1%'") % fullPath); + throw SysError(std::format("opening `{}'", fullPath)); /* st.st_mode may currently be from a different file than what we actually opened, get it straight from the file instead */ if(fstat(dirfd, &st)) - throw SysError(format("re-getting status of `%1'") % fullPath); + throw SysError(std::format("re-getting status of `{}'", fullPath)); /* Make the directory writable. */ if (!(st.st_mode & S_IWUSR)) { if (fchmod(dirfd, st.st_mode | S_IWUSR) == -1) - throw SysError(format("making `%1%' writable") % fullPath); + throw SysError(std::format("making `{}' writable", fullPath)); } for (auto & i : readDirectory(dirfd)) @@ -400,7 +402,7 @@ static void _deletePathAt(int fd, const Path & path, const Path & fullPath, unsi int ret; ret = unlinkat(fd, path.c_str(), S_ISDIR(st.st_mode) ? AT_REMOVEDIR : 0 ); if (ret == -1) - throw SysError(format("cannot unlink `%1%'") % fullPath); + throw SysError(std::format("cannot unlink `{}'", fullPath)); #undef st_mode #undef st_size @@ -425,7 +427,7 @@ void deletePath(const Path & path) void deletePath(const Path & path, unsigned long long & bytesFreed, size_t linkThreshold) { startNest(nest, lvlDebug, - format("recursively deleting path `%1%'") % path); + std::format("recursively deleting path `{}'", path)); bytesFreed = 0; _deletePath(path, bytesFreed, linkThreshold); } @@ -447,14 +449,14 @@ static void copyFile(int sourceFd, int destinationFd) } } else { if (result < 0) - throw SysError(format("copy_file_range `%1%' to `%2%'") % sourceFd % destinationFd); + throw SysError(std::format("copy_file_range `{}' to `{}'", sourceFd, destinationFd)); /* If 'copy_file_range' copied less than requested, try again. */ for (ssize_t copied = result; copied < st.st_size; copied += result) { result = copy_file_range(sourceFd, NULL, destinationFd, NULL, st.st_size - copied, 0); if (result < 0) - throw SysError(format("copy_file_range `%1%' to `%2%'") % sourceFd % destinationFd); + throw SysError(std::format("copy_file_range `{}' to `{}'", sourceFd, destinationFd)); } } } @@ -465,18 +467,18 @@ static void copyFileRecursively(int sourceroot, const Path &source, { struct stat st; if (fstatat(sourceroot, source.c_str(), &st, AT_SYMLINK_NOFOLLOW) == -1) - throw SysError(format("statting file `%1%'") % source); + throw SysError(std::format("statting file `{}'", source)); if (S_ISREG(st.st_mode)) { AutoCloseFD sourceFd = openat(sourceroot, source.c_str(), O_CLOEXEC | O_NOFOLLOW | O_RDONLY); - if (sourceFd == -1) throw SysError(format("opening `%1%'") % source); + if (sourceFd == -1) throw SysError(std::format("opening `{}'", source)); AutoCloseFD destinationFd = openat(destinationroot, destination.c_str(), O_CLOEXEC | O_CREAT | O_WRONLY | O_TRUNC | O_NOFOLLOW | O_EXCL, st.st_mode); - if (destinationFd == -1) throw SysError(format("opening `%1%'") % source); + if (destinationFd == -1) throw SysError(std::format("opening `{}'", source)); copyFile(sourceFd, destinationFd); fchown(destinationFd, st.st_uid, st.st_gid); @@ -487,37 +489,37 @@ static void copyFileRecursively(int sourceroot, const Path &source, target[st.st_size] = '\0'; int err = symlinkat(target.data(), destinationroot, destination.c_str()); if (err != 0) - throw SysError(format("creating symlink `%1%'") % destination); + throw SysError(std::format("creating symlink `{}'", destination)); fchownat(destinationroot, destination.c_str(), st.st_uid, st.st_gid, AT_SYMLINK_NOFOLLOW); } else if (S_ISDIR(st.st_mode)) { int err = mkdirat(destinationroot, destination.c_str(), 0755); if (err != 0) - throw SysError(format("creating directory `%1%'") % destination); + throw SysError(std::format("creating directory `{}'", destination)); AutoCloseFD destinationFd = openat(destinationroot, destination.c_str(), O_CLOEXEC | O_RDONLY | O_DIRECTORY | O_NOFOLLOW); if (err != 0) - throw SysError(format("opening directory `%1%'") % destination); + throw SysError(std::format("opening directory `{}'", destination)); AutoCloseFD sourceFd = openat(sourceroot, source.c_str(), O_CLOEXEC | O_NOFOLLOW | O_RDONLY); if (sourceFd == -1) - throw SysError(format("opening `%1%'") % source); + throw SysError(std::format("opening `{}'", source)); if (deleteSource && !(st.st_mode & S_IWUSR)) { /* Ensure the directory is writable so files within it can be deleted. */ if (fchmod(sourceFd, st.st_mode | S_IWUSR) == -1) - throw SysError(format("making `%1%' directory writable") % source); + throw SysError(std::format("making `{}' directory writable", source)); } for (auto & i : readDirectory(sourceFd)) copyFileRecursively((int)sourceFd, i.name, (int)destinationFd, i.name, deleteSource); fchown(destinationFd, st.st_uid, st.st_gid); - } else throw Error(format("refusing to copy irregular file `%1%'") % source); + } else throw Error(std::format("refusing to copy irregular file `{}'", source)); if (deleteSource) unlinkat(sourceroot, source.c_str(), @@ -534,9 +536,9 @@ static Path tempName(Path tmpRoot, const Path & prefix, bool includePid, { tmpRoot = canonPath(tmpRoot.empty() ? getEnv("TMPDIR", "/tmp") : tmpRoot, true); if (includePid) - return (format("%1%/%2%-%3%-%4%") % tmpRoot % prefix % getpid() % counter++).str(); + return std::format("{}/{}-{}-{}", tmpRoot, prefix, getpid(), counter++); else - return (format("%1%/%2%-%3%") % tmpRoot % prefix % counter++).str(); + return std::format("{}/{}-{}", tmpRoot, prefix, counter++); } @@ -560,11 +562,11 @@ Path createTempDir(const Path & tmpRoot, const Path & prefix, "wheel", then "tar" will fail to unpack archives that have the setgid bit set on directories. */ if (chown(tmpDir.c_str(), (uid_t) -1, getegid()) != 0) - throw SysError(format("setting group of directory `%1%'") % tmpDir); + throw SysError(std::format("setting group of directory `{}'", tmpDir)); return tmpDir; } if (errno != EEXIST) - throw SysError(format("creating directory `%1%'") % tmpDir); + throw SysError(std::format("creating directory `{}'", tmpDir)); } } @@ -578,15 +580,15 @@ Paths createDirs(const Path & path) if (lstat(path.c_str(), &st) == -1) { created = createDirs(dirOf(path)); if (mkdir(path.c_str(), 0777) == -1 && errno != EEXIST) - throw SysError(format("creating directory `%1%'") % path); + throw SysError(std::format("creating directory `{}'", path)); st = lstat(path); created.push_back(path); } if (S_ISLNK(st.st_mode) && stat(path.c_str(), &st) == -1) - throw SysError(format("statting symlink `%1%'") % path); + throw SysError(std::format("statting symlink `{}'", path)); - if (!S_ISDIR(st.st_mode)) throw Error(format("`%1%' is not a directory") % path); + if (!S_ISDIR(st.st_mode)) throw Error(std::format("`{}' is not a directory", path)); return created; } @@ -595,7 +597,7 @@ Paths createDirs(const Path & path) void createSymlink(const Path & target, const Path & link) { if (symlink(target.c_str(), link.c_str())) - throw SysError(format("creating symlink from `%1%' to `%2%'") % link % target); + throw SysError(std::format("creating symlink from `{}' to `{}'", link, target)); } @@ -623,12 +625,12 @@ static string escVerbosity(Verbosity level) } -void Nest::open(Verbosity level, const FormatOrString & fs) +void Nest::open(Verbosity level, std::string_view fs) { if (level <= verbosity) { if (logType == ltEscapes) std::cerr << "\033[" << escVerbosity(level) << "p" - << fs.s << "\n"; + << fs << "\n"; else printMsg_(level, fs); nest = true; @@ -648,7 +650,7 @@ void Nest::close() } -void printMsg_(Verbosity level, const FormatOrString & fs) +void printMsg_(Verbosity level, std::string_view fs) { checkInterrupt(); if (level > verbosity) return; @@ -658,15 +660,15 @@ void printMsg_(Verbosity level, const FormatOrString & fs) prefix += "| "; else if (logType == ltEscapes && level != lvlInfo) prefix = "\033[" + escVerbosity(level) + "s"; - string s = (format("%1%%2%\n") % prefix % fs.s).str(); + string s = std::format("{}{}\n", prefix, fs); writeToStderr(s); } -void warnOnce(bool & haveWarned, const FormatOrString & fs) +void warnOnce(bool & haveWarned, std::string_view fs) { if (!haveWarned) { - printMsg(lvlError, format("warning: %1%") % fs.s); + printMsg(lvlError, std::format("warning: {}", fs)); haveWarned = true; } } @@ -685,7 +687,7 @@ void writeToStderr(const string & s) write errors in exception handlers to ensure that cleanup code runs to completion if the other side of stderr has been closed unexpectedly. */ - if (!std::uncaught_exception()) throw; + if (std::uncaught_exceptions() == 0) throw; } } @@ -754,8 +756,8 @@ void waitForMessage(int fd, const string & message) string str(message.length(), '\0'); readFull(fd, (unsigned char*)str.data(), message.length()); if (str != message) - throw Error(format("did not receive message '%1%' on file descriptor %2%") - % message % fd); + throw Error(std::format("did not receive message '{}' on file descriptor {}", + message, fd)); } @@ -777,7 +779,7 @@ AutoDelete::~AutoDelete() deletePath(path); else { if (remove(path.c_str()) == -1) - throw SysError(format("cannot unlink `%1%'") % path); + throw SysError(std::format("cannot unlink `{}'", path)); } } } catch (...) { @@ -848,7 +850,7 @@ void AutoCloseFD::close() if (fd != -1) { if (::close(fd) == -1) /* This should never happen. */ - throw SysError(format("closing file descriptor %1%") % fd); + throw SysError(std::format("closing file descriptor {}", fd)); fd = -1; } } @@ -1024,13 +1026,13 @@ void Pid::kill(bool quiet) if (pid == -1 || pid == 0) return; if (!quiet) - printMsg(lvlError, format("killing process %1%") % pid); + printMsg(lvlError, std::format("killing process {}", pid)); /* Send the requested signal to the child. If it has its own process group, send the signal to every process in the child process group (which hopefully includes *all* its children). */ if (::kill(separatePG ? -pid : pid, killSignal) != 0) - printMsg(lvlError, (SysError(format("killing process %1%") % pid).msg())); + printMsg(lvlError, (SysError(std::format("killing process {}", pid)).msg())); /* Wait until the child dies, disregarding the exit status. */ int status; @@ -1038,7 +1040,7 @@ void Pid::kill(bool quiet) checkInterrupt(); if (errno != EINTR) { printMsg(lvlError, - (SysError(format("waiting for process %1%") % pid).msg())); + (SysError(std::format("waiting for process {}", pid)).msg())); break; } } @@ -1079,7 +1081,7 @@ void Pid::setKillSignal(int signal) void killUser(uid_t uid) { - debug(format("killing all processes running under uid `%1%'") % uid); + debug(std::format("killing all processes running under uid `{}'", uid)); assert(uid != 0); /* just to be safe... */ @@ -1109,7 +1111,7 @@ void killUser(uid_t uid) #endif if (errno == ESRCH) break; /* no more processes */ if (errno != EINTR) - throw SysError(format("cannot kill processes for uid `%1%'") % uid); + throw SysError(std::format("cannot kill processes for uid `{}'", uid)); } _exit(0); @@ -1121,7 +1123,7 @@ void killUser(uid_t uid) if (status == SIGKILL) return; #endif if (status != 0) - throw Error(format("cannot kill processes for uid `%1%': %2%") % uid % statusToString(status)); + throw Error(std::format("cannot kill processes for uid `{}': {}", uid, statusToString(status))); /* !!! We should really do some check to make sure that there are no processes left running under `uid', but there is no portable @@ -1193,9 +1195,9 @@ string runProgram(Path program, bool searchPath, const Strings & args) else execv(program.c_str(), stringsToCharPtrs(args_).data()); - int err = errno; - printMsg(lvlError, format("executing `%1%': %2%") % program % strerror(err)); - _exit(127); + int err = errno; + printMsg(lvlError, std::format("executing `{}': {}", program, strerror(err))); + _exit(127); }); pipe.writeSide.close(); @@ -1205,8 +1207,8 @@ string runProgram(Path program, bool searchPath, const Strings & args) /* Wait for the child to finish. */ int status = pid.wait(true); if (!statusOk(status)) - throw ExecError(format("program `%1%' %2%") - % program % statusToString(status)); + throw ExecError(std::format("program `{}' {}", + program, statusToString(status))); return result; } @@ -1256,7 +1258,7 @@ void _interrupted() /* Block user interrupts while an exception is being handled. Throwing an exception while another exception is being handled kills the program! */ - if (!std::uncaught_exception()) { + if (std::uncaught_exceptions() == 0) { _isInterrupted = 0; throw Interrupted("interrupted by the user"); } @@ -1319,14 +1321,14 @@ string statusToString(int status) { if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { if (WIFEXITED(status)) - return (format("failed with exit code %1%") % WEXITSTATUS(status)).str(); + return std::format("failed with exit code {}", WEXITSTATUS(status)); else if (WIFSIGNALED(status)) { int sig = WTERMSIG(status); #if HAVE_STRSIGNAL const char * description = strsignal(sig); - return (format("failed due to signal %1% (%2%)") % sig % description).str(); + return std::format("failed due to signal {} ({})", sig, description); #else - return (format("failed due to signal %1%") % sig).str(); + return std::format("failed due to signal {}", sig); #endif } else @@ -1347,12 +1349,12 @@ bool hasSuffix(const string & s, const string & suffix) } -void expect(std::istream & str, const string & s) +void expect(std::istream & str, std::string_view s) { std::vector<char> s2(s.size()); str.read(s2.data(), s2.size()); if (string(s2.begin(), s2.end()) != s) - throw FormatError(format("expected string `%1%'") % s); + throw FormatError(std::format("expected string `{}'", s)); } @@ -1411,7 +1413,7 @@ void ignoreException() try { throw; } catch (std::exception & e) { - printMsg(lvlError, format("error (ignored): %1%") % e.what()); + printMsg(lvlError, std::format("error (ignored): {}", e.what())); } } @@ -1425,7 +1427,7 @@ void commonChildInit(Pipe & logPipe) that e.g. ssh cannot open /dev/tty) and it doesn't receive terminal signals. */ if (setsid() == -1) - throw SysError(format("creating a new session")); + throw SysError("creating a new session"); /* Close the read end so only the parent holds a reference to it. */ logPipe.readSide.close(); @@ -1441,7 +1443,7 @@ void commonChildInit(Pipe & logPipe) /* Reroute stdin to /dev/null. */ int fdDevNull = open(pathNullDevice.c_str(), O_RDWR); if (fdDevNull == -1) - throw SysError(format("cannot open `%1%'") % pathNullDevice); + throw SysError(std::format("cannot open `{}'", pathNullDevice)); if (dup2(fdDevNull, STDIN_FILENO) == -1) throw SysError("cannot dup null device into stdin"); close(fdDevNull); @@ -1451,7 +1453,7 @@ void commonChildInit(Pipe & logPipe) Agent::Agent(const string &command, const Strings &args, const std::map<string, string> &env) { - debug(format("starting agent '%1%'") % command); + debug(std::format("starting agent '{}'", command)); /* Create a pipe to get the output of the child. */ fromAgent.create(); @@ -1487,7 +1489,7 @@ Agent::Agent(const string &command, const Strings &args, const std::map<string, execv(command.c_str(), stringsToCharPtrs(allArgs).data()); - throw SysError(format("executing `%1%'") % command); + throw SysError(std::format("executing `{}'", command)); }); pid.setSeparatePG(true); diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh index 7b50dfa5f5..d30dc7801e 100644 --- a/nix/libutil/util.hh +++ b/nix/libutil/util.hh @@ -2,6 +2,9 @@ #include "types.hh" +#include <sstream> +#include <string_view> + #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> @@ -139,11 +142,11 @@ private: public: Nest(); ~Nest(); - void open(Verbosity level, const FormatOrString & fs); + void open(Verbosity level, std::string_view fs); void close(); }; -void printMsg_(Verbosity level, const FormatOrString & fs); +void printMsg_(Verbosity level, std::string_view fs); #define startNest(varName, level, f) \ Nest varName; \ @@ -160,7 +163,7 @@ void printMsg_(Verbosity level, const FormatOrString & fs); #define debug(f) printMsg(lvlDebug, f) -void warnOnce(bool & haveWarned, const FormatOrString & fs); +void warnOnce(bool & haveWarned, std::string_view fs); void writeToStderr(const string & s); @@ -367,7 +370,7 @@ bool hasSuffix(const string & s, const string & suffix); /* Read string `s' from stream `str'. */ -void expect(std::istream & str, const string & s); +void expect(std::istream & str, std::string_view s); MakeError(FormatError, Error) diff --git a/nix/local.mk b/nix/local.mk index 7c1b81e9a6..819131b5d4 100644 --- a/nix/local.mk +++ b/nix/local.mk @@ -25,31 +25,10 @@ BUILT_SOURCES += %D%/libstore/schema.sql.hh CLEANFILES += %D%/libstore/schema.sql.hh -noinst_LIBRARIES = libformat.a libutil.a libstore.a +noinst_LIBRARIES = libutil.a libstore.a -# Use '-std=c++11' for 'std::shared_ptr', 'auto', lambdas, and more. -AM_CXXFLAGS = -Wall -std=c++11 - -libformat_a_SOURCES = \ - %D%/boost/format/free_funcs.cc \ - %D%/boost/format/parsing.cc \ - %D%/boost/format/format_implementation.cc - -libformat_headers = \ - %D%/boost/throw_exception.hpp \ - %D%/boost/format.hpp \ - %D%/boost/assert.hpp \ - %D%/boost/format/macros_default.hpp \ - %D%/boost/format/format_fwd.hpp \ - %D%/boost/format/format_class.hpp \ - %D%/boost/format/exceptions.hpp \ - %D%/boost/format/group.hpp \ - %D%/boost/format/feed_args.hpp \ - %D%/boost/format/internals_fwd.hpp \ - %D%/boost/format/internals.hpp - -libformat_a_CPPFLAGS = \ - -I$(top_srcdir)/nix +# Use '-std=c++20' for 'std::shared_ptr', 'auto', lambdas, and more. +AM_CXXFLAGS = -Wall -std=c++20 libutil_a_SOURCES = \ %D%/libutil/archive.cc \ @@ -73,7 +52,6 @@ libutil_headers = \ libutil_a_CPPFLAGS = \ -I$(top_builddir)/nix \ -I$(top_srcdir)/%D%/libutil \ - $(libformat_a_CPPFLAGS) \ $(LIBGCRYPT_CPPFLAGS) libstore_a_SOURCES = \ @@ -131,7 +109,7 @@ guix_daemon_LDFLAGS = \ $(LIBGCRYPT_LDFLAGS) guix_daemon_LDADD = \ - libstore.a libutil.a libformat.a -lz \ + libstore.a libutil.a -lz \ $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS) guix_daemon_headers = \ @@ -144,7 +122,7 @@ guix_daemon_LDADD += -lbz2 endif HAVE_LIBBZ2 noinst_HEADERS = \ - $(libformat_headers) $(libutil_headers) $(libstore_headers) \ + $(libutil_headers) $(libstore_headers) \ $(guix_daemon_headers) %D%/libstore/schema.sql.hh: guix/store/schema.sql diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index 30727d5559..af09839932 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc @@ -37,6 +37,7 @@ #include <strings.h> #include <exception> #include <iostream> +#include <format> #include <libintl.h> #include <locale.h> @@ -187,7 +188,7 @@ string_to_bool (const char *arg, bool dflt = true) else if (strcasecmp (arg, "no") == 0) return false; else - throw nix::Error (format ("'%1%': invalid Boolean value") % arg); + throw nix::Error(std::format("'{}': invalid Boolean value", arg)); } /* Parse a single option. */ @@ -201,10 +202,8 @@ parse_opt (int key, char *arg, struct argp_state *state) break; case GUIX_OPT_CHROOT_DIR: { - std::string chroot_dirs; + std::string chroot_dirs {settings.get("build-extra-chroot-dirs", "")}; - chroot_dirs = settings.get ("build-extra-chroot-dirs", - (std::string) ""); if (chroot_dirs == "") chroot_dirs = arg; else @@ -337,7 +336,8 @@ open_unix_domain_socket (const char *file) struct sockaddr_un addr; addr.sun_family = AF_UNIX; if (fileRel.size () >= sizeof (addr.sun_path)) - throw Error (format (_("socket file name '%1%' is too long")) % fileRel); + throw Error (std::vformat( (_("socket file name '%1%' is too long")), + std::make_format_args(fileRel))); strcpy (addr.sun_path, fileRel.c_str ()); unlink (file); @@ -349,13 +349,15 @@ open_unix_domain_socket (const char *file) int res = bind (fdSocket, (struct sockaddr *) &addr, sizeof addr); umask (oldMode); if (res == -1) - throw SysError (format (_("cannot bind to socket '%1%'")) % file); + throw SysError (std::vformat( (_("cannot bind to socket '{}'")), + std::make_format_args(file))); if (chdir ("/") == -1) /* back to the root */ throw SysError (_("cannot change current directory")); if (listen (fdSocket, 5) == -1) - throw SysError (format (_("cannot listen on socket '%1%'")) % file); + throw SysError (std::vformat( (_("cannot listen on socket '{}'")), + std::make_format_args(file))); return fdSocket.borrow (); } @@ -373,7 +375,7 @@ open_inet_socket (const struct sockaddr *address, socklen_t length) throw SysError (_("cannot bind TCP socket")); if (listen (fd, 5) == -1) - throw SysError (format (_("cannot listen on TCP socket"))); + throw SysError (_("cannot listen on TCP socket")); return fd.borrow (); } @@ -423,11 +425,9 @@ listening_sockets (const std::list<std::string> &options) &hints, &res); if (err != 0) - throw Error(format ("failed to look up '%1%': %2%") - % option % gai_strerror (err)); + throw Error(std::format("failed to look up '{}': {}", option, gai_strerror(err))); - printMsg (lvlDebug, format ("listening on '%1%', port '%2%'") - % host % port); + printMsg(lvlDebug, std::format("listening on '{}', port '{}'", host, port)); /* XXX: Pick the first result, RES. */ result.push_back (open_inet_socket (res->ai_addr, @@ -530,17 +530,19 @@ main (int argc, char *argv[]) /* We were not "socket-activated" so open the sockets specified by LISTEN_OPTIONS. */ sockets = listening_sockets (listen_options); - else - printMsg (lvlInfo, - format (ngettext ("socket-activated with %1% socket", - "socket-activated with %1% sockets", - sockets.size ())) - % sockets.size ()); + else { + auto size = sockets.size(); + printMsg (lvlInfo, + std::vformat((ngettext ("socket-activated with %1% socket", + "socket-activated with %1% sockets", + size)), + std::make_format_args(size))); + } /* Effect all the changes made via 'settings.set'. */ settings.update (); printMsg(lvlDebug, - format ("build log compression: %1%") % settings.logCompression); + std::format("build log compression: {}", int(settings.logCompression))); if (geteuid () == 0 && settings.buildUsersGroup.empty ()) fprintf (stderr, _("warning: daemon is running as root, so \ @@ -553,7 +555,7 @@ using `--build-users-group' is highly recommended\n")); chroot_dirs = settings.get ("build-extra-chroot-dirs", (std::string) ""); printMsg (lvlDebug, - format ("extra chroot directories: '%1%'") % chroot_dirs); + std::format("extra chroot directories: '{}'", chroot_dirs)); } if (useDiscover) @@ -568,9 +570,8 @@ using `--build-users-group' is highly recommended\n")); }); } - printMsg (lvlDebug, - format ("automatic deduplication set to %1%") - % settings.autoOptimiseStore); + printMsg(lvlDebug, + std::format("automatic deduplication set to {}", settings.autoOptimiseStore)); run (sockets); } diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index f2ffe8fa6f..3890adb2c7 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -10,8 +10,10 @@ #include "builtins.hh" #include <algorithm> +#include <format> #include <cstring> +#include <cassert> #include <unistd.h> #include <signal.h> #include <sys/types.h> @@ -640,7 +642,7 @@ static void performOp(bool trusted, unsigned int clientVersion, if (pw != NULL) store->createUser(value, pw->pw_uid); else - printMsg(lvlInfo, format("user name %1% not found") % value); + printMsg(lvlInfo, std::format("user name {} not found", value)); } else settings.set(trusted ? name : "untrusted-" + name, value); @@ -772,7 +774,7 @@ static void performOp(bool trusted, unsigned int clientVersion, } default: - throw Error(format("invalid operation %1%") % op); + throw Error(std::format("invalid operation {}", op)); } } @@ -834,7 +836,7 @@ static void processConnection(bool trusted, uid_t userId) if (pw != NULL && pw->pw_name != NULL) store->createUser(pw->pw_name, userId); else - printMsg(lvlInfo, format("user with UID %1% not found") % userId); + printMsg(lvlInfo, std::format("user with UID {} not found", userId)); } stopWork(); @@ -882,7 +884,7 @@ static void processConnection(bool trusted, uid_t userId) canSendStderr = false; _isInterrupted = false; - printMsg(lvlDebug, format("%1% operations") % opCount); + printMsg(lvlDebug, std::format("{} operations", opCount)); } @@ -971,9 +973,8 @@ static void acceptConnection(int fdSocket) struct passwd * pw = getpwuid(cred.uid); string user = pw ? pw->pw_name : std::to_string(cred.uid); - printMsg(lvlInfo, - format((string) "accepted connection from pid %1%, user %2%") - % clientPid % user); + printMsg(lvlInfo, std::format("accepted connection from pid {}, user {}", + clientPid, user)); #endif } else { char address_str[128]; @@ -992,9 +993,7 @@ static void acceptConnection(int fdSocket) } if (result != NULL) { - printMsg(lvlInfo, - format("accepted connection from %1%") - % address_str); + printMsg(lvlInfo, std::format("accepted connection from {}", address_str)); } } @@ -1004,7 +1003,7 @@ static void acceptConnection(int fdSocket) /* Background the daemon. */ if (setsid() == -1) - throw SysError(format("creating a new session")); + throw SysError("creating a new session"); /* Restore normal handling of SIGCHLD. */ setSigChldAction(false); @@ -1033,7 +1032,7 @@ static void acceptConnection(int fdSocket) } catch (Interrupted & e) { throw; } catch (Error & e) { - printMsg(lvlError, format("error processing connection: %1%") % e.msg()); + printMsg(lvlError, std::format("error processing connection: {}", e.msg())); } } @@ -1072,7 +1071,7 @@ static void daemonLoop(const std::vector<int>& sockets) int err = errno; if (err == EINTR) continue; - throw SysError(format("select error: %1%") % strerror(err)); + throw SysError(std::format("select error: {}", strerror(err))); } for (unsigned int i = 0; i < sockets.size(); i++) { diff --git a/po/packages/POTFILES.in b/po/packages/POTFILES.in index a472c95746..b48ee805c6 100644 --- a/po/packages/POTFILES.in +++ b/po/packages/POTFILES.in @@ -163,7 +163,6 @@ gnu/packages/fortran-xyz.scm gnu/packages/freedesktop.scm gnu/packages/freeipmi.scm gnu/packages/fribidi.scm -gnu/packages/fsf.scm gnu/packages/ftp.scm gnu/packages/fvwm.scm gnu/packages/gambas.scm diff --git a/tests/guix-daemon.sh b/tests/guix-daemon.sh index d85727c955..0aee853a0c 100644 --- a/tests/guix-daemon.sh +++ b/tests/guix-daemon.sh @@ -261,6 +261,6 @@ guix build "$drv" log=`guix build "$drv" --log-file` test -f "$log" case "$log" in - *.gz) test "`gunzip -c < "$log"`" = "$stamp" ;; + *.gz) test "`gunzip -c < "$log" | grep -v 'guile: warning.*locale'`" = "$stamp" ;; *) false ;; esac |