guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/06: gnu: nnn: Cross compile.


From: guix-commits
Subject: 06/06: gnu: nnn: Cross compile.
Date: Mon, 16 Nov 2020 04:16:58 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit cbd104bf6fe9c66db6173952f42db8efe48cf39f
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Nov 16 11:05:21 2020 +0200

    gnu: nnn: Cross compile.
    
    * gnu/packages/admin.scm (nnn)[arguments]: Use cc-for-target in
    make-flags. Add custom phase to use correct pkg-config for target.
---
 gnu/packages/admin.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index e5f990f..e622368 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3382,15 +3382,23 @@ information tool.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (arguments
-     '(#:tests? #f                      ; no tests
+     `(#:tests? #f                      ; no tests
        #:phases
        (modify-phases %standard-phases
-         (delete 'configure))           ; no configure script
+         (delete 'configure)            ; no configure script
+         (add-after 'unpack 'patch-pkg-config
+           (lambda _
+             (substitute* "Makefile"
+               (("pkg-config")
+                (or (which "pkg-config")
+                    (string-append ,(%current-target-system)
+                                   "-pkg-config"))))
+             #t)))
        #:make-flags
        (list
         (string-append "PREFIX="
                        (assoc-ref %outputs "out"))
-        "CC=gcc")))
+        (string-append "CC=" ,(cc-for-target)))))
     (home-page "https://github.com/jarun/nnn";)
     (synopsis "Terminal file browser")
     (description "@command{nnn} is a fork of @command{noice}, a blazing-fast



reply via email to

[Prev in Thread] Current Thread [Next in Thread]