diff mbox series

[bug#54357,1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix.

Message ID 20220314215640.22822-1-paren@disroot.org
State Accepted
Headers show
Series [bug#54357,1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

\( March 14, 2022, 9:56 p.m. UTC
* gnu/packages/text-editors.scm(kakoune): Clean up package recipe, and add GUIX_KAKOUNE_DIRS search path.

Okay, I overengineered this... This patch set should definitely work. Promise.
---
 gnu/packages/text-editors.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..aff8bab9b0 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -17,6 +17,7 @@ 
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com>
+;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@  (define-module (gnu packages text-editors)
   #:use-module (guix utils)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python)
@@ -187,14 +189,17 @@  (define-public kakoune
              (substitute* "src/shell_manager.cc"
                (("if \\(m_shell.empty\\(\\)\\)" line)
                 (string-append "m_shell = \"" (which "sh")
-                               "\";\n        " line)))
-             #t))
+                               "\";\n        " line)))))
          (delete 'configure)            ; no configure script
          ;; kakoune requires us to be in the src/ directory to build.
          (add-before 'build 'chdir
-           (lambda _ (chdir "src") #t)))))
+           (lambda _ (chdir "src"))))))
     (native-inputs
      (list asciidoc pkg-config ruby))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "KAKOUNE_RUNTIME")
+            (files '("share/kak")))))
     (synopsis "Vim-inspired code editor")
     (description
      "Kakoune is a code editor heavily inspired by Vim, as such most of its