diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-07-08 13:41:59 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-11-15 17:32:25 +0100 |
commit | 213e1764f4acf158cf470534c4c5fccfe0a92cb5 (patch) | |
tree | d0d135da786de324a3d0e571e433d7dff1b488f0 /gnu/packages | |
parent | a4c04bee7bc3faadf7ef6d98d83f57959f911fd1 (diff) | |
download | guix-213e1764f4acf158cf470534c4c5fccfe0a92cb5.tar.gz guix-213e1764f4acf158cf470534c4c5fccfe0a92cb5.zip |
gnu: eudev: Fix cross-compilation.
* gnu/packages/linux.scm (eudev)[arguments]: Look for xsltproc in both
native-inputs and inputs. Also, do not run udevadm when cross-compiling.
We need to find another way to generate hwdb.bin file for cross-built systems.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/linux.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index ccde9d172d..ed6df21ae0 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2620,7 +2620,7 @@ from the module-init-tools project.") (patches (search-patches "eudev-rules-directory.patch")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ @@ -2629,19 +2629,25 @@ from the module-init-tools project.") (for-each make-file-writable (find-files ".")) #t)) (add-before 'bootstrap 'patch-file-names - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) (substitute* "man/make.sh" (("/usr/bin/xsltproc") - (string-append (assoc-ref inputs "xsltproc") + (string-append (assoc-ref + (or native-inputs inputs) "xsltproc") "/bin/xsltproc"))) #t)) (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"))) - (invoke (string-append out "/bin/udevadm") - "hwdb" "--update"))))) + ,@(if (%current-target-system) + '(#t) + '((invoke (string-append out "/bin/udevadm") + "hwdb" "--update"))))))) #:configure-flags (list "--enable-manpages"))) (native-inputs `(("autoconf" ,autoconf) |