From a00543b4397c85eb1bc8142ed885aa3b50cf5ecb Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 8 Jan 2022 00:50:07 +0100 Subject: [PATCH] gnu: iw: Fix cross-compilation. * gnu/packages/linux.scm (iw)[arguments]: Rewrite as G-expression. Replace custom code with PKG-CONFIG-FOR-TARGET, and drop the unnecessary absolute file name altogether. --- gnu/packages/linux.scm | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9aa4805e9a..57f6e7489c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3081,18 +3081,14 @@ (define-public iw (native-inputs (list pkg-config)) (inputs (list libnl)) (arguments - `(#:make-flags - (let* ((target ,(%current-target-system)) - (pkg-config (if target - (string-append target "-pkg-config") - "pkg-config"))) - (list - ,(string-append "CC=" (cc-for-target)) - (string-append "PKG_CONFIG=" - (assoc-ref %build-inputs "pkg-config") - "/bin/" pkg-config) - (string-append "PREFIX=" (assoc-ref %outputs "out")))) - #:phases (modify-phases %standard-phases (delete 'configure)))) + (list #:make-flags + #~(list + (string-append "CC=" #$(cc-for-target)) + (string-append "PKG_CONFIG=" #$(pkg-config-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) ; no configure script (home-page "https://wireless.wiki.kernel.org/") (synopsis "Tool for configuring wireless devices") (description