all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: kiasoc5 via Guix-patches via <guix-patches@gnu.org>
To: 57198@debbugs.gnu.org
Cc: kiasoc5 <kiasoc5@disroot.org>
Subject: [bug#57198] [PATCH] gnu: usbguard: Use new package style.
Date: Sun, 14 Aug 2022 09:03:29 -0400	[thread overview]
Message-ID: <20220814130327.66270-1-kiasoc5@disroot.org> (raw)
In-Reply-To: <20220814043656.26839-1-kiasoc5@disroot.org>

Use G-exps and #$output while we're at it.

* gnu/packages/hardware.scm (usbguard)[arguments]: Use G-expressions.
<#:phases>: Use '#$output' instead of 'assoc-ref'
---
 gnu/packages/hardware.scm | 84 +++++++++++++++++++--------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index cfd667d757..8d06920b79 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1160,48 +1160,48 @@ (define-public usbguard
                (base32 "0lpyhkz5nr0c9mq57mgcvam5c8qfqqwjc4xd46n2ldqc9vhfsask"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-bootstrap-script
-           (lambda _
-             ;; Don't attempt to fetch git submodules.
-             (substitute* "autogen.sh"
-               (("^git submodule.*")
-                ""))))
-         (add-after 'bootstrap 'patch-build-scripts
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "configure"
-               (("/usr/include/catch")
-                (dirname (search-input-file inputs "include/catch.hpp"))))
-             ;; Do not create log directory.
-             (substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
-             ;; Disable LDAP tests: they use 'sudo'.
-             (substitute* "src/Tests/Makefile.in"
-               (("\\$\\(am__append_2\\)") ""))))
-         (add-after 'install 'delete-static-library
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; It can't be direclty disabled since it's needed for the tests.
-             (delete-file (string-append (assoc-ref outputs "out")
-                                         "/lib/libusbguard.a"))))
-         (add-after 'install 'install-zsh-completion
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (site-functions
-                     (string-append out "/share/zsh/site-functions")))
-               (mkdir-p site-functions)
-               (copy-file "scripts/usbguard-zsh-completion"
-                          (string-append site-functions "/_usbguard"))))))
-       #:make-flags
-       (list (string-append "BASH_COMPLETION_DIR="
-                            (assoc-ref %outputs "out")
-                            "/etc/bash_completion.d"))
-       #:configure-flags
-       (list
-        "--localstatedir=/var"
-        "--enable-systemd=no"
-        "--with-ldap"
-        "--with-dbus"
-        "--with-polkit")))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-bootstrap-script
+            (lambda _
+              ;; Don't attempt to fetch git submodules.
+              (substitute* "autogen.sh"
+                (("^git submodule.*")
+                 ""))))
+          (add-after 'bootstrap 'patch-build-scripts
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "configure"
+                (("/usr/include/catch")
+                 (dirname (search-input-file inputs "include/catch.hpp"))))
+              ;; Do not create log directory.
+              (substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
+              ;; Disable LDAP tests: they use 'sudo'.
+              (substitute* "src/Tests/Makefile.in"
+                (("\\$\\(am__append_2\\)") ""))))
+          (add-after 'install 'delete-static-library
+            (lambda args
+              ;; It can't be directly disabled since it's needed for the tests.
+              (delete-file (string-append #$output
+                                          "/lib/libusbguard.a"))))
+          (add-after 'install 'install-zsh-completion
+            (lambda args
+              (let ((site-functions
+                     (string-append #$output "/share/zsh/site-functions")))
+                (mkdir-p site-functions)
+                (copy-file "scripts/usbguard-zsh-completion"
+                           (string-append site-functions "/_usbguard"))))))
+      #:make-flags
+      #~(list (string-append "BASH_COMPLETION_DIR="
+                             #$output
+                             "/etc/bash_completion.d"))
+      #:configure-flags
+      #~(list
+         "--localstatedir=/var"
+         "--enable-systemd=no"
+         "--with-ldap"
+         "--with-dbus"
+         "--with-polkit")))
     (inputs
      (list audit
            catch-framework
-- 
2.37.2





  reply	other threads:[~2022-08-14 13:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14  4:36 [bug#57198] [PATCH] gnu: usbguard: Update to 1.1.1 [fixes CVE-2019-25058] kiasoc5 via Guix-patches via
2022-08-14 13:03 ` kiasoc5 via Guix-patches via [this message]
2022-08-14 13:48 ` bug#57198: " Tobias Geerinckx-Rice via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220814130327.66270-1-kiasoc5@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=57198@debbugs.gnu.org \
    --cc=kiasoc5@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.