all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Felix Lechner via Guix-patches via <guix-patches@gnu.org>
To: 63508@debbugs.gnu.org
Cc: Felix Lechner <felix.lechner@lease-up.com>
Subject: [bug#63508] [PATCH 2/3] gnu: eudev: Convert build arguments to gexps.
Date: Sun, 14 May 2023 14:42:30 -0700	[thread overview]
Message-ID: <85af3647b4729638ce33464c835095edc6e208bd.1684100044.git.felix.lechner@lease-up.com> (raw)
In-Reply-To: <cover.1684100044.git.felix.lechner@lease-up.com>

* gnu/packages/linux.scm (eudev): Convert build arguments to gexps.
---
 gnu/packages/linux.scm | 68 ++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7ae34d1d4a..98e683bdb0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4153,42 +4153,38 @@ (define-public eudev
               (patches (search-patches "eudev-rules-directory.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'bootstrap 'patch-file-names
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-            (substitute* "man/make.sh"
-              (("/usr/bin/xsltproc")
-               (string-append (assoc-ref
-                               (or native-inputs inputs) "xsltproc")
-                               "/bin/xsltproc")))))
-         (add-after 'install 'move-static-library
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (static (assoc-ref outputs "static"))
-                    (source (string-append out "/lib/libudev.a"))
-                    (target (string-append static "/lib/libudev.a")))
-               (mkdir-p (dirname target))
-               (link source target)
-               (delete-file source)
-               ;; Remove reference to the static library from the .la file
-               ;; such that Libtool looks for it in the usual places.
-               (substitute* (string-append out "/lib/libudev.la")
-                 (("old_library=.*")
-                  "old_library=''\n")))))
-         (add-after 'install 'build-hwdb
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; Build OUT/etc/udev/hwdb.bin.  This allows 'lsusb' and
-             ;; similar tools to display product names.
-             ;;
-             ;; XXX: This can't be done when cross-compiling. Find another way
-             ;; to generate hwdb.bin for cross-built systems.
-             (let ((out (assoc-ref outputs "out")))
-               ,@(if (%current-target-system)
-                     '(#t)
-                     '((invoke (string-append out "/bin/udevadm")
-                               "hwdb" "--update")))))))
-       #:configure-flags (list "--enable-manpages")))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'bootstrap 'patch-file-names
+            (lambda* (#:key inputs native-inputs #:allow-other-keys)
+              (substitute* "man/make.sh"
+                (("/usr/bin/xsltproc")
+                 (search-input-file (or native-inputs inputs) "/bin/xsltproc")))))
+          (add-after 'install 'move-static-library
+            (lambda _
+              (let ((source (string-append #$output "/lib/libudev.a"))
+                    (target (string-append #$output:static "/lib/libudev.a")))
+                (mkdir-p (dirname target))
+                (link source target)
+                (delete-file source)
+                ;; Remove reference to the static library from the .la file
+                ;; such that Libtool looks for it in the usual places.
+                (substitute* (string-append #$output "/lib/libudev.la")
+                  (("old_library=.*")
+                   "old_library=''\n")))))
+          (add-after 'install 'build-hwdb
+            (lambda _
+              ;; Build OUT/etc/udev/hwdb.bin.  This allows 'lsusb' and
+              ;; similar tools to display product names.
+              ;;
+              ;; XXX: This can't be done when cross-compiling. Find another way
+              ;; to generate hwdb.bin for cross-built systems.
+              #$@(if (%current-target-system)
+                     #~(#t)
+                     #~((invoke (string-append #$output "/bin/udevadm")
+                                "hwdb" "--update"))))))
+       #:configure-flags #~(list "--enable-manpages")))
     (native-inputs
      (list autoconf
            automake
-- 
2.40.1





  parent reply	other threads:[~2023-05-14 21:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-14 21:41 [bug#63508] [PATCH 0/3] Use MAC-based names for network interfaces Felix Lechner via Guix-patches via
2023-05-14 21:42 ` [bug#63508] [PATCH 1/3] gnu: eudev: Convert native-inputs to new style Felix Lechner via Guix-patches via
2023-05-14 21:42 ` Felix Lechner via Guix-patches via [this message]
2023-05-14 21:42 ` [bug#63508] [PATCH 3/3] gnu: eudev: Always use MAC-based names for network interfaces Felix Lechner via Guix-patches via
2023-05-15  4:31   ` Liliana Marie Prikler
2023-05-15  4:56     ` Felix Lechner via Guix-patches via
2023-05-15 19:11 ` [bug#63508] [PATCH] gnu: udev: Allow EUDEV_RULES_DIRECTORY to shadow built-in rules Liliana Marie Prikler
2023-05-18  0:52 ` [bug#63508] [PATCH v2 1/4] gnu: eudev: Convert native-inputs to new style Felix Lechner via Guix-patches via
2023-05-18  0:52   ` [bug#63508] [PATCH v2 2/4] gnu: eudev: Convert build arguments to gexps Felix Lechner via Guix-patches via
2023-05-18  4:12     ` Liliana Marie Prikler
2023-05-18  0:52   ` [bug#63508] [PATCH v2 3/4] gnu: eudev: Use new project URL Felix Lechner via Guix-patches via
2023-05-18  0:52   ` [bug#63508] [PATCH v2 4/4] gnu: eudev: Have udevadm look in /etc/udev/rules.d. (Closes: #63508) Felix Lechner via Guix-patches via
2023-05-18  4:19     ` Liliana Marie Prikler
2023-05-28 23:23       ` Felix Lechner via Guix-patches via
2023-05-29  8:29         ` Liliana Marie Prikler
2023-05-28 23:28 ` [bug#63508] [PATCH v3 1/3] gnu: eudev: Convert native-inputs to new style, and build arguments to Gexps Felix Lechner via Guix-patches via
2023-05-28 23:28   ` [bug#63508] [PATCH v3 2/3] gnu: eudev: Use new project URL Felix Lechner via Guix-patches via
2023-05-29  7:49     ` Liliana Marie Prikler
2023-05-28 23:28   ` [bug#63508] [PATCH v3 3/3] gnu: eudev: Have udevadm look in /etc/udev/rules.d. (Closes: #63508) Felix Lechner via Guix-patches via
2023-05-29  7:38     ` Liliana Marie Prikler
2023-05-29  7:40   ` [bug#63508] [PATCH v3 1/3] gnu: eudev: Convert native-inputs to new style, and build arguments to Gexps Liliana Marie Prikler
2023-05-29 16:57 ` [bug#63508] [PATCH v4 1/2] gnu: eudev: Use new project URL for Git repo and home page Felix Lechner via Guix-patches via
2023-05-29 16:57   ` [bug#63508] [PATCH v4 2/2] gnu: eudev: Have udevadm look in /etc/udev/rules.d. (Closes: #63508) Felix Lechner via Guix-patches via
2023-05-29 20:28     ` Bruno Victal
2023-05-29 21:06       ` Felix Lechner 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=85af3647b4729638ce33464c835095edc6e208bd.1684100044.git.felix.lechner@lease-up.com \
    --to=guix-patches@gnu.org \
    --cc=63508@debbugs.gnu.org \
    --cc=felix.lechner@lease-up.com \
    /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.