diff mbox series

[bug#63508,v2,2/4] gnu: eudev: Convert build arguments to gexps.

Message ID b0a81891c6d68a0fb0cd0c6fdebb3f522f8a2379.1684370595.git.felix.lechner@lease-up.com
State New
Headers show
Series [bug#63508,v2,1/4] gnu: eudev: Convert native-inputs to new style. | expand

Commit Message

Felix Lechner May 18, 2023, 12:52 a.m. UTC
* gnu/packages/linux.scm (eudev): Convert build arguments to gexps.
---
 gnu/packages/linux.scm | 68 ++++++++++++++++++++----------------------
 1 file changed, 32 insertions(+), 36 deletions(-)

Comments

Liliana Marie Prikler May 18, 2023, 4:12 a.m. UTC | #1
Am Mittwoch, dem 17.05.2023 um 17:52 -0700 schrieb Felix Lechner:
> * gnu/packages/linux.scm (eudev): Convert build arguments to gexps.
> ---
Since both this and 1/4 are style changes, they should be squashed into
a single commit named "gnu: eudev: Use new package style".

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1f1b319dbf..9058648700 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