[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54357] [PATCH 1/4] gnu: kakoune: Clean up, and add a search path th
From: |
(unmatched-parenthesis |
Subject: |
[bug#54357] [PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. |
Date: |
Sun, 13 Mar 2022 22:16:01 +0000 |
* gnu/packages/text-editors.scm(kakoune): Clean up package recipe, and add
GUIX_KAKOUNE_DIRS search path.
Argh! That for loop makes kak source the default kakrc twice! This rebased
patch series fixes that.
(I also added copy-build-system to use-modules so that we can install kak
plugins properly, which was missing
from my patch. I didn't notice it while I was doing `git add -p` :))
---
gnu/packages/text-editors.scm | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..96e070807d 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,32 @@ (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")))
+ (add-before 'install 'patch-kakrc
+ (lambda _
+ (chdir "..")
+ ;; here, we modify the default kakrc to source all the
$pkg/share/kak/autoload/*.kak
+ ;; files automatically.
+ (substitute* "share/kak/kakrc"
+ (("if \\[ -d \"\\$\\{kak_config}/autoload\" \\]; then .* fi")
+ "\
+for dir in $(echo ${GUIX_KAKOUNE_CONFIG_DIRS} | sed 's/:/\\/autoload /g'); do
+ if [ -d ${dir} ]; then
+ autoload_directory ${dir}
+ fi
+done")))))))
(native-inputs
(list asciidoc pkg-config ruby))
+ (native-search-paths
+ (list (search-path-specification
+ ;; kakoune only supports one config dir, so we use this instead,
so that we can
+ ;; modify the default kakrc to source all the autoloads.
+ (variable "GUIX_KAKOUNE_CONFIG_DIRS")
+ (files '("share/kak/")))))
(synopsis "Vim-inspired code editor")
(description
"Kakoune is a code editor heavily inspired by Vim, as such most of its
--
2.34.0
- [bug#54357] [PATCH] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. (Plugins incoming soon.), (unmatched-parenthesis, 2022/03/12
- [bug#54357] [PATCH] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. (Plugins incoming soon.), paren, 2022/03/12
- [bug#54357] [PATCH] gnu: Add kak-auto-pairs, (unmatched-parenthesis, 2022/03/12
- [bug#54357] [PATCH] gnu: Add kak-sudo-write, (unmatched-parenthesis, 2022/03/12
- [bug#54357] [PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix.,
(unmatched-parenthesis <=
- [bug#54357] [PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix., (unmatched-parenthesis, 2022/03/14