From 7f2b9306eea163391dda6e4cf395a0e2be1be984 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 18 Jul 2021 14:14:27 +0200 Subject: gnu: mg: Fix reference to native diffutils. * gnu/packages/text-editors.scm (mg)[inputs]: Add diffutils. [arguments]: Refer to it in the 'correct-location-of-diff phase. --- gnu/packages/text-editors.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gnu/packages/text-editors.scm') diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 11332fab0b..2f42d831c0 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -47,6 +47,7 @@ #:use-module (gnu packages aspell) #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages code) #:use-module (gnu packages crates-io) @@ -524,7 +525,8 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("libbsd" ,libbsd) + `(("diffutils" ,diffutils) + ("libbsd" ,libbsd) ("ncurses" ,ncurses))) (arguments ;; No test suite available. @@ -533,11 +535,12 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on (string-append "CC=" ,(cc-for-target))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script - (add-before 'build 'correct-location-of-difftool - (lambda _ + (add-before 'build 'correct-location-of-diff + (lambda* (#:key inputs #:allow-other-keys) (substitute* "buffer.c" (("/usr/bin/diff") - (which "diff"))))) + (string-append (assoc-ref inputs "diffutils") + "/bin/diff"))))) (add-before 'build 'pkg-config-for-cross-compiling-target (lambda _ (substitute* "GNUmakefile" -- cgit v1.2.3 From 5d2e3b6b23584113b1ccf17130689a3a3562bb6c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 18 Jul 2021 14:16:45 +0200 Subject: gnu: mg: Set PKG_CONFIG instead of substituting. * gnu/packages/text-editors.scm (mg)[arguments]: Add PKG_CONFIG to #:make-flags, and remove the custom 'pkg-config-for-cross-compiling-target phase. --- gnu/packages/text-editors.scm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gnu/packages/text-editors.scm') diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 2f42d831c0..5a2c7bc20d 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -532,7 +532,8 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on ;; No test suite available. `(#:tests? #f #:make-flags (list (string-append "prefix=" %output) - (string-append "CC=" ,(cc-for-target))) + (string-append "CC=" ,(cc-for-target)) + (string-append "PKG_CONFIG=" ,(pkg-config-for-target))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-before 'build 'correct-location-of-diff @@ -541,13 +542,6 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on (("/usr/bin/diff") (string-append (assoc-ref inputs "diffutils") "/bin/diff"))))) - (add-before 'build 'pkg-config-for-cross-compiling-target - (lambda _ - (substitute* "GNUmakefile" - (("pkg-config") - (or (which "pkg-config") - (string-append ,(%current-target-system) - "-pkg-config")))))) (add-before 'install 'patch-tutorial-location (lambda* (#:key outputs #:allow-other-keys) (substitute* "mg.1" -- cgit v1.2.3