aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-repl.sh
blob: d4ebb5f6c68d7cbce427eb46c10dd0da40c2c582 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# GNU Guix --- Functional package management for GNU
# Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
# Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.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/>.

#
# Test the `guix repl' command-line utility.
#

guix repl --version

test_directory="`mktemp -d`"
export test_directory
trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT

tmpfile="$test_directory/foo.scm"
rm -f "$tmpfile"
trap 'rm -f "$tmpfile"' EXIT

module_dir="t-guix-repl-$$"
mkdir "$module_dir"
trap 'rm -rf "$module_dir"' EXIT


cat > "$tmpfile"<<EOF
(use-modules (guix packages)
             (gnu packages base))

(format #t "~a\n" (package-name coreutils))
EOF

test "`guix repl "$tmpfile"`" = "coreutils"

# Make sure that the file can also be loaded when passed as a relative file
# name.
(cd "$(dirname "$tmpfile")"; test "$(guix repl "$(basename "$tmpfile")")" = "coreutils")


cat > "$module_dir/foo.scm"<<EOF
(define-module (foo)
  #:use-module (guix packages)
  #:use-module (gnu packages base))

(define-public dummy
  (package (inherit hello)
    (name "dummy")
    (version "42")
    (synopsis "dummy package")
    (description "dummy package. Only used for testing purposes.")))
EOF

cat > "$tmpfile"<<EOF
(use-modules (guix packages)
             (foo))

(format #t "~a\n" (package-version dummy))
EOF

test "`guix repl "$tmpfile" -L "$module_dir"`" = "42"

cat > "$tmpfile"<<EOF
(format #t "~a\n" (cdr (command-line)))
EOF

test "`guix repl -- "$tmpfile" -a b --input=foo.txt`" = "(-a b --input=foo.txt)"

cat > "$tmpfile"<<EOF
#!$(type -P env) -S guix repl --
!#
(format #t "~a\n" (cdr (command-line)))
EOF
chmod 755 $tmpfile

test "`"$tmpfile" -a b --input=foo.txt`" = "(-a b --input=foo.txt)"
sitor.") gdk-pixbuf json-c libevdev - libinput + libinput-minimal libxkbcommon pango swaybg -- cgit v1.2.3 From 714bab022c0cdb7d285dffbf959a167ab0b0a2fd Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Wed, 22 Jun 2022 14:17:32 +0200 Subject: gnu: waybar: Replace input libinput by libinput-minimal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/wm.scm (waybar)[propagated-inputs]: Replace libinput by libinput-minimal to reduce closure. Signed-off-by: Ludovic Courtès --- gnu/packages/wm.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index d07760f4f0..2c79e1d03e 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1727,7 +1727,7 @@ display a clock or apply image manipulation techniques to the background image." gtkmm-3 jsoncpp libdbusmenu - libinput + libinput-minimal libmpdclient libnl libxml2 -- cgit v1.2.3 From 25c7f57548716ccb7246c595cdcee3a5ca9389df Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Wed, 22 Jun 2022 14:17:33 +0200 Subject: gnu: hikari: Replace input libinput by libinput-minimal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/wm.scm (hikari)[propagated-inputs]: Replace libinput by libinput-minimal to reduce closure. Signed-off-by: Ludovic Courtès --- gnu/packages/wm.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 2c79e1d03e..35b79919b1 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -2564,7 +2564,7 @@ read and write, and compatible with JSON.") (list bmake pkg-config wayland-protocols)) (inputs `(("cairo" ,cairo) - ("libinput" ,libinput) + ("libinput" ,libinput-minimal) ("libucl" ,libucl) ("libxkbcommon" ,libxkbcommon) ("pam" ,linux-pam) -- cgit v1.2.3 From dbebe6c0b4b8a6e3c44e1a85cb3365df8d8d565c Mon Sep 17 00:00:00 2001 From: Jose G Perez Taveras Date: Wed, 22 Jun 2022 10:40:48 -0400 Subject: gnu: direnv: Update to 2.32.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shellutils.scm (direnv): Update to 2.32.1. Signed-off-by: Ludovic Courtès --- gnu/packages/shellutils.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index ad674a3989..110cbe9fda 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2021 Wiktor Żelazny +;;; Copyright © 2022 Jose G Perez Taveras ;;; ;;; This file is part of GNU Guix. ;;; @@ -368,7 +369,7 @@ are already there.") (define-public direnv (package (name "direnv") - (version "2.31.0") + (version "2.32.1") (source (origin (method git-fetch) (uri (git-reference @@ -377,7 +378,7 @@ are already there.") (file-name (git-file-name name version)) (sha256 (base32 - "1c52izjzkdhmyrfx1gmbp34n0qpxyxw0s94f0vy3ldlg8xr36wmk")))) + "1i473j7j4sx8p83zqlnakskqk0jyd3byajp7jmv2gym9s4k841y7")))) (build-system go-build-system) (arguments '(#:import-path "github.com/direnv/direnv" -- cgit v1.2.3 From a5d8630e158718325c7804e8043b92013626158c Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Tue, 21 Jun 2022 14:14:08 -0400 Subject: gnu: polybar: Update to 3.6.3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/wm.scm (polybar): Update to 3.6.3. [phases]: Add patch-config-path for polybar to find its default configuration file in the store. [inputs]: Add libuv, required to build polybar. [native-inputs]: Remove python-2, no longer needed. Signed-off-by: Ludovic Courtès --- gnu/packages/wm.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 35b79919b1..ab97266f72 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1469,19 +1469,29 @@ its size (define-public polybar (package (name "polybar") - (version "3.5.7") + (version "3.6.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/polybar/polybar/releases/" "download/" version "/polybar-" version ".tar.gz")) (sha256 - (base32 "1nr386jdlm8qkbdf23w7lyvbfhr362s90f957fawnyi1finhw8bk")))) + (base32 "19azx5dpfyfh0pv4q2fcrf4p7a0pc5d13m7lnv3qy8376mbmhmzj")))) (build-system cmake-build-system) (arguments ;; Test is disabled because it requires downloading googletest from the ;; Internet. - '(#:tests? #f)) + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + ;; Make polybar find its default configuration file in the + ;; store. + (add-after 'unpack 'patch-config-path + (lambda _ + (substitute* "CMakeLists.txt" + (("/etc") (string-append #$output "/etc"))) + (substitute* "src/utils/file.cpp" + (("\"/etc\"") (string-append "\"" #$output "/etc\"")))))))) (inputs (list alsa-lib cairo @@ -1489,6 +1499,7 @@ its size jsoncpp libmpdclient libnl + libuv libxcb pulseaudio xcb-proto @@ -1500,9 +1511,6 @@ its size (native-inputs `(("pkg-config" ,pkg-config) ("python-sphinx" ,python-sphinx) ; for the manual - ;; XXX: "python" input must be located after "python-2", or the package - ;; fails to build with "missing required python module: xcbgen". - ("python-2" ,python-2) ; lib/xpp depends on python 2 ("python" ,python))) ; xcb-proto depends on python 3 (home-page "https://polybar.github.io/") (synopsis "Fast and easy-to-use status bar") -- cgit v1.2.3 From 30e27d8101b6775748ac52d03ed7c40460aef25b Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Thu, 23 Jun 2022 10:35:56 -0400 Subject: gnu: polybar: Simply inputs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/wm.scm (polybar)[native-inputs]: Remove labels. Signed-off-by: Ludovic Courtès --- gnu/packages/wm.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index ab97266f72..6933b1730a 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1509,9 +1509,9 @@ its size xcb-util-wm xcb-util-xrm)) (native-inputs - `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx) ; for the manual - ("python" ,python))) ; xcb-proto depends on python 3 + (list pkg-config + python-sphinx ; for the manual + python)) ; xcb-proto depends on python 3 (home-page "https://polybar.github.io/") (synopsis "Fast and easy-to-use status bar") (description "Polybar aims to help users build beautiful and highly -- cgit v1.2.3 From 8cc61c7c39b5a1d7e43611c08b177c8530440cc4 Mon Sep 17 00:00:00 2001 From: jgart Date: Fri, 17 Jun 2022 00:37:23 -0500 Subject: gnu: litecli: Update to 1.9.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/databases.scm (litecli): Update to 1.9.0. Signed-off-by: Ludovic Courtès --- gnu/packages/databases.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index b4a591fb4e..27c829f69e 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -650,13 +650,13 @@ replacement for the code@{python-memcached} library.") (define-public litecli (package (name "litecli") - (version "1.8.0") + (version "1.9.0") (source (origin (method url-fetch) (uri (pypi-uri "litecli" version)) (sha256 - (base32 "0ghh8hq5bw3y2ybiy4ibbdfz55jxvilg1s6zmhxmqikhg5s95xh2")))) + (base32 "1897divrdqlhl1p5jvvm29rg3d99f48s58na7hgdzm1x13x2rbr1")))) (build-system python-build-system) (propagated-inputs (list python-cli-helpers -- cgit v1.2.3 From d651f28017db0c07d2e8490ce1e1ce12e00d98be Mon Sep 17 00:00:00 2001 From: Ontje Lünsdorf Date: Thu, 16 Jun 2022 12:13:00 +0200 Subject: gnu: hypre: Add missing dependencies on latex fonts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (hypre)[native-inputs]: Add TEXLIVE-COURIER and TEXLIVE-HELVETIC. Signed-off-by: Ludovic Courtès --- gnu/packages/maths.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 0ad14ba36e..5e8fd7ae2d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5524,7 +5524,9 @@ set.") texlive-capt-of texlive-caption texlive-cm + texlive-courier texlive-etoolbox + texlive-helvetic texlive-jknappen texlive-sectsty texlive-tex-gyre -- cgit v1.2.3 From 000b710cee6f402e79f2d3f988039bb793a0b215 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 12 Jun 2022 22:25:07 +0100 Subject: gnu: Add casacore. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/astronomy.scm (casacore): New variable. Modules sorted alphabetically to ease maintannce. Signed-off-by: Ludovic Courtès --- gnu/packages/astronomy.scm | 103 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 93c45d5780..61c10c985f 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -26,18 +26,15 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages astronomy) - #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module (guix utils) - #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) + #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) @@ -49,16 +46,19 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages lua) #:use-module (gnu packages maths) + #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) + #:use-module (gnu packages python) #:use-module (gnu packages python-check) #: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 qt) + #:use-module (gnu packages readline) #:use-module (gnu packages time) #:use-module (gnu packages version-control) #:use-module (gnu packages video) @@ -66,9 +66,15 @@ #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) #:use-module (ice-9 match) #:use-module (srfi srfi-1)) @@ -107,6 +113,93 @@ moment, supported SPICE files are: @end itemize\n") (license license:cecill))) +(define-public casacore + (package + (name "casacore") + (version "3.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/casacore/casacore") + (commit (string-append "v" version)))) + (sha256 + (base32 + "05ar5gykgh4dm826xplj5ri5rw7znhxrvin2l67a3mjwfys7r2a0")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + (list + ;; Note: There are multiple failures in + ;; tests which require additional measures data. They are + ;; distributed via FTP without any license: + ;; ftp://ftp.astron.nl/outgoing/Measures/ + ;; TODO: Check how to fix tests. + #:tests? #f + #:parallel-build? #t + #:configure-flags + #~(list "-DBUILD_PYTHON3=ON" + "-DBUILD_PYTHON=OFF" + "-DBUILD_TESTING=TRUE" + "-DUSE_HDF5=ON" + "-DUSE_OPENMP=OFF" + "-DUSE_THREADS=ON" + (string-append "-DDATA_DIR=" #$output "/data") + (string-append "-DPYTHON3_EXECUTABLE=" + #$(this-package-input "python") "/bin") + (string-append "-DPYTHON3_INCLUDE_DIR=" + #$(this-package-input "python") "/include") + (string-append "-DPYTHON3_LIBRARY=" + #$(this-package-input "python") "/lib")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-env + (lambda _ + (setenv "HOME" "/tmp"))) + (add-after 'unpack 'use-absolute-rm + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "casa/OS/test/tFile.run" + (("/bin/rm") + (search-input-file inputs "/bin/rm"))))) + (add-after 'unpack 'use-absolute-python3 + (lambda _ + (substitute* "build-tools/casacore_floatcheck" + (("#!/usr/bin/env python") + (string-append "#!" (which "python3")))))) + ;; NOTE: (Sharlatan-20220611T200837+0100): Workaround for casacore + ;; tests stuck with missing "qsub" issue. + ;; https://github.com/casacore/casacore/issues/1122 + (add-after 'unpack 'patch-pre-test-checks + (lambda _ + (substitute* "build-tools/casacore_assay" + (("QSUBP=.*$") "QSUBP=\n") + (("YODP=.*$") "YODP=\n"))))))) + (native-inputs + (list bison + boost + flex + readline)) + (inputs + (list cfitsio + fftw + fftwf + gfortran + hdf5 + lapack + ncurses + openblas + python + python-numpy + wcslib)) + (home-page "http://casacore.github.io/casacore/") + (synopsis "Suite of C++ libraries for radio astronomy data processing") + (description + "The casacore package contains the core libraries of the old +AIPS++/CASA (Common Astronomy Software Application) package. This split was +made to get a better separation of core libraries and applications. +@url{https://casa.nrao.edu/, CASA} is now built on top of Casacore.") + (license license:gpl2+))) + (define-public cfitsio (package (name "cfitsio") -- cgit v1.2.3 From a119c9b27b57d915ee42db1ddca423fc410a4b90 Mon Sep 17 00:00:00 2001 From: jgart Date: Thu, 23 Jun 2022 23:48:26 +0200 Subject: gnu: Add emacs-straight-el. * gnu/packages/emacs-xyz.scm (emacs-straight-el): New variable. Signed-off-by: Nicolas Goaziou --- gnu/packages/emacs-xyz.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index f5493e8ed1..c60bb2b4c2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -31710,6 +31710,60 @@ headlines, keywords, tables and source blocks.") "@code{emacs-pyimport} manages python imports from Emacs via @code{python-pyflakes}.") (license license:gpl3+)))) ; License is in pyimport.el +(define-public emacs-straight-el + (let ((commit "4517e118ee43f849f708025dbb2cf4f281793121") + (revision "0")) + (package + (name "emacs-straight-el") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/raxod502/straight.el") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0idhgh203rac9c046286gir9rq0lgnlllzj4b4hrjpd3idg9v0r8")))) + (build-system emacs-build-system) + (arguments + (list + #:tests? #t + #:test-command + #~(list "emacs" "-Q" "--batch" + "-L" "." + "--load" "ert" + "--load" "tests/straight-test.el" + "--eval" "(progn (require 'straight-ert-print-hack) (ert-run-tests-batch-and-exit))") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-git-executable + (lambda* (#:key inputs #:allow-other-keys) + (make-file-writable "straight.el") + (substitute* "straight.el" + (("\"git\"") + (string-append "\"" + (search-input-file inputs "/bin/git") + "\""))))) + (add-after 'check 'delete-tests + ;; "tests" directory includes bogus ".el" files that can make + ;; `patch-el-files' phase fail. + (lambda _ + (delete-file-recursively "tests")))))) + (native-inputs + (list texinfo)) + (inputs + (list git)) + (propagated-inputs + (list emacs-magit)) + (home-page "https://github.com/raxod502/straight.el/") + (synopsis "Purely functional package manager for the Emacs hacker") + (description + "@code{emacs-straight-el} is a purely functional package manager for the Emacs +hacker.") + (license license:expat)))) + (define-public emacs-osm (package (name "emacs-osm") -- cgit v1.2.3 From 3cdfad5cd8c501de6357ef80704f1369533fbe56 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 23 Jun 2022 16:49:02 -0400 Subject: doc: Fix typo. * doc/guix.texi (Networking Setup): Fix typo. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 874dab1597..650072937a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18706,7 +18706,7 @@ starting with static network configuration. This is the type for statically-configured network interfaces. Its value must be a list of @code{static-networking} records. Each of them declares a set of @dfn{addresses}, @dfn{routes}, and @dfn{links}, as -show below. +shown below. @cindex network interface controller (NIC) @cindex NIC, networking interface controller -- cgit v1.2.3 From 3055af4c453f67995e745f3acb5a4b8db10f78eb Mon Sep 17 00:00:00 2001 From: jgart Date: Wed, 15 Jun 2022 22:42:08 -0500 Subject: gnu: janet: Update to 1.23.0. * gnu/packages/lisp.scm (janet): Update to 1.23.0. Signed-off-by: Maxim Cournoyer --- gnu/packages/lisp.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c26da670ac..3c43f8fa4c 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1165,7 +1165,7 @@ including a built-in database engine and a GUI system.") (define-public janet (package (name "janet") - (version "1.21.1") + (version "1.23.0") (source (origin (method git-fetch) @@ -1174,7 +1174,7 @@ including a built-in database engine and a GUI system.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1c8lrwg518182rnz47mahv5r9jd3haj6ysigk0bkv8lpb0d2b760")))) + (base32 "1qfahq1203kv5jxd0im7nxm3yy1p9k1wc0pk34b5h2sfships1hm")))) (build-system gnu-build-system) (arguments (list #:make-flags -- cgit v1.2.3 From 2dc43d7d5b50b3ef6ef506dc2572c9cc3beed334 Mon Sep 17 00:00:00 2001 From: Taiju HIGASHI Date: Sat, 25 Dec 2021 08:18:28 +0900 Subject: gnu: ibus-anthy: Update to 1.5.14 Signed-off-by: Maxim Cournoyer --- gnu/packages/ibus.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index edaeb59641..9c0c4903ca 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Songlin Jiang +;;; Copyright © 2021 Taiju HIGASHI ;;; ;;; This file is part of GNU Guix. ;;; @@ -307,7 +308,7 @@ Chinese pinyin input methods.") (define-public ibus-anthy (package (name "ibus-anthy") - (version "1.5.9") + (version "1.5.14") (source (origin (method url-fetch) (uri (string-append @@ -315,12 +316,15 @@ Chinese pinyin input methods.") version "/ibus-anthy-" version ".tar.gz")) (sha256 (base32 - "1y8sf837rmp662bv6zakny0xcm7c9c5qda7f9kq9riv9ywpcbw6x")))) + "16vd0k8wm13s38869jqs3dnwmjvywgn0snnpyi41m28binhlssf8")))) (build-system gnu-build-system) (arguments '(#:configure-flags ;; Use absolute exec path in the anthy.xml. (list (string-append "--libexecdir=" %output "/libexec")) + ;; The test suite fails (see: + ;; https://github.com/ibus/ibus-anthy/issues/28). + #:tests? #f #:phases (modify-phases %standard-phases (add-after 'install 'wrap-programs @@ -338,6 +342,7 @@ Chinese pinyin input methods.") #t)))))) (native-inputs `(("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") ("intltool" ,intltool) ("pkg-config" ,pkg-config) ("python" ,python))) -- cgit v1.2.3 From 06902a6766f089e4da812876ddcf33e7ba8afce0 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 23 Jun 2022 22:45:07 -0400 Subject: gnu: Add python-pycotap. * gnu/packages/python-check.scm (python-pycotap): New variable. Co-authored-by: Maxim Cournoyer Signed-off-by: Maxim Cournoyer --- gnu/packages/python-check.scm | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 8302e2e09f..14be55054f 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2019, 2020, 2021 Efraim Flashner ;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019, 2021 Hartmut Goebel -;;; Copyright © 2020 Julien Lepiller +;;; Copyright © 2020, 2022 Julien Lepiller ;;; Copyright © 2020, 2022 Marius Bakke ;;; Copyright © 2020 Edouard Klein ;;; Copyright © 2020, 2021 Vinicius Monego @@ -2324,3 +2324,32 @@ provided for the main Python test runners.") (description "This package provides a pytest fixture to mock httpx requests to be replied to with user provided responses.") (license license:expat))) + +(define-public python-pycotap + (package + (name "python-pycotap") + (version "1.2.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycotap" version)) + (sha256 + (base32 "1v69fxial9i5wlap6wc4igq3hydvxbak7dlgb7cikk8wjgafqf7r")))) + (build-system python-build-system) + (home-page "https://el-tramo.be/pycotap") + (synopsis "Tiny Python TAP test runner") + (description "This package provides a simple Python test runner for +unittest that outputs Test Anything Protocol (TAP) results to standard +output. Contrary to other TAP runners for Python, pycotap... +@itemize +@item +prints TAP (and only TAP) to standard output instead of to a separate file, +allowing you to pipe it directly to TAP pretty printers and processors; +@item only contains a TAP reporter, so no parsers, no frameworks, no +dependencies, etc; +@item +is configurable: you can choose how you want the test output and test result +diagnostics to end up in your TAP output (as TAP diagnostics, YAML blocks, or +attachments). +@end itemize") + (license license:expat))) -- cgit v1.2.3 From 39b118776bbbaed049f8bcafa27bde30d9d0b2f6 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 23 Jun 2022 22:49:08 -0400 Subject: gnu: ibus-anthy: Modernize. * gnu/packages/ibus.scm (ibus-anthy)[phases]: Delete trailing #t and adjust to use search-input-file and search-input-directory. [native-inputs]: Use new style. [inputs]: Likewise. --- gnu/packages/ibus.scm | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 9c0c4903ca..74e0e45110 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Songlin Jiang ;;; Copyright © 2021 Taiju HIGASHI +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -329,25 +330,28 @@ Chinese pinyin input methods.") (modify-phases %standard-phases (add-after 'install 'wrap-programs (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each - (lambda (prog) - (wrap-program (string-append out "/libexec/" prog) - `("GUIX_PYTHONPATH" ":" prefix - (,(getenv "GUIX_PYTHONPATH"))) - `("GI_TYPELIB_PATH" ":" prefix - (,(getenv "GI_TYPELIB_PATH") - ,(string-append out "/lib/girepository-1.0"))))) - '("ibus-engine-anthy" "ibus-setup-anthy")) - #t)))))) + (for-each (lambda (prog) + (wrap-program (search-input-file + outputs (string-append "libexec/" prog)) + `("GUIX_PYTHONPATH" ":" prefix + (,(getenv "GUIX_PYTHONPATH"))) + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH") + ,(search-input-directory + inputs "lib/girepository-1.0"))))) + '("ibus-engine-anthy" "ibus-setup-anthy"))))))) (native-inputs - `(("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("intltool" ,intltool) - ("pkg-config" ,pkg-config) - ("python" ,python))) + (list gettext-minimal + `(,glib "bin") + intltool + pkg-config + python)) (inputs - (list anthy gtk+ ibus gobject-introspection python-pygobject)) + (list anthy + gtk+ + ibus + gobject-introspection + python-pygobject)) (synopsis "Anthy Japanese language input method for IBus") (description "IBus-Anthy is an engine for the input bus \"IBus\"). It adds the Anthy Japanese language input method to IBus. Because most graphical -- cgit v1.2.3 From 0cee62d45ad0ff73860a4e0524bc6cd89263c018 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:13 +0100 Subject: gnu: runc: Update to 1.1.1. * gnu/packages/virtualization.scm (runc): Update to 1.1.1. [native-inputs]: Use new style. Signed-off-by: Maxim Cournoyer --- gnu/packages/virtualization.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 4cb83b4d85..4a065e4ef4 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2021 Leo Famulari -;;; Copyright © 2021 Pierre Langlois +;;; Copyright © 2021, 2022 Pierre Langlois ;;; Copyright © 2021 Dion Mendel ;;; Copyright © 2021 Andrew Whatson ;;; Copyright © 2021 Vincent Legoll @@ -1817,7 +1817,7 @@ main monitor/GPU.") (define-public runc (package (name "runc") - (version "1.0.0-rc93") + (version "1.1.1") (source (origin (method url-fetch) (uri (string-append @@ -1826,7 +1826,7 @@ main monitor/GPU.") (file-name (string-append name "-" version ".tar.xz")) (sha256 (base32 - "0b90r1bkvlqli53ca1yc1l488dba0isd3i6l7nlhszxi8p7hzvkh")))) + "0jx56x49dgkygdbrfb3pmxycy1n37arj97jra8n422dj36xz1hbm")))) (build-system go-build-system) (arguments '(#:import-path "github.com/opencontainers/runc" @@ -1851,8 +1851,7 @@ main monitor/GPU.") (invoke "make" "install" "install-bash" "install-man" (string-append "PREFIX=" out))))))))) (native-inputs - `(("go-md2man" ,go-github-com-go-md2man) - ("pkg-config" ,pkg-config))) + (list go-github-com-go-md2man pkg-config)) (inputs (list libseccomp)) (synopsis "Open container initiative runtime") -- cgit v1.2.3 From 575dffef01e98cccde5accdf54f2af6b75b58053 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:14 +0100 Subject: gnu: containerd: Fix patch-paths build phase. * gnu/packages/docker.scm (containerd)[arguments]: Add 'patch-paths phases after 'unpack because 'chdir doesn't exist. Signed-off-by: Maxim Cournoyer --- gnu/packages/docker.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 07731886ae..5c0f4d496d 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2020 Katherine Cox-Buday ;;; Copyright © 2020 Jesse Dowell ;;; Copyright © 2021 Oleg Pykhalov +;;; Copyright © 2022 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -190,7 +191,7 @@ Python without keeping their credentials in a Docker configuration file.") `(#:import-path "github.com/containerd/containerd" #:phases (modify-phases %standard-phases - (add-after 'chdir 'patch-paths + (add-after 'unpack 'patch-paths (lambda* (#:key inputs import-path outputs #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) (substitute* "runtime/v1/linux/runtime.go" -- cgit v1.2.3 From f3a16cab5a9927f7851de937b20b6f2ebf1936c2 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:15 +0100 Subject: gnu: containerd: Update to 1.6.6. * gnu/packages/docker.scm (containerd): Update to 1.6.6. [arguments]: Substitute runc binary for "pkg/cri/config/config_unix.go". Set PREFIX to empty string, as the install directory is $DESTDIR/$PREFIX. Co-authored-by: Maxim Cournoyer Signed-off-by: Maxim Cournoyer --- gnu/packages/docker.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 5c0f4d496d..aae4fc01d0 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -174,7 +174,7 @@ Python without keeping their credentials in a Docker configuration file.") (define-public containerd (package (name "containerd") - (version "1.4.4") + (version "1.6.6") (source (origin (method git-fetch) @@ -183,7 +183,7 @@ Python without keeping their credentials in a Docker configuration file.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0qjbfj1dw6pykxhh8zahcxlgpyjzgnrngk5vjaf34akwyan8nrxb")))) + (base32 "1vsl747i3wyy68j4lp4nprwxadbyga8qxlrk892afcd2990zp5mr")))) (build-system go-build-system) (arguments (let ((make-flags (list (string-append "VERSION=" version) @@ -203,6 +203,11 @@ Python without keeping their credentials in a Docker configuration file.") (string-append "defaultShim = \"" (assoc-ref outputs "out") "/bin/containerd-shim\"\n"))) + (substitute* "pkg/cri/config/config_unix.go" + (("DefaultRuntimeName: \"runc\"") + (string-append "DefaultRuntimeName: \"" + (assoc-ref inputs "runc") + "/sbin/runc\""))) (substitute* "vendor/github.com/containerd/go-runc/runc.go" (("DefaultCommand[ \t]*=.*") (string-append "DefaultCommand = \"" @@ -226,8 +231,8 @@ Python without keeping their credentials in a Docker configuration file.") (lambda* (#:key import-path outputs #:allow-other-keys) (with-directory-excursion (string-append "src/" import-path) (let* ((out (assoc-ref outputs "out"))) - (apply invoke "make" (string-append "DESTDIR=" out) "install" - ',make-flags))))))))) + (apply invoke "make" (string-append "DESTDIR=" out) + "PREFIX=" "install" ',make-flags))))))))) (inputs (list btrfs-progs libseccomp pigz runc util-linux)) (native-inputs -- cgit v1.2.3 From c37d970f4dcb1af3b54f47631bd878698416ce5c Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:16 +0100 Subject: gnu: containerd: Switch to gexp arguments. * gnu/packages/docker.scm (containerd)[arguments]: Rewrite as gexps. Pass all flags via make-flags variable. Switch to using search-input-file. Signed-off-by: Maxim Cournoyer --- gnu/packages/docker.scm | 95 +++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index aae4fc01d0..90ba4494ce 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) @@ -186,53 +187,55 @@ Python without keeping their credentials in a Docker configuration file.") (base32 "1vsl747i3wyy68j4lp4nprwxadbyga8qxlrk892afcd2990zp5mr")))) (build-system go-build-system) (arguments - (let ((make-flags (list (string-append "VERSION=" version) - "REVISION=0"))) - `(#:import-path "github.com/containerd/containerd" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (substitute* "runtime/v1/linux/runtime.go" - (("defaultRuntime[ \t]*=.*") - (string-append "defaultRuntime = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("defaultShim[ \t]*=.*") - (string-append "defaultShim = \"" - (assoc-ref outputs "out") - "/bin/containerd-shim\"\n"))) - (substitute* "pkg/cri/config/config_unix.go" - (("DefaultRuntimeName: \"runc\"") - (string-append "DefaultRuntimeName: \"" - (assoc-ref inputs "runc") - "/sbin/runc\""))) - (substitute* "vendor/github.com/containerd/go-runc/runc.go" - (("DefaultCommand[ \t]*=.*") - (string-append "DefaultCommand = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "vendor/github.com/containerd/continuity/testutil\ + (let ((make-flags #~(list (string-append "VERSION=" #$version) + (string-append "DESTDIR=" #$output) + "PREFIX=" + "REVISION=0"))) + (list + #:import-path "github.com/containerd/containerd" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs import-path outputs #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (substitute* "runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (search-input-file inputs "/sbin/runc") + "\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (assoc-ref outputs "out") + "/bin/containerd-shim\"\n"))) + (substitute* "pkg/cri/config/config_unix.go" + (("DefaultRuntimeName: \"runc\"") + (string-append "DefaultRuntimeName: \"" + (search-input-file inputs "/sbin/runc") + "\""))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand[ \t]*=.*") + (string-append "DefaultCommand = \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "vendor/github.com/containerd/continuity/testutil\ /loopback/loopback_linux.go" - (("exec\\.Command\\(\"losetup\"") - (string-append "exec.Command(\"" - (assoc-ref inputs "util-linux") - "/sbin/losetup\""))) - (substitute* "archive/compression/compression.go" - (("exec\\.LookPath\\(\"unpigz\"\\)") - (string-append "\"" (assoc-ref inputs "pigz") - "/bin/unpigz\", error(nil)")))))) - (replace 'build - (lambda* (#:key import-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (apply invoke "make" ',make-flags)))) - (replace 'install - (lambda* (#:key import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (let* ((out (assoc-ref outputs "out"))) - (apply invoke "make" (string-append "DESTDIR=" out) - "PREFIX=" "install" ',make-flags))))))))) + (("exec\\.Command\\(\"losetup\"") + (string-append "exec.Command(\"" + (search-input-file inputs "/sbin/losetup") + "\""))) + (substitute* "archive/compression/compression.go" + (("exec\\.LookPath\\(\"unpigz\"\\)") + (string-append "\"" + (search-input-file inputs "/bin/unpigz") + "\", error(nil)")))))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (apply invoke "make" #$make-flags)))) + (replace 'install + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (apply invoke "make" "install" #$make-flags)))))))) (inputs (list btrfs-progs libseccomp pigz runc util-linux)) (native-inputs -- cgit v1.2.3 From 6c1dac4f06a2dddf1f30bea6bf8edfeb74a1ebb7 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:17 +0100 Subject: gnu: docker: Fix mkfs.xfs reference. * gnu/packages/docker.scm (docker)[arguments]: Refer to sbin/mkfs.xfs instead of bin/mkfs.xfs. Signed-off-by: Maxim Cournoyer --- gnu/packages/docker.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 90ba4494ce..5be32ab554 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -440,7 +440,7 @@ built-in registry server of Docker.") (substitute-LookPath* ("containerd" "containerd" "bin/containerd") ("ps" "procps" "bin/ps") - ("mkfs.xfs" "xfsprogs" "bin/mkfs.xfs") + ("mkfs.xfs" "xfsprogs" "sbin/mkfs.xfs") ("lvmdiskscan" "lvm2" "sbin/lvmdiskscan") ("pvdisplay" "lvm2" "sbin/pvdisplay") ("blkid" "util-linux" "sbin/blkid") -- cgit v1.2.3 From 185ae9b410a43f0415e83f9fb88549c21ca4a673 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Thu, 23 Jun 2022 23:06:55 -0400 Subject: gnu: docker: Update to 20.10.17. * gnu/packages/docker.scm (%docker-version): Update to 20.10.17. (docker-libnetwork)[source]: Update commit according to vendor.conf. Reset revision to 1. Simplify snippet. (docker)[origin]: Remove docker-fix-tests.patch. [arguments]: Adapt 'patch-paths phase, substitute "ip6tables" and buildkit-qemu. Remove trailing #t. [native-inputs]: Replace go-1.14 by go. (docker-cli)[source]: Update hash. [arguments]: Set GO_LINKMODE to "dynamic". Remove trailing #t. [phases]{check}: Replace 'if' with 'when'. * gnu/packages/networking.scm (go-sctp): Update commit according to docker-libnetwork's vendor.conf. * gnu/packages/patches/docker-fix-tests.patch: Delete. * gnu/local.mk (dist_patch_DATA): Remove patch. Co-authored-by: Maxim Cournoyer --- gnu/local.mk | 1 - gnu/packages/docker.scm | 96 ++++++++++++----------------- gnu/packages/networking.scm | 6 +- gnu/packages/patches/docker-fix-tests.patch | 28 --------- 4 files changed, 43 insertions(+), 88 deletions(-) delete mode 100644 gnu/packages/patches/docker-fix-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index 58a83c4916..353b91cfd2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1004,7 +1004,6 @@ dist_patch_DATA = \ %D%/packages/patches/docbook-xsl-support-old-url.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ - %D%/packages/patches/docker-fix-tests.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 5be32ab554..5ff574dbc9 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -54,7 +54,7 @@ ;; Note - when changing Docker versions it is important to update the versions ;; of several associated packages (docker-libnetwork and go-sctp). -(define %docker-version "19.03.15") +(define %docker-version "20.10.17") (define-public python-docker (package @@ -252,11 +252,10 @@ network attachments.") ;;; anyway, as it needs many dependencies that aren't being satisfied. (define docker-libnetwork ;; There are no recent release for libnetwork, so choose the last commit of - ;; the branch that Docker uses, as can be seen in the Docker source file - ;; 'hack/dockerfile/install/proxy.installer'. NOTE - It is important that - ;; this version is kept in sync with the version of Docker being used. - ;; This commit is the "bump_19.03" branch, as mentioned in Docker's vendor.conf. - (let ((commit "55e924b8a84231a065879156c0de95aefc5f5435") + ;; the branch that Docker uses, as can be seen in the 'vendor.conf' Docker + ;; source file. NOTE - It is important that this version is kept in sync + ;; with the version of Docker being used. + (let ((commit "f6ccccb1c082a432c2a5814aaedaca56af33d9ea") (version (version-major+minor %docker-version)) (revision "1")) (package @@ -271,12 +270,10 @@ network attachments.") (file-name (git-file-name name version)) (sha256 (base32 - "19syb3scwiykn44gqfaqrgqv8a0df4ps0ykf3za9xkjc5cyi99mp")) + "0nxpr0h0smv4n641g41vxibr5r85ixfcvs9cp3c4fc7zvrhjc49s")) ;; Delete bundled ("vendored") free software source code. (modules '((guix build utils))) - (snippet '(begin - (delete-file-recursively "vendor") - #t)))) + (snippet '(delete-file-recursively "vendor")))) (build-system go-build-system) (arguments `(#:import-path "github.com/moby/libnetwork/")) @@ -324,9 +321,7 @@ built-in registry server of Docker.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0419iha9zmwlhzhnbfxlsa13vgd04yifnsr8qqnj2ks5dxrcajl8")) - (patches - (search-patches "docker-fix-tests.patch")))) + (base32 "0hn7fg717rggwk6dbicrwa7aglqp7dp0jp5rvn6p9gfcnrp2w97d")))) (build-system gnu-build-system) (arguments `(#:modules @@ -369,9 +364,10 @@ built-in registry server of Docker.") (("DefaultRuntimeBinary = .*") (string-append "DefaultRuntimeBinary = \"" (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("DefaultRuntimeName = .*") - (string-append "DefaultRuntimeName = \"" + "/sbin/runc\"\n"))) + (substitute* "daemon/runtime_unix.go" + (("defaultRuntimeName = .*") + (string-append "defaultRuntimeName = \"" (assoc-ref inputs "runc") "/sbin/runc\"\n"))) (substitute* "daemon/config/config.go" @@ -400,16 +396,6 @@ built-in registry server of Docker.") (substitute* "pkg/archive/archive.go" (("string\\{\"xz") (string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz"))) - ;; TODO: Remove when Docker proper uses v1.14.x to build - (substitute* "registry/resumable/resumablerequestreader_test.go" - (("I%27m%20not%20an%20url" all) - (string-append "\"" all "\""))) - ;; TODO: Remove when Docker proper uses v1.14.x to build - (substitute* "vendor/gotest.tools/x/subtest/context.go" - (("func \\(tc \\*testcase\\) Cleanup\\(" all) - (string-append all "func()")) - (("tc\\.Cleanup\\(" all) - (string-append all "nil"))) (let ((source-files (filter (lambda (name) (not (string-contains name "test"))) @@ -446,6 +432,7 @@ built-in registry server of Docker.") ("blkid" "util-linux" "sbin/blkid") ("unpigz" "pigz" "bin/unpigz") ("iptables" "iptables" "sbin/iptables") + ("ip6tables" "iptables" "sbin/ip6tables") ("iptables-legacy" "iptables" "sbin/iptables") ("ip" "iproute2" "sbin/ip")) @@ -494,10 +481,13 @@ built-in registry server of Docker.") "exec.Command") ;; Search for ZFS in PATH. (("\\ isn't found. + ;; FIXME: We might need to package buildkit and docker's + ;; buildx plugin, to support qemu-based docker containers. + (("\\ .pc) - go-1.14 gotestsum pkg-config)) + go gotestsum pkg-config)) (synopsis "Docker container component library, and daemon") (description "This package provides a framework to assemble specialized container systems. It includes components for orchestration, image @@ -609,13 +595,13 @@ provisioning etc.") (version %docker-version) (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/docker/cli") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1asapjj8brvbkd5irgdq82fx1ihrc14qaq30jxvjwflfm5yb7lv0")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/cli") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ksicj4iqvgp9jabd4xmhkf3vax6dwn4f5dsr73bdqj4mf3ahav0")))) (build-system go-build-system) (arguments `(#:import-path "github.com/docker/cli" @@ -635,21 +621,20 @@ provisioning etc.") ;; Make build reproducible. (setenv "BUILDTIME" "1970-01-01 00:00:01.000000000+00:00") (symlink "src/github.com/docker/cli/scripts" "./scripts") - (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile") - #t)) + (symlink "src/github.com/docker/cli/docker.Makefile" "./docker.Makefile"))) (replace 'build (lambda _ - (invoke "./scripts/build/dynbinary"))) + (setenv "GO_LINKMODE" "dynamic") + (invoke "./scripts/build/binary"))) (replace 'check (lambda* (#:key make-flags tests? #:allow-other-keys) (setenv "PATH" (string-append (getcwd) "/build:" (getenv "PATH"))) - (if tests? - ;; Use the newly-built docker client for the tests. - (with-directory-excursion "src/github.com/docker/cli" - ;; TODO: Run test-e2e as well? - (apply invoke "make" "-f" "docker.Makefile" "test-unit" - (or make-flags '()))) - #t))) + (when tests? + ;; Use the newly-built docker client for the tests. + (with-directory-excursion "src/github.com/docker/cli" + ;; TODO: Run test-e2e as well? + (apply invoke "make" "-f" "docker.Makefile" "test-unit" + (or make-flags '())))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -662,8 +647,7 @@ provisioning etc.") (string-append etc "/fish/completions")) (install-file "zsh/_docker" (string-append etc "/zsh/site-functions"))) - (install-file "build/docker" out-bin) - #t)))))) + (install-file "build/docker" out-bin))))))) (native-inputs (list go libltdl pkg-config)) (synopsis "Command line interface to Docker") diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 473df7f3d0..b4c50bc783 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1778,8 +1778,8 @@ handling network namespaces in Go.") (define-public go-sctp ;; docker-libnetwork-cmd-proxy requires this exact commit. ;; This commit is mentioned in docker-libnetwork-cmd-proxy's vendor.conf. - (let ((commit "6e2cb1366111dcf547c13531e3a263a067715847") - (revision "2")) + (let ((commit "f2269e66cdee387bd321445d5d300893449805be") + (revision "3")) (package (name "go-sctp") (version (git-version "0.0.0" revision commit)) @@ -1791,7 +1791,7 @@ handling network namespaces in Go.") (file-name (git-file-name name version)) (sha256 (base32 - "1ba90fmpdwxa1ba4hrsjhi3gfy3pwmz7x8amw1p5dc9p5a7nnqrb")))) + "04463rnn9y9psp11ac5di6wrwxlhymw5h9hfhhhnxqwla90ikp0g")))) (build-system go-build-system) (arguments `(#:tests? #f ; Test suite is flakey. diff --git a/gnu/packages/patches/docker-fix-tests.patch b/gnu/packages/patches/docker-fix-tests.patch deleted file mode 100644 index 3e3e318e25..0000000000 --- a/gnu/packages/patches/docker-fix-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -Author: Danny Milosavljevic -The socket name ended up too long inside the container. -Use a shorter one. ---- a/pkg/authorization/authz_unix_test.go 2019-01-10 01:55:02.997985947 +0100 -+++ b/pkg/authorization/authz_unix_test.go 2019-01-10 02:03:21.177439757 +0100 -@@ -24,7 +24,7 @@ - ) - - const ( -- pluginAddress = "authz-test-plugin.sock" -+ pluginAddress = "/tmp/authz-test-plugin.sock" - ) - - func TestAuthZRequestPluginError(t *testing.T) { -@@ -263,12 +263,7 @@ - - // createTestPlugin creates a new sample authorization plugin - func createTestPlugin(t *testing.T) *authorizationPlugin { -- pwd, err := os.Getwd() -- if err != nil { -- t.Fatal(err) -- } -- -- client, err := plugins.NewClient("unix:///"+path.Join(pwd, pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) -+ client, err := plugins.NewClient("unix:///"+path.Join("/", pluginAddress), &tlsconfig.Options{InsecureSkipVerify: true}) - if err != nil { - t.Fatalf("Failed to create client %v", err) - } -- cgit v1.2.3 From 168a4955a320ebdf6fd2d3c630cd1aaea7ca6064 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:19 +0100 Subject: gnu: docker: Switch to gexp and new input style. * gnu/packages/docker.scm (docker)[arguments]: Rewrite as gexps. Switch to using search-input-file. [inputs]: Use new style inputs. Signed-off-by: Maxim Cournoyer --- gnu/packages/docker.scm | 483 ++++++++++++++++++++++++------------------------ 1 file changed, 241 insertions(+), 242 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 5ff574dbc9..02fb003c36 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -324,260 +324,259 @@ built-in registry server of Docker.") (base32 "0hn7fg717rggwk6dbicrwa7aglqp7dp0jp5rvn6p9gfcnrp2w97d")))) (build-system gnu-build-system) (arguments - `(#:modules - ((guix build gnu-build-system) + (list + #:modules + '((guix build gnu-build-system) ((guix build go-build-system) #:prefix go:) (guix build union) (guix build utils)) - #:imported-modules - (,@%gnu-build-system-modules + #:imported-modules + `(,@%gnu-build-system-modules (guix build union) (guix build go-build-system)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "builder/builder-next/executor_unix.go" - (("CommandCandidates:.*runc.*") - (string-append "CommandCandidates: []string{\"" - (assoc-ref inputs "runc") - "/sbin/runc\"},\n"))) - (substitute* "vendor/github.com/containerd/go-runc/runc.go" - (("DefaultCommand = .*") - (string-append "DefaultCommand = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" - (("defaultRuntime[ \t]*=.*") - (string-append "defaultRuntime = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("defaultShim[ \t]*=.*") - (string-append "defaultShim = \"" - (assoc-ref inputs "containerd") - "/bin/containerd-shim\"\n"))) - (substitute* "daemon/daemon_unix.go" - (("DefaultShimBinary = .*") - (string-append "DefaultShimBinary = \"" - (assoc-ref inputs "containerd") - "/bin/containerd-shim\"\n")) - (("DefaultRuntimeBinary = .*") - (string-append "DefaultRuntimeBinary = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "daemon/runtime_unix.go" - (("defaultRuntimeName = .*") - (string-append "defaultRuntimeName = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "daemon/config/config.go" - (("StockRuntimeName = .*") - (string-append "StockRuntimeName = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("DefaultInitBinary = .*") - (string-append "DefaultInitBinary = \"" - (assoc-ref inputs "tini") - "/bin/tini-static\"\n"))) - (substitute* "daemon/config/config_common_unix_test.go" - (("expectedInitPath: \"docker-init\"") - (string-append "expectedInitPath: \"" - (assoc-ref inputs "tini") - "/bin/tini-static\""))) - (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" - (("var defaultCommandCandidates = .*") - (string-append "var defaultCommandCandidates = []string{\"" - (assoc-ref inputs "runc") "/sbin/runc\"}"))) - (substitute* "vendor/github.com/docker/libnetwork/portmapper/proxy.go" - (("var userlandProxyCommandName = .*") - (string-append "var userlandProxyCommandName = \"" - (assoc-ref inputs "docker-proxy") - "/bin/proxy\"\n"))) - (substitute* "pkg/archive/archive.go" - (("string\\{\"xz") - (string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (search-input-file inputs "/sbin/runc") + "\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (search-input-file inputs "/sbin/runc") + "\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (search-input-file inputs "/bin/containerd-shim") + "\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (search-input-file inputs "/bin/containerd-shim") + "\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "daemon/runtime_unix.go" + (("defaultRuntimeName = .*") + (string-append "defaultRuntimeName = \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "daemon/config/config.go" + (("StockRuntimeName = .*") + (string-append "StockRuntimeName = \"" + (search-input-file inputs "/sbin/runc") + "\"\n")) + (("DefaultInitBinary = .*") + (string-append "DefaultInitBinary = \"" + (search-input-file inputs "/bin/tini-static") + "\"\n"))) + (substitute* "daemon/config/config_common_unix_test.go" + (("expectedInitPath: \"docker-init\"") + (string-append "expectedInitPath: \"" + (search-input-file inputs "/bin/tini-static") + "\""))) + (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (search-input-file inputs "/sbin/runc") "\"}"))) + (substitute* "vendor/github.com/docker/libnetwork/portmapper/proxy.go" + (("var userlandProxyCommandName = .*") + (string-append "var userlandProxyCommandName = \"" + (search-input-file inputs "/bin/proxy") + "\"\n"))) + (substitute* "pkg/archive/archive.go" + (("string\\{\"xz") + (string-append "string{\"" (search-input-file inputs "/bin/xz")))) - (let ((source-files (filter (lambda (name) - (not (string-contains name "test"))) - (find-files "." "\\.go$")))) - (let-syntax ((substitute-LookPath* - (syntax-rules () - ((_ (source-text package relative-path) ...) - (substitute* source-files - (((string-append "\\ isn't found. ;; FIXME: We might need to package buildkit and docker's ;; buildx plugin, to support qemu-based docker containers. - (("\\ .pc) go gotestsum pkg-config)) -- cgit v1.2.3 From 487070c4254524e1ad00c0c29acaa7b3d71cdda4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 23 Jun 2022 23:26:08 -0400 Subject: gnu: docker: Honor TESTS? and please guix lint. * gnu/packages/docker.scm (docker)[phases]{patch-paths}: Split long lines. {check}: Honor TESTS?. [synopsis]: Do not start synopsis with package name. --- gnu/packages/docker.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 02fb003c36..ae4ee419af 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -348,7 +348,8 @@ built-in registry server of Docker.") (string-append "DefaultCommand = \"" (search-input-file inputs "/sbin/runc") "\"\n"))) - (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" + (substitute* "vendor/github.com/containerd/containerd/\ +runtime/v1/linux/runtime.go" (("defaultRuntime[ \t]*=.*") (string-append "defaultRuntime = \"" (search-input-file inputs "/sbin/runc") @@ -385,7 +386,8 @@ built-in registry server of Docker.") (string-append "expectedInitPath: \"" (search-input-file inputs "/bin/tini-static") "\""))) - (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" + (substitute* "vendor/github.com/moby/buildkit/executor/\ +runcexecutor/executor.go" (("var defaultCommandCandidates = .*") (string-append "var defaultCommandCandidates = []string{\"" (search-input-file inputs "/sbin/runc") "\"}"))) @@ -534,19 +536,20 @@ built-in registry server of Docker.") ;; dockerd instead. (invoke "hack/make.sh" "dynbinary"))) (replace 'check - (lambda _ - ;; The build process generated a file because the environment - ;; variable "AUTO_GOPATH" was set. Use it. - (setenv "GOPATH" (string-append (getcwd) "/.gopath")) - ;; ".gopath/src/github.com/docker/docker" is a link to the current - ;; directory and chdir would canonicalize to that. - ;; But go needs to have the uncanonicalized directory name, so - ;; store that. - (setenv "PWD" (string-append (getcwd) - "/.gopath/src/github.com/docker/docker")) - (with-directory-excursion ".gopath/src/github.com/docker/docker" - (invoke "hack/test/unit")) - (setenv "PWD" #f))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; The build process generated a file because the environment + ;; variable "AUTO_GOPATH" was set. Use it. + (setenv "GOPATH" (string-append (getcwd) "/.gopath")) + ;; ".gopath/src/github.com/docker/docker" is a link to the current + ;; directory and chdir would canonicalize to that. + ;; But go needs to have the uncanonicalized directory name, so + ;; store that. + (setenv "PWD" (string-append + (getcwd) "/.gopath/src/github.com/docker/docker")) + (with-directory-excursion ".gopath/src/github.com/docker/docker" + (invoke "hack/test/unit")) + (setenv "PWD" #f)))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -580,7 +583,7 @@ built-in registry server of Docker.") (native-inputs (list eudev ; TODO: Should be propagated by lvm2 (.pc -> .pc) go gotestsum pkg-config)) - (synopsis "Docker container component library, and daemon") + (synopsis "Container component library and daemon") (description "This package provides a framework to assemble specialized container systems. It includes components for orchestration, image management, secret management, configuration management, networking, -- cgit v1.2.3 From 14518fcc54b4172389a0c733a7b734e4bed94405 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jun 2022 00:43:23 -0400 Subject: tests: docker: Relax marionette timeout. The tests would otherwise fail on an old desktop. * gnu/tests/docker.scm (run-docker-test) : Specify a timeout of 60 s. (run-docker-system-test) : Likewise. --- gnu/tests/docker.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm index 6302bd0727..3e780d8a60 100644 --- a/gnu/tests/docker.scm +++ b/gnu/tests/docker.scm @@ -79,7 +79,8 @@ inside %DOCKER-OS." (gnu build marionette)) (define marionette - (make-marionette (list #$vm))) + ;; Relax timeout to accommodate older systems. + (make-marionette (list #$vm) #:timeout 60)) (test-runner-current (system-test-runner #$output)) (test-begin "docker") @@ -221,7 +222,8 @@ inside %DOCKER-OS." (guix build utils)) (define marionette - (make-marionette (list #$vm))) + ;; Relax timeout to accommodate older systems. + (make-marionette (list #$vm) #:timeout 60)) (test-runner-current (system-test-runner #$output)) (test-begin "docker") -- cgit v1.2.3 From 242fad357e969da3b1f80b7e4360b54d99ee03f3 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 10 May 2022 01:24:50 +0200 Subject: utils: Define 'target-x86?' predicate. * guix/utils.scm (target-x86?): New predicate. Signed-off-by: Mathieu Othacehe --- guix/utils.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 5c36b15cfe..745da98a79 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2018 Steve Sprang ;;; Copyright © 2022 Taiju HIGASHI +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -92,6 +93,7 @@ target-mingw? target-x86-32? target-x86-64? + target-x86? target-arm32? target-aarch64? target-arm? @@ -697,6 +699,10 @@ a character other than '@'." architecture (x86_64)?" (string-prefix? "x86_64-" target)) +(define* (target-x86? #:optional (target (or (%current-target-system) + (%current-system)))) + (or (target-x86-32? target) (target-x86-64? target))) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) -- cgit v1.2.3 From 62c86c8391ceb8953ca972498fd75ea9298b85ff Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 17 Jun 2022 23:18:35 -0600 Subject: image: Add support for 32bit UEFI. * gnu/bootloader/grub.scm (grub-efi32-bootloader): New variable. (install-grub-efi32): New variable. * gnu/build/bootloader.scm (install-efi): Add a 'targets' keyword argument. (install-efi-loader): Likewise. * gnu/build/image.scm (initialize-efi32-partition): New procedure. * gnu/packages/bootloaders.scm (grub-efi32): New variable. * gnu/system/image.scm (esp32-partition): New variable (efi32-disk-image): New variable. (efi32-raw-image-type): New variable. (system-disk-image)[partition-image]: Set '#:grub-efi32' when calling the partition initializer. Signed-off-by: Mathieu Othacehe --- gnu/bootloader/grub.scm | 32 ++++++++++++++++++++++++++++++++ gnu/build/bootloader.scm | 37 ++++++++++++++++++++++++------------- gnu/build/image.scm | 14 ++++++++++++++ gnu/packages/bootloaders.scm | 13 +++++++++++++ gnu/system/image.scm | 19 +++++++++++++++++++ 5 files changed, 102 insertions(+), 13 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 65d7171432..4f18c9b518 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2020 Stefan ;;; Copyright © 2022 Karl Hallsby +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,6 +58,7 @@ grub-bootloader grub-efi-bootloader grub-efi-removable-bootloader + grub-efi32-bootloader grub-efi-netboot-bootloader grub-mkrescue-bootloader grub-minimal-bootloader @@ -636,6 +638,29 @@ fi~%")))) "--bootloader-id=Guix" "--efi-directory" target-esp))))) +(define install-grub-efi32 + #~(lambda (bootloader efi-dir mount-point) + ;; There is nothing useful to do when called in the context of a disk + ;; image generation. + (when efi-dir + ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the + ;; system whose root is mounted at MOUNT-POINT. + (let ((grub-install (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot")) + ;; When installing Guix, it's common to mount EFI-DIR below + ;; MOUNT-POINT rather than /boot/efi on the live image. + (target-esp (if (file-exists? (string-append mount-point efi-dir)) + (string-append mount-point efi-dir) + efi-dir))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + (invoke/quiet grub-install "--boot-directory" install-dir + "--bootloader-id=Guix" + (cond ((target-x86?) "--target=i386-efi") + ((target-arm?) "--target=arm-efi")) + "--efi-directory" target-esp))))) + (define (install-grub-efi-netboot subdir) "Define a grub-efi-netboot bootloader installer for installation in SUBDIR, which is usually efi/Guix or efi/boot." @@ -768,6 +793,13 @@ considered for security aspects." (name 'grub-efi-removable-bootloader) (installer install-grub-efi-removable))) +(define grub-efi32-bootloader + (bootloader + (inherit grub-efi-bootloader) + (installer install-grub-efi32) + (name 'grub-efi32) + (package grub-efi32))) + (define grub-efi-netboot-bootloader (bootloader (inherit grub-efi-bootloader) diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm index 9a89fe55cb..af6063a884 100644 --- a/gnu/build/bootloader.scm +++ b/gnu/build/bootloader.scm @@ -1,6 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2019 Ludovic Courtès +;;; Copyright © 2022 Denis 'GNUtoo' Carikli +;;; Copyright © 2022 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,8 +56,12 @@ ;;; EFI bootloader. ;;; -(define (install-efi grub grub-config esp) - "Write a self-contained GRUB EFI loader to the mounted ESP using GRUB-CONFIG." +(define* (install-efi grub grub-config esp #:key targets) + "Write a self-contained GRUB EFI loader to the mounted ESP using +GRUB-CONFIG. + +If TARGETS is set, use its car as the GRUB image format and its cdr as +the output filename. Otherwise, use defaults for the host platform." (let* ((system %host-type) ;; Hard code the output location to a well-known path recognized by ;; compliant firmware. See "3.5.1.1 Removable Media Boot Behaviour": @@ -63,14 +69,15 @@ (grub-mkstandalone (string-append grub "/bin/grub-mkstandalone")) (efi-directory (string-append esp "/EFI/BOOT")) ;; Map grub target names to boot file names. - (efi-targets (cond ((string-prefix? "x86_64" system) - '("x86_64-efi" . "BOOTX64.EFI")) - ((string-prefix? "i686" system) - '("i386-efi" . "BOOTIA32.EFI")) - ((string-prefix? "armhf" system) - '("arm-efi" . "BOOTARM.EFI")) - ((string-prefix? "aarch64" system) - '("arm64-efi" . "BOOTAA64.EFI"))))) + (efi-targets (or targets + (cond ((string-prefix? "x86_64" system) + '("x86_64-efi" . "BOOTX64.EFI")) + ((string-prefix? "i686" system) + '("i386-efi" . "BOOTIA32.EFI")) + ((string-prefix? "armhf" system) + '("arm-efi" . "BOOTARM.EFI")) + ((string-prefix? "aarch64" system) + '("arm64-efi" . "BOOTAA64.EFI")))))) ;; grub-mkstandalone requires a TMPDIR to prepare the firmware image. (setenv "TMPDIR" esp) @@ -81,9 +88,12 @@ ;; Graft the configuration file onto the image. (string-append "boot/grub/grub.cfg=" grub-config)))) -(define (install-efi-loader grub-efi esp) +(define* (install-efi-loader grub-efi esp #:key targets) "Install in ESP directory the given GRUB-EFI bootloader. Configure it to -load the Grub bootloader located in the 'Guix_image' root partition." +load the Grub bootloader located in the 'Guix_image' root partition. + +If TARGETS is set, use its car as the GRUB image format and its cdr as +the output filename. Otherwise, use defaults for the host platform." (let ((grub-config "grub.cfg")) (call-with-output-file grub-config (lambda (port) @@ -97,5 +107,6 @@ load the Grub bootloader located in the 'Guix_image' root partition." insmod part_gpt~@ search --set=root --label Guix_image~@ configfile /boot/grub/grub.cfg~%"))) - (install-efi grub-efi grub-config esp) + (install-efi grub-efi grub-config esp #:targets targets) (delete-file grub-config))) + diff --git a/gnu/build/image.scm b/gnu/build/image.scm index ddfd34c111..321be8e4b1 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2022 Pavel Shlyak +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix store database) + #:use-module (guix utils) #:use-module (gnu build bootloader) #:use-module (gnu build install) #:use-module (gnu build linux-boot) @@ -41,6 +43,7 @@ convert-disk-image genimage initialize-efi-partition + initialize-efi32-partition initialize-root-partition make-iso9660-image)) @@ -169,6 +172,17 @@ produced by #:references-graphs. Pass WAL-MODE? to call-with-database." "Install in ROOT directory, an EFI loader using GRUB-EFI." (install-efi-loader grub-efi root)) +(define* (initialize-efi32-partition root + #:key + grub-efi32 + #:allow-other-keys) + "Install in ROOT directory, an EFI 32bit loader using GRUB-EFI32." + (install-efi-loader grub-efi32 root + #:targets (cond ((target-x86?) + '("i386-efi" . "BOOTIA32.EFI")) + ((target-arm?) + '("arm-efi" . "BOOTARM.EFI"))))) + (define* (initialize-root-partition root #:key bootcfg diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 91d259475a..71a10f54d5 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2020, 2021 Pierre Langlois ;;; Copyright © 2021 Vincent Legoll ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -332,6 +333,18 @@ menu to select one of the installed operating systems.") "/bin/mcopy\""))) #t)))))))))) +(define-public grub-efi32 + (package + (inherit grub-efi) + (name "grub-efi32") + (synopsis "GRand Unified Boot loader (UEFI 32bit version)") + (arguments + `(,@(substitute-keyword-arguments (package-arguments grub-efi) + ((#:configure-flags flags + ''()) `(cons* ,(cond ((target-x86?) "--target=i386") + ((target-arm?) "--target=arm")) + ,flags))))))) + ;; Because grub searches hardcoded paths it's easiest to just build grub ;; again to make it find both grub-pc and grub-efi. There is a command ;; line argument which allows you to specify ONE platform - but diff --git a/gnu/system/image.scm b/gnu/system/image.scm index f02f6e0b8c..5972a944d7 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020, 2021 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2022 Pavel Shlyak +;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ root-label esp-partition + esp32-partition root-partition efi-disk-image @@ -75,6 +77,7 @@ image-with-os efi-raw-image-type + efi32-raw-image-type qcow2-image-type iso-image-type uncompressed-iso-image-type @@ -110,6 +113,11 @@ (flags '(esp)) (initializer (gexp initialize-efi-partition)))) +(define esp32-partition + (partition + (inherit esp-partition) + (initializer (gexp initialize-efi32-partition)))) + (define root-partition (partition (size 'guess) @@ -123,6 +131,11 @@ (format 'disk-image) (partitions (list esp-partition root-partition)))) +(define efi32-disk-image + (image + (format 'disk-image) + (partitions (list esp32-partition root-partition)))) + (define iso9660-image (image (format 'iso9660) @@ -164,6 +177,11 @@ set to the given OS." (name 'efi-raw) (constructor (cut image-with-os efi-disk-image <>)))) +(define efi32-raw-image-type + (image-type + (name 'efi32-raw) + (constructor (cut image-with-os efi32-disk-image <>)))) + (define qcow2-image-type (image-type (name 'qcow2) @@ -376,6 +394,7 @@ used in the image." #$(image-shared-store? image)) #:system-directory #$os #:grub-efi #+grub-efi + #:grub-efi32 #+grub-efi32 #:bootloader-package #+(bootloader-package bootloader) #:bootloader-installer -- cgit v1.2.3 From ed2d2a2d579456c356288232128bf32322c5edfa Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 23 Jun 2022 18:13:29 +0200 Subject: tests: ldap: Increase VM memory size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the default limit of 512 MB the test sometimes fails, in different ways. Fixes https://issues.guix.gnu.org/55206. * gnu/tests/ldap.scm (run-ldap-test): Increase memory size to 1024 MiB. Signed-off-by: Mathieu Othacehe --- gnu/tests/ldap.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/tests/ldap.scm b/gnu/tests/ldap.scm index d5403b3539..47e77c0c53 100644 --- a/gnu/tests/ldap.scm +++ b/gnu/tests/ldap.scm @@ -58,7 +58,9 @@ (guix combinators)))) (define vm - (virtual-machine os)) + (virtual-machine + (operating-system os) + (memory-size 1024))) (define test (with-imported-modules '((gnu build marionette)) -- cgit v1.2.3 From 882cbfa0743ba8c9b27b035cea7dcbb026e6acb0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 19 Jun 2022 02:00:00 +0200 Subject: gnu: nmon: Use the new TARGET-X86? test. * gnu/packages/admin.scm (nmon)[arguments]: Use TARGET-X86?. --- gnu/packages/admin.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5238efce2f..17b7b38a15 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1156,8 +1156,7 @@ IPv6, proxies, and Unix sockets.") (lambda _ ;; These #defines aren't well-documented and, e.g., POWER was ;; not actually tested on every possible TARGET-POWERPC?. - (let* ((system #$(cond ((target-x86-32?) "X86") - ((target-x86-64?) "X86") + (let* ((system #$(cond ((target-x86?) "X86") ((target-arm?) "ARM") ((target-powerpc?) "POWER") (else "CROSS_FINGERS")))) -- cgit v1.2.3 From 034739eb8e504eb82ed005105759aa08905b3216 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 24 Jun 2022 17:46:46 +0530 Subject: gnu: xapian, python-xapian-bindings: Update to 1.4.19. * gnu/packages/search.scm (xapian, python-xapian-bindings): Update to 1.4.19. --- gnu/packages/search.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index 346313c7ed..e27d6d8605 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021 Alexandr Vityazev ;;; Copyright © 2021, 2022 Nicolas Goaziou ;;; Copyright © 2022 Jai Vetrivelan +;;; Copyright © 2022 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,14 +74,14 @@ (define-public xapian (package (name "xapian") - (version "1.4.18") + (version "1.4.19") ;; Note: When updating Xapian, remember to update xapian-bindings below. (source (origin (method url-fetch) (uri (string-append "https://oligarchy.co.uk/xapian/" version "/xapian-core-" version ".tar.xz")) (sha256 - (base32 "0xsb4ihf3p767f0zx9p4janwni6r9sg5j6lry0002i8hmnsdnv8r")))) + (base32 "1hx92kbqdl38gsrwzvbqgf2jc4wwzsad2gd99g62cdfclvy4ijhz")))) (build-system gnu-build-system) (inputs (list zlib `(,util-linux "lib"))) @@ -118,7 +119,7 @@ rich set of boolean query operators.") "/xapian-bindings-" version ".tar.xz")) (sha256 (base32 - "13ziql8027glgihgvnbsa75vkcn82g83mbihj60zf0njj170clpy")))) + "0gc8l9cn8jdma0p73jl14z17yizp6dax5zsycvgprajii6j8bhwi")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-python3") -- cgit v1.2.3 From 979203dc041af5dcbde4d82441716bfa67418567 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 24 Jun 2022 18:14:51 +0530 Subject: gnu: Use license: prefix in (gnu packages search). * gnu/packages/search.scm: Import (guix licenses) with the license: prefix. Adjust all license fields. --- gnu/packages/search.scm | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index e27d6d8605..27c1aa3318 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -28,8 +28,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages search) - #:use-module ((guix licenses) - #:select (gpl2 gpl2+ gpl3+ agpl3+ lgpl2.1+ bsd-3 x11 perl-license)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -107,7 +106,7 @@ add advanced indexing and search facilities to their own applications. It supports the Probabilistic Information Retrieval model and also supports a rich set of boolean query operators.") (home-page "https://xapian.org/") - (license (list gpl2+ bsd-3 x11)))) + (license (list license:gpl2+ license:bsd-3 license:x11)))) (define-public python-xapian-bindings (package (inherit xapian) @@ -134,7 +133,7 @@ rich set of boolean query operators.") (inputs (list python xapian zlib)) (synopsis "Python bindings for the Xapian search engine library") - (license gpl2+))) + (license license:gpl2+))) (define-public perl-search-xapian (package @@ -158,7 +157,7 @@ rich set of boolean query operators.") "Search::Xapian wraps most methods of most Xapian classes. The missing classes and methods should be added in the future. It also provides a simplified, more 'perlish' interface to some common operations.") - (license perl-license))) + (license license:perl-license))) (define-public libtocc (package @@ -202,7 +201,7 @@ simplified, more 'perlish' interface to some common operations.") system. The goal of Tocc is to provide a better system for classifying files that is more flexible than classic file systems that are based on a tree of files and directories.") - (license gpl3+))) + (license license:gpl3+))) (define-public tocc (package @@ -223,7 +222,7 @@ files and directories.") (description "Tocc is a tag-based file management system. This package contains the command line tool for interacting with libtocc.") - (license gpl3+))) + (license license:gpl3+))) (define-public searx (package @@ -270,7 +269,7 @@ command line tool for interacting with libtocc.") (home-page "https://searx.github.io/searx/") (synopsis "Privacy-respecting metasearch engine") (description "Searx is a privacy-respecting, hackable metasearch engine.") - (license agpl3+))) + (license license:agpl3+))) (define-public bool (package @@ -295,7 +294,7 @@ statements, as well as the NEAR statement to search for the occurrence of words in close proximity to each other. It handles context gracefully, accounting for new lines and paragraph changes. It also has robust support for parsing HTML files.") - (license gpl3+))) + (license license:gpl3+))) (define-public fsearch (package @@ -326,7 +325,7 @@ for parsing HTML files.") (description "FSearch is a fast file search utility, inspired by Everything Search Engine. It is written in C and based on GTK3.") - (license gpl2+))) + (license license:gpl2+))) (define-public recoll (package @@ -422,7 +421,7 @@ their file names. It can search most document formats, but you may need external applications for text extraction. It can reach any storage place: files, archive members, email attachments, transparently handling decompression.") - (license gpl2+))) + (license license:gpl2+))) (define-public hyperestraier (package @@ -448,7 +447,7 @@ decompression.") (description "Hyper Estraier can be used to integrate full-text search into applications, using either the provided command line and CGI interfaces, or a C API.") - (license lgpl2.1+))) + (license license:lgpl2.1+))) (define-public mlocate (package @@ -471,7 +470,7 @@ most of the file system, which makes it faster and does not trash the system caches as much. The locate(1) utility is intended to be completely compatible with slocate, and attempts to be compatible to GNU locate when it does not conflict with slocate compatibility.") - (license gpl2))) + (license license:gpl2))) (define-public plocate (package @@ -509,7 +508,7 @@ conflict with slocate compatibility.") (description "Plocate is a @code{locate} based on posting lists, completely replacing @command{mlocate} with a faster and smaller index. It is suitable as a default locate on your system.") - (license gpl2))) + (license license:gpl2))) (define-public swish-e (package @@ -570,7 +569,7 @@ suitable as a default locate on your system.") "Swish-e is Simple Web Indexing System for Humans - Enhanced. Swish-e can quickly and easily index directories of files or remote web sites and search the generated indexes.") - (license gpl2+))) ;with exception + (license license:gpl2+))) ; with exception (define-public xapers (package @@ -638,7 +637,7 @@ geared towards academic journal articles build on the Xapian search engine. Think of it as your own personal document search engine, or a local cache of online libraries. It provides fast search of document text and bibliographic data and simple document and bibtex retrieval.") - (license gpl3+))) + (license license:gpl3+))) (define-public ugrep (package @@ -693,6 +692,6 @@ multi-threaded and other techniques to speed up search, pattern-matching and decompression. Many pre-defined regexps ease searching e.g. C typdefs or XML attributes. Results can be output in several structured or self-defined formats.") - (license bsd-3))) + (license license:bsd-3))) ;;; search.scm ends here -- cgit v1.2.3 From cc7a3055aaf5b7da46f5d730de10965e1043d8e4 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 24 Jun 2022 11:09:27 +0200 Subject: gnu: Add libcorrect. * gnu/packages/radio.scm (libcorrect): New variable. --- gnu/packages/radio.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index dfae252f0a..c25cdbc20c 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -132,6 +132,42 @@ useful in modems implemented with @dfn{digital signal processing} (DSP).") (license license:lgpl2.1)))) +(define-public libcorrect + (let ((commit "f5a28c74fba7a99736fe49d3a5243eca29517ae9") + (revision "1")) + (package + (name "libcorrect") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/quiet/libcorrect") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0qc9k8x51k2xfvp6cx8vdiyb3g6fl1y657z4m201aw2m06hs1hzg")))) + (build-system cmake-build-system) + (arguments + (list + #:test-target "check" + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'build-libfec-compatibility-layer + (lambda _ + (invoke "make" "shim"))) + (add-after 'install 'delete-static-libraries + (lambda _ + (delete-file (string-append #$output "/lib/libcorrect.a")) + (delete-file (string-append #$output "/lib/libfec.a"))))))) + (home-page "https://github.com/quiet/libcorrect") + (synopsis "Forward error correction library") + (description + "This library provides convolutional and Reed-Solomon codes for forward +error correction. It also includes a compatibility layer so that it can be +used as a drop-in substitute for @code{libfec}.") + (license license:bsd-3)))) + (define-public liquid-dsp (package (name "liquid-dsp") -- cgit v1.2.3 From 0c6960c17aac890e871ff41dae7c0cde1d741c9f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jun 2022 09:27:32 -0400 Subject: gnu: python-jedi: Fix build. * gnu/packages/python-xyz.scm (python-jedi) [phases]{fix-completion-test}: New phase. {check}: Delete trailing #t. --- gnu/packages/python-xyz.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a2178bf5d5..f8ca2242ed 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17038,12 +17038,19 @@ scans through a file and detects issues.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-completion-test + (lambda _ + ;; This resolves a failure in the 'test_completion' test (see: + ;; https://github.com/davidhalter/jedi/issues/1824). + ;; TODO: Remove after a new release is made (currently: 0.18.1). + (substitute* "test/completion/lambdas.py" + (("\\[a for a in \\[1,2\\] if lambda: 3\\]\\[0\\]") + "[a for a in [1,2] if (lambda: 3)][0]")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv "HOME" "/tmp") - (invoke "python" "-m" "pytest" "-vv")) - #t))))) + (invoke "python" "-m" "pytest" "-vv"))))))) (native-inputs (list python-colorama python-docopt python-pytest)) (propagated-inputs -- cgit v1.2.3 From 3ea8ba02747946f83f9693159eba8ac017d3698d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 24 Jun 2022 14:50:03 +0100 Subject: gnu: nar-herder: Update to 0-9.5acfcc0. * gnu/packages/package-management.scm (nar-herder): Update to 0-9.5acfcc0. --- gnu/packages/package-management.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 48df3c594b..5c78b5094a 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1650,8 +1650,8 @@ in an isolated environment, in separate namespaces.") (license license:gpl3+))) (define-public nar-herder - (let ((commit "042f49e5fb52ea844ed5d29c17b26fbc8ad49f0e") - (revision "8")) + (let ((commit "5acfcc0a9d99d78a167c365534aa5bf592f5625e") + (revision "9")) (package (name "nar-herder") (version (git-version "0" revision commit)) @@ -1662,7 +1662,7 @@ in an isolated environment, in separate namespaces.") (commit commit))) (sha256 (base32 - "1i9vwjdvkchwndjikqq3j73x0mvp3ny63s62ixql70yhpdgz5l69")) + "1mxdkay3l1la7b6m0455s8cansd6qcdhv0k231aik0ayhbck8kby")) (file-name (string-append name "-" version "-checkout")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From 0865b32deee162c95f05c82a42f795bd2841f325 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 24 Jun 2022 14:50:32 +0100 Subject: gnu: guix-build-coordinator Update to 0-54.07b0b61. * gnu/packages/package-management.scm (guix-build-coordinator): Update to 0-54.07b0b61. --- gnu/packages/package-management.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 5c78b5094a..103478442e 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -1342,8 +1342,8 @@ environments.") (license (list license:gpl3+ license:agpl3+ license:silofl1.1)))) (define-public guix-build-coordinator - (let ((commit "3de63f1f66d5f0eb157ee60bc864404f386ee2b0") - (revision "53")) + (let ((commit "07b0b61d21a5ad2637271869414fa47eea34a8d9") + (revision "54")) (package (name "guix-build-coordinator") (version (git-version "0" revision commit)) @@ -1354,7 +1354,7 @@ environments.") (commit commit))) (sha256 (base32 - "1ld761c48ad925p3kisnjvad50p6hyk77z0yjcr29681n73xzzz4")) + "09zxwlkxngs6hx3hfd1gzrf99c07jdr0lslcms2nn8x77bdfp9i0")) (file-name (string-append name "-" version "-checkout")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From 89db6e7ec77bf0f33474e47945755f5ab45e9f06 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jun 2022 09:57:15 -0400 Subject: gnu: ibus-anthy: Fix build. This is in follow up to 39b118776bbbaed049f8bcafa27bde30d9d0b2f6. * gnu/packages/ibus.scm (ibus-anthy) [phases]{wrap-programs}: Add missing 'inputs' keyword. --- gnu/packages/ibus.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 74e0e45110..234d4bd75f 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -329,7 +329,7 @@ Chinese pinyin input methods.") #:phases (modify-phases %standard-phases (add-after 'install 'wrap-programs - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key inputs outputs #:allow-other-keys) (for-each (lambda (prog) (wrap-program (search-input-file outputs (string-append "libexec/" prog)) -- cgit v1.2.3 From a43c3b1818db4860ec81bf867b1e53b418a0acec Mon Sep 17 00:00:00 2001 From: jgart Date: Tue, 29 Mar 2022 23:07:39 -0400 Subject: gnu: emacs-lpy: Update to 076ce9a. * gnu/packages/emacs-xyz.scm (emacs-lpy): Update to 076ce9a. Signed-off-by: Maxim Cournoyer --- gnu/packages/emacs-xyz.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index c60bb2b4c2..c6894361df 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -10100,8 +10100,9 @@ state and will work even without lispy being enabled.") (license license:gpl3+)))) (define-public emacs-lpy - (let ((commit "43b401fe15f0f0d01edb189378b9498121e9f766") - (revision "3")) + ;; There is no proper release/tag. + (let ((commit "076ce9acb68f6ac1b39127b634a91ffd865d13d8") + (revision "4")) (package (name "emacs-lpy") (version (git-version "0.1.0" revision commit)) @@ -10113,7 +10114,7 @@ state and will work even without lispy being enabled.") (commit commit))) (sha256 (base32 - "0xj1r7cn1rivaxhvawvmgx9fg3xilpfw4lkf2x2aqplr4s85ijas")) + "10sab50wmr3zn7jgzx93201ymhmacqacn3m2qllsqkfw2gpsi6dn")) (file-name (git-file-name name version)))) (propagated-inputs (list emacs-zoutline emacs-lispy)) -- cgit v1.2.3 From 3e7b6dd149456f91b1b12e6da6812fcce2612b18 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Sun, 11 Nov 2018 10:28:23 +0100 Subject: doc: Fix formatting of notes in multiple sections. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi (Instantiating the system): Add suggestion to keep config.scm under version control. (Printing Services, Messaging Services) (Telephony Services, Invoking guix system): Use "@quotation Note" for notes. Co-authored-by: Ludovic Courtès --- doc/guix.texi | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 650072937a..f3b026333e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15837,6 +15837,11 @@ file, the @command{guix system reconfigure my-system-config.scm} command instantiates that configuration, and makes it the default GRUB boot entry (@pxref{Invoking guix system}). +@quotation Note +We recommend that you keep this @file{my-system-config.scm} file safe +and under version control to easily track changes to your configuration. +@end quotation + The normal way to change the system configuration is by updating this file and re-running @command{guix system reconfigure}. One should never have to touch files in @file{/etc} or to run commands that modify the @@ -21112,9 +21117,11 @@ You can do that directly, like this (you need to use the (list cups-filters epson-inkjet-printer-escpr hplip-minimal)))) @end lisp -Note: If you wish to use the Qt5 based GUI which comes with the hplip +@quotation Note +If you wish to use the Qt5 based GUI which comes with the hplip package then it is suggested that you install the @code{hplip} package, either in your OS configuration file or as your user. +@end quotation The available configuration parameters follow. Each parameter definition is preceded by its type; for example, @samp{string-list foo} @@ -25595,13 +25602,15 @@ example if you want your users to have addresses like @samp{"john.smith@@example.com"} then you need to add a host @samp{"example.com"}. All options in this list will apply only to this host. -Note: the name @emph{virtual} host is used in configuration to avoid confusion with +@quotation Note +The name @emph{virtual} host is used in configuration to avoid confusion with the actual physical host that Prosody is installed on. A single Prosody instance can serve many domains, each one defined as a VirtualHost entry in Prosody's configuration. Conversely a server that hosts a single domain would have just one VirtualHost entry. See @url{https://prosody.im/doc/configure#virtual_host_settings}. +@end quotation Available @code{virtualhost-configuration} fields are: @@ -26202,8 +26211,10 @@ After setting this option, it is recommend that you inspect your Mumble server log to ensure that Mumble is using the cipher suites that you expected it to. -Note: Changing this option may impact the backwards compatibility of your +@quotation Note +Changing this option may impact the backwards compatibility of your Mumble-Server server, and can remove the ability for older Mumble clients to be able to connect to it. +@end quotation @item @code{public-registration} (default: @code{#f}) Must be a @code{} @@ -37578,6 +37589,10 @@ $ guix system extension-graph @var{file} | xdot - shows the extension relations among services. +@quotation Note +The @command{dot} program is provided by the @code{graphviz} package. +@end quotation + @anchor{system-shepherd-graph} @item shepherd-graph Emit to standard output the @dfn{dependency -- cgit v1.2.3 From fdf9aaec022ce6e6229dde79877950cdd3989736 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 24 Jun 2022 22:37:49 +0200 Subject: gnu: python-jedi: Fix tests. * gnu/packages/python-xyz.scm (python-jedi)[source]: Add 'modules' and 'snippet'. --- gnu/packages/python-xyz.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f8ca2242ed..5ca355b1a7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17033,7 +17033,14 @@ scans through a file and detects issues.") (file-name (git-file-name name version)) (sha256 (base32 - "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1")))) + "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1")) + (modules '((guix build utils))) + (snippet + ;; Adjust comprehension syntax for Python > 3.8. + ;; From . + '(substitute* "test/completion/lambdas.py" + (("if lambda: 3") + "if (lambda: 3)"))))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From 005763301f20cc4cb0a4537bdc9b5dbf679ff78f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 24 Jun 2022 22:48:19 +0200 Subject: gnu: guile-json: Update to 4.7.1. * gnu/packages/guile.scm (guile-json-4): Update to 4.7.1. --- gnu/packages/guile.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index a9e04cb476..d320763a61 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -665,14 +665,14 @@ specification. These are the main features: (package (inherit guile-json-3) (name "guile-json") - (version "4.5.2") + (version "4.7.1") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/guile-json/guile-json-" version ".tar.gz")) (sha256 (base32 - "0cqr0ljqmzlc2bwrapcsmcgxg147h66mcxf23824ri5i6vn4dc0s")))))) + "0hv8jjb6wdhvfrprwdi36125sci1ip4zfflv79hqlz7nh0irld65")))))) (define-public guile2.2-json (package-for-guile-2.2 guile-json-4)) -- cgit v1.2.3 From 4a72180585f63fb417cdf4b9e89fe7dea4e70e05 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Fri, 20 May 2022 13:18:39 +0200 Subject: gnu: Add azpainter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/graphics.scm (azpainter): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/graphics.scm | 66 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 0b66d9442f..c193be1efb 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -30,6 +30,7 @@ ;;; Copyright © 2022 Michael Rohleder ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2022 Tobias Kortkamp ;;; ;;; This file is part of GNU Guix. ;;; @@ -2054,3 +2055,68 @@ and build scripts for the OpenXR loader.") such as VR and AR on mobile, PC/desktop, and any other device. Monado aims to be a complete and conforming implementation of the OpenXR API made by Khronos.") (license license:boost1.0))) + +(define-public azpainter + (package + (name "azpainter") + (version "3.0.5") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/azelpg/azpainter") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1iplp3p8pw9q44kb43hrk89sv2aff6bdy9fk58j2v6k5lqbk6kvf")))) + (build-system gnu-build-system) ;actually a home grown build system + (arguments + (list #:tests? #f + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (invoke "./configure" + (string-append "--prefix=" + #$output)))) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (let ((job-count (if parallel-build? + (number->string (parallel-job-count)) + "1"))) + (invoke "ninja" "-j" job-count "-C" "build")))) + (add-before 'install 'disable-cache-generation + (lambda _ + (setenv "DESTDIR" "/") #t)) + (replace 'install + (lambda _ + (invoke "ninja" "-C" "build" "install")))))) + (inputs (list fontconfig + freetype + libjpeg-turbo + libpng + libtiff + libwebp + libx11 + libxcursor + libxext + libxi + zlib)) + (native-inputs (list ninja pkg-config)) + (home-page "http://azsky2.html.xdomain.jp/soft/azpainter.html") + (synopsis "Paint software for editing illustrations and images") + (description + "AzPainter is a lightweight full color painting application for editing +illustrations and images. + +Features include: +@itemize +@item Layers +@item Many artistic filters +@item Good range of selection tools +@item Pen pressure support with automatic brush size adjustment +@item Support for 16-bit color images with transparency (RGBA) +@item Support for image formats like PSD, PNG, JPEG, TIFF, WebP +@end itemize +") + (license license:gpl3+))) -- cgit v1.2.3 From 2d8c68c59046c292efb2b1699c66bac79ed5dc4c Mon Sep 17 00:00:00 2001 From: Ryan Prior Date: Fri, 20 May 2022 22:11:58 +0000 Subject: gnu: Add python-asyncgui. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-asyncgui): New symbol. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5ca355b1a7..386f8003e3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17502,6 +17502,23 @@ multitouch applications.") Design spec without sacrificing ease of use or application performance.") (license license:expat))) +(define-public python-asyncgui + (package + (name "python-asyncgui") + (version "0.5.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "asyncgui" version)) + (sha256 + (base32 + "0614130afg2qc1qq4p82piskvvx6lpjl4nlsakbjzdyd78xywnb7")))) + (build-system python-build-system) + (home-page "https://github.com/gottadiveintopython/asyncgui") + (synopsis "Enables async/await without an event loop") + (description "This package provides support for async/await applications +without requiring an event loop, useful for creative responsive GUIs.") + (license license:expat))) + (define-public python-binaryornot (package (name "python-binaryornot") -- cgit v1.2.3 From 43137d058fe575a70707073bede3465b4c5f555a Mon Sep 17 00:00:00 2001 From: Ryan Prior Date: Fri, 20 May 2022 22:12:17 +0000 Subject: gnu: Add python-asynckivy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-asynckivy): New symbol. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 386f8003e3..0bc951442f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17502,6 +17502,33 @@ multitouch applications.") Design spec without sacrificing ease of use or application performance.") (license license:expat))) +(define-public python-asynckivy + (package + (name "python-asynckivy") + (version "0.5.3") + (source + (origin + (method url-fetch) + (uri + (pypi-uri "asynckivy" version)) + (sha256 + (base32 "0ivjvch8yn3k1ybfp7c1nm8mhc0ymg7d04mq54lly7yjvg0jvcni")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-home + (lambda _ + ;; 'kivy/__init__.py' wants to create $HOME/.kivy. + (setenv "HOME" (getcwd))))))) + (propagated-inputs (list python-kivy python-asyncgui)) + (home-page "https://github.com/gottadiveintopython/asynckivy") + (synopsis "Async library for Kivy") + (description + "This package provides async versions of Kivy functions to avoid the +callback-heavy mode of interaction typical in some Kivy applications.") + (license license:expat))) + (define-public python-asyncgui (package (name "python-asyncgui") -- cgit v1.2.3 From fb7e6ccba7cc243cd96cdc3fde3daa9a5f08e531 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 18 Jun 2022 22:37:20 +0200 Subject: services: configuration: Report the location of field type errors. Previously field type errors would be reported in a non-standard way, and without any source location information. This fixes it. * gnu/services/configuration.scm (configuration-field-error): Add a 'loc' parameter and honor it. Use 'formatted-message' instead of plain 'format'. (define-configuration-helper)[field-sanitizer]: New procedure. Use it. Use STEM as the identifier of the syntactic constructor of the record type. Add a 'sanitize' property to each field. Remove now useless STEM macro that would call 'validate-configuration'. * gnu/services/mail.scm (serialize-listener-configuration): Adjust to new 'configuration-field-error' prototype. * tests/services/configuration.scm ("wrong type for a field"): New test. * po/guix/POTFILES.in: Add gnu/services/configuration.scm. --- gnu/services/configuration.scm | 55 +++++++++++++++++++++++++++++++--------- gnu/services/mail.scm | 2 +- po/guix/POTFILES.in | 1 + tests/services/configuration.scm | 13 ++++++++++ 4 files changed, 58 insertions(+), 13 deletions(-) diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index f6b20fb82b..c39ea5a02a 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -27,7 +27,8 @@ #:use-module (guix records) #:use-module (guix gexp) #:use-module ((guix utils) #:select (source-properties->location)) - #:use-module ((guix diagnostics) #:select (formatted-message location-file)) + #:use-module ((guix diagnostics) + #:select (formatted-message location-file &error-location)) #:use-module ((guix modules) #:select (file-name->module-name)) #:use-module (guix i18n) #:autoload (texinfo) (texi-fragment->stexi) @@ -87,9 +88,17 @@ (define (configuration-error message) (raise (condition (&message (message message)) (&configuration-error)))) -(define (configuration-field-error field val) - (configuration-error - (format #f "Invalid value for field ~a: ~s" field val))) +(define (configuration-field-error loc field value) + (raise (apply + make-compound-condition + (formatted-message (G_ "invalid value ~s for field '~a'") + value field) + (condition (&configuration-error)) + (if loc + (list (condition + (&error-location (location loc)))) + '())))) + (define (configuration-missing-field kind field) (configuration-error (format #f "~a configuration missing required field ~a" kind field))) @@ -210,9 +219,33 @@ does not have a default value" field kind))) (id #'stem #'serialize- type)))))) #'(field-type ...) #'((custom-serializer ...) ...)))) + (define (field-sanitizer name pred) + ;; Define a macro for use as a record field sanitizer, where NAME + ;; is the name of the field and PRED is the predicate that tells + ;; whether a value is valid for this field. + #`(define-syntax #,(id #'stem #'validate- #'stem #'- name) + (lambda (s) + ;; Make sure the given VALUE, for field NAME, passes PRED. + (syntax-case s () + ((_ value) + (with-syntax ((name #'#,name) + (pred #'#,pred) + (loc (datum->syntax #'value + (syntax-source #'value)))) + #'(if (pred value) + value + (configuration-field-error + (and=> 'loc source-properties->location) + 'name value)))))))) + #`(begin + ;; Define field validation macros. + #,@(map field-sanitizer + #'(field ...) + #'(field-predicate ...)) + (define-record-type* #,(id #'stem #'< #'stem #'>) - #,(id #'stem #'% #'stem) + stem #,(id #'stem #'make- #'stem) #,(id #'stem #'stem #'?) (%location #,(id #'stem #'stem #'-location) @@ -220,10 +253,13 @@ does not have a default value" field kind))) source-properties->location)) (innate)) #,@(map (lambda (name getter def) - #`(#,name #,getter (default #,def))) + #`(#,name #,getter (default #,def) + (sanitize + #,(id #'stem #'validate- #'stem #'- name)))) #'(field ...) #'(field-getter ...) #'(field-default ...))) + (define #,(id #'stem #'stem #'-fields) (list (configuration-field (name 'field) @@ -240,12 +276,7 @@ does not have a default value" field kind))) '#,(id #'stem #'% #'stem) 'field) field-default))) (documentation doc)) - ...)) - (define-syntax-rule (stem arg (... ...)) - (let ((conf (#,(id #'stem #'% #'stem) arg (... ...)))) - (validate-configuration conf - #,(id #'stem #'stem #'-fields)) - conf)))))))) + ...)))))))) (define no-serialization ;syntactic keyword for 'define-configuration' '(no serialization)) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index d99743ac31..c2fd4d8670 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -285,7 +285,7 @@ the section name.") (serialize-fifo-listener-configuration field-name val)) ((inet-listener-configuration? val) (serialize-inet-listener-configuration field-name val)) - (else (configuration-field-error field-name val)))) + (else (configuration-field-error #f field-name val)))) (define (listener-configuration-list? val) (and (list? val) (and-map listener-configuration? val))) (define (serialize-listener-configuration-list field-name val) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 201e5dcc87..f50dd00422 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -4,6 +4,7 @@ gnu.scm gnu/packages.scm gnu/services.scm gnu/system.scm +gnu/services/configuration.scm gnu/services/shepherd.scm gnu/home/services.scm gnu/home/services/ssh.scm diff --git a/tests/services/configuration.scm b/tests/services/configuration.scm index 334a1e409b..6268525317 100644 --- a/tests/services/configuration.scm +++ b/tests/services/configuration.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2022 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (tests services configuration) #:use-module (gnu services configuration) + #:use-module (guix diagnostics) #:use-module (guix gexp) #:use-module (srfi srfi-34) #:use-module (srfi srfi-64)) @@ -43,6 +45,17 @@ 80 (port-configuration-port (port-configuration))) +(test-equal "wrong type for a field" + '("configuration.scm" 57 11) ;error location + (guard (c ((configuration-error? c) + (let ((loc (error-location c))) + (list (basename (location-file loc)) + (location-line loc) + (location-column loc))))) + (port-configuration + ;; This is line 56; the test relies on line/column numbers! + (port "This is not a number!")))) + (define-configuration port-configuration-cs (port (number 80) "The port number." empty-serializer)) -- cgit v1.2.3 From 6505f727e1824391b888dd0c2c60cf64ec66955a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 18 Jun 2022 22:59:22 +0200 Subject: services: configuration: Remove 'validate-configuration'. Now that configuration records use the 'sanitize' property for each field, 'validate-configuration' has become useless because it's impossible to construct an invalid configuration record. * gnu/services/configuration.scm (validate-configuration): Remove. * gnu/services/mail.scm (dovecot-service): Remove call. * gnu/services/vpn.scm (openvpn-client-service) (openvpn-server-service): Likewise. * doc/guix.texi (Complex Configurations): Remove documentation. --- doc/guix.texi | 6 ------ gnu/services/configuration.scm | 9 --------- gnu/services/mail.scm | 4 ---- gnu/services/vpn.scm | 2 -- 4 files changed, 21 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f3b026333e..794907ce3a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38917,12 +38917,6 @@ Return a G-expression that contains the values corresponding to the disk by using something like @code{mixed-text-file}. @end deffn -@deffn {Scheme Procedure} validate-configuration @var{configuration} -@var{fields} -Type-check @var{fields}, a list of field names of @var{configuration}, a -configuration record created by @code{define-configuration}. -@end deffn - @deffn {Scheme Procedure} empty-serializer @var{field-name} @var{value} A serializer that just returns an empty string. The @code{serialize-package} procedure is an alias for this. diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index c39ea5a02a..e3c101d042 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -57,7 +57,6 @@ serialize-configuration define-maybe define-maybe/no-serialization - validate-configuration generate-documentation configuration->documentation empty-serializer @@ -125,14 +124,6 @@ does not have a default value" field kind))) ((configuration-field-getter field) config))) fields))) -(define (validate-configuration config fields) - (for-each (lambda (field) - (let ((val ((configuration-field-getter field) config))) - (unless ((configuration-field-predicate field) val) - (configuration-field-error - (configuration-field-name field) val)))) - fields)) - (define-syntax-rule (id ctx parts ...) "Assemble PARTS into a raw (unhygienic) identifier." (datum->syntax ctx (symbol-append (syntax->datum parts) ...))) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index c2fd4d8670..10e6523861 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1610,10 +1610,6 @@ POP3, IMAP, and LMTP. @var{config} should be a configuration object created by @code{dovecot-configuration}. @var{config} may also be created by @code{opaque-dovecot-configuration}, which allows specification of the @code{dovecot.conf} as a string." - (validate-configuration config - (if (opaque-dovecot-configuration? config) - opaque-dovecot-configuration-fields - dovecot-configuration-fields)) (service dovecot-service-type config)) ;; A little helper to make it easier to document all those fields. diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 6a289d357a..82ff05b351 100644