[PATCH] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix. (Plugins incoming soon.)

  • Done
  • quality assurance status badge
Details
2 participants
  • Calum Irwin
  • (unmatched-parenthesis
Owner
unassigned
Submitted by
(unmatched-parenthesis
Severity
normal
(
(
(unmatched-parenthesis wrote on 12 Mar 2022 22:09
(address . guix-patches@gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220312210940.15397-1-paren@disroot.org
* gnu/packages/text-editors.scm(kakoune): Remove the redundant `#t`s, and add a $GUIX_KAKOUNE_CONFIG_DIRS search path.

While trying to package a kak plugin, I realized that the kak package itself was missing a
search path. However, kak appears to allow only one config path, so I inject a for loop into
the default kakrc (with a hacky substitute* because i cannot be bothered preparing a path :)
which enumerates the paths in $GUIX_KAKOUNE_CONFIG_DIRS and sources all their kakfiles.

I'll send in a few plugins in a moment. These will act as both examples of the search path
working and of course useful packages in themselves.

I also took the opportunity to clean the package up a little, removing the now unneccesary
`#t`s returned at the end of each phase. I was going to change it to use git instead of
github release tarballs too (I'm told that git clones are better because of Software Heritage),
but I'm hesitant to make that change without checking first.
---
gnu/packages/text-editors.scm | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 45cc61765a..6d562d0e4a 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.
;;;
@@ -187,14 +188,33 @@ (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"
+ (("echo \"colorscheme default\"" colorscheme-default)
+ (string-append colorscheme-default "
+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
P
(address . 54357@debbugs.gnu.org)
8eb1e52e40e5021281cf3e34ac777f81@disroot.org
March 12, 2022 9:10 PM, "(unmatched-parenthesis" <paren@disroot.org> wrote:
Toggle quote (3 lines)
> I'll send in a few plugins in a moment. These will act as both examples of the search path
> working and of course useful packages in themselves.

Noting the existence of #54358, which is a separate thread because it also adds the related vim
plugin.
(
(
(unmatched-parenthesis wrote on 12 Mar 2022 23:40
[PATCH] gnu: Add kak-auto-pairs
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220312224054.24491-1-paren@disroot.org
* gnu/packages/text-editors.scm (kak-auto-pairs): New variable.
---
gnu/packages/text-editors.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index bbfbcdd226..d1fa1bd28a 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -269,6 +269,30 @@ (define-public kak-lsp
Rust.")
(license license:unlicense)))
+(define-public kak-auto-pairs
+ (let ((commit "d78164b7936d45438ad5e382d2c16f05494ca74a")
+ (revision "0"))
+ (package
+ (name "kak-auto-pairs")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexherbo2/auto-pairs.kak")
+ (commit commit)))
+ (sha256
+ (base32 "1qar4r91km5389j9byrpjimy5r083pnfpzkigvxllklj6z0xyc0d"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("rc" "share/kak/autoload"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/alexherbo2/auto-pairs.kak")
+ (synopsis "An auto-pair plugin for Kakoune")
+ (description "This package provides automatic pair completion for the Kakoune text editor.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 13 Mar 2022 00:20
[PATCH] gnu: Add kak-sudo-write
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220312232057.16605-1-paren@disroot.org
* gnu/packages/text-editors.scm (kak-sudo-write): New variable.
---
gnu/packages/text-editors.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index d1fa1bd28a..a436df48ce 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -293,6 +293,31 @@ (define-public kak-auto-pairs
(description "This package provides automatic pair completion for the Kakoune text editor.")
(license license:unlicense))))
+(define-public kak-sudo-write
+ (let ((commit "ec0d6d26ceaadd93d6824630ba587b31e442214d")
+ (revision "0"))
+ (package
+ (name "kak-sudo-write")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/occivink/kakoune-sudo-write")
+ (commit commit)))
+ (sha256
+ (base32 "1c1wajm3c2aa0lda36y2yj2fvf4fbdqjl5ishh9p8qkjxbrb1v1v"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("sudo-write.kak" "share/kak/autoload/sudo-write.kak"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/occivink/kakoune-sudo-write")
+ (synopsis "Kakoune plugin to save files that you do not have write permissions for.")
+ (description "This package provides a Kakoune plugin that uses sudo to allow saving files that you
+do not have permission to write.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 13 Mar 2022 23:16
[PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix.
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220313221604.7686-1-paren@disroot.org
* 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(-)

Toggle diff (58 lines)
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
(
(
(unmatched-parenthesis wrote on 13 Mar 2022 23:16
[PATCH 2/4] gnu: rust-parinfer: add phases to install the bundled Vim and Kakoune plugins
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220313221604.7686-2-paren@disroot.org
* gnu/packages/text-editors.scm (rust-parinfer)[arguments]: Install the bundled Vim and Kak plugins to the
correct directories.
---
gnu/packages/text-editors.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 96e070807d..229e9f9112 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -292,7 +292,18 @@ (define-public parinfer-rust
("rust-serde-json" ,rust-serde-json-1)
("rust-serde-derive" ,rust-serde-derive-1)
("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
- ("rust-unicode-width" ,rust-unicode-width-0.1))))
+ ("rust-unicode-width" ,rust-unicode-width-0.1))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-vim-plugin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "doc" (string-append out "/share/vim/vimfiles/doc"))
+ (copy-recursively "plugin" (string-append out "/share/vim/vimfiles/plugin")))))
+ (add-after 'install-vim-plugin 'install-kak-plugin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "rc" (string-append out "/share/kak/autoload"))))))))
(inputs
(list clang))
(home-page "https://github.com/justinbarclay/parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 13 Mar 2022 23:16
[PATCH 3/4] gnu: Add kak-auto-pairs
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220313221604.7686-3-paren@disroot.org
* gnu/packages/text-editors.scm (kak-auto-pairs): New variable.
---
gnu/packages/text-editors.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 229e9f9112..1da94e1066 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -269,6 +269,30 @@ (define-public kak-lsp
Rust.")
(license license:unlicense)))
+(define-public kak-auto-pairs
+ (let ((commit "d78164b7936d45438ad5e382d2c16f05494ca74a")
+ (revision "0"))
+ (package
+ (name "kak-auto-pairs")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexherbo2/auto-pairs.kak")
+ (commit commit)))
+ (sha256
+ (base32 "1qar4r91km5389j9byrpjimy5r083pnfpzkigvxllklj6z0xyc0d"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("rc" "share/kak/autoload"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/alexherbo2/auto-pairs.kak")
+ (synopsis "An auto-pair plugin for Kakoune")
+ (description "This package provides automatic pair completion for the Kakoune text editor.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 13 Mar 2022 23:16
[PATCH 4/4] gnu: Add kak-sudo-write
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220313221604.7686-4-paren@disroot.org
* gnu/packages/text-editors.scm (kak-sudo-write): New variable.
---
gnu/packages/text-editors.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 1da94e1066..5eed162ab5 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -293,6 +293,31 @@ (define-public kak-auto-pairs
(description "This package provides automatic pair completion for the Kakoune text editor.")
(license license:unlicense))))
+(define-public kak-sudo-write
+ (let ((commit "ec0d6d26ceaadd93d6824630ba587b31e442214d")
+ (revision "0"))
+ (package
+ (name "kak-sudo-write")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/occivink/kakoune-sudo-write")
+ (commit commit)))
+ (sha256
+ (base32 "1c1wajm3c2aa0lda36y2yj2fvf4fbdqjl5ishh9p8qkjxbrb1v1v"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("sudo-write.kak" "share/kak/autoload/sudo-write.kak"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/occivink/kakoune-sudo-write")
+ (synopsis "Kakoune plugin to save files that you do not have write permissions for.")
+ (description "This package provides a Kakoune plugin that uses sudo to allow saving files that you
+do not have permission to write.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 14 Mar 2022 22:56
[PATCH 1/4] gnu: kakoune: Clean up, and add a search path that makes it possible to package kak plugins in guix.
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220314215640.22822-1-paren@disroot.org
* 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(-)

Toggle diff (43 lines)
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
--
2.34.0
(
(
(unmatched-parenthesis wrote on 14 Mar 2022 22:56
[PATCH 2/4] gnu: rust-parinfer: add phases to install the bundled Vim and Kakoune plugins
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220314215640.22822-2-paren@disroot.org
* gnu/packages/text-editors.scm (rust-parinfer)[arguments]: Install the bundled Vim and Kak plugins to the
correct directories.
---
gnu/packages/text-editors.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index aff8bab9b0..1d2f5c7062 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -277,7 +277,18 @@ (define-public parinfer-rust
("rust-serde-json" ,rust-serde-json-1)
("rust-serde-derive" ,rust-serde-derive-1)
("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
- ("rust-unicode-width" ,rust-unicode-width-0.1))))
+ ("rust-unicode-width" ,rust-unicode-width-0.1))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-vim-plugin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "doc" (string-append out "/share/vim/vimfiles/doc"))
+ (copy-recursively "plugin" (string-append out "/share/vim/vimfiles/plugin")))))
+ (add-after 'install-vim-plugin 'install-kak-plugin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (copy-recursively "rc" (string-append out "/share/kak/autoload"))))))))
(inputs
(list clang))
(home-page "https://github.com/justinbarclay/parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 14 Mar 2022 22:56
[PATCH 3/4] gnu: Add kak-auto-pairs
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220314215640.22822-3-paren@disroot.org
* gnu/packages/text-editors.scm (kak-auto-pairs): New variable.
---
gnu/packages/text-editors.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 1d2f5c7062..08cd1a16d9 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -254,6 +254,30 @@ (define-public kak-lsp
Rust.")
(license license:unlicense)))
+(define-public kak-auto-pairs
+ (let ((commit "d78164b7936d45438ad5e382d2c16f05494ca74a")
+ (revision "0"))
+ (package
+ (name "kak-auto-pairs")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alexherbo2/auto-pairs.kak")
+ (commit commit)))
+ (sha256
+ (base32 "1qar4r91km5389j9byrpjimy5r083pnfpzkigvxllklj6z0xyc0d"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("rc" "share/kak/autoload"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/alexherbo2/auto-pairs.kak")
+ (synopsis "An auto-pair plugin for Kakoune")
+ (description "This package provides automatic pair completion for the Kakoune text editor.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
(
(
(unmatched-parenthesis wrote on 14 Mar 2022 22:56
[PATCH 4/4] gnu: Add kak-sudo-write
(address . 54357@debbugs.gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220314215640.22822-4-paren@disroot.org
* gnu/packages/text-editors.scm (kak-sudo-write): New variable.
---
gnu/packages/text-editors.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 08cd1a16d9..4b06b8c9bd 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -278,6 +278,31 @@ (define-public kak-auto-pairs
(description "This package provides automatic pair completion for the Kakoune text editor.")
(license license:unlicense))))
+(define-public kak-sudo-write
+ (let ((commit "ec0d6d26ceaadd93d6824630ba587b31e442214d")
+ (revision "0"))
+ (package
+ (name "kak-sudo-write")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/occivink/kakoune-sudo-write")
+ (commit commit)))
+ (sha256
+ (base32 "1c1wajm3c2aa0lda36y2yj2fvf4fbdqjl5ishh9p8qkjxbrb1v1v"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan
+ '(("sudo-write.kak" "share/kak/autoload/sudo-write.kak"))))
+ (propagated-inputs (list kakoune))
+ (home-page "https://github.com/occivink/kakoune-sudo-write")
+ (synopsis "Kakoune plugin to save files that you do not have write permissions for.")
+ (description "This package provides a Kakoune plugin that uses sudo to allow saving files that you
+do not have permission to write.")
+ (license license:unlicense))))
+
(define-public parinfer-rust
(package
(name "parinfer-rust")
--
2.34.0
C
C
Calum Irwin wrote on 4 Jun 2022 10:23
(address . 54357@debbugs.gnu.org)
CAH+jhzFFP9MYLzBC7m4SrBXYfZBFnJhnnf4hdm-gTYbDh4xN5Q@mail.gmail.com
I don't think you need

(propagated-inputs (list kakoune))

in each of these do you? and it's atypical of plugin packages to
require the thing they plug into.
(
(address . control@debbugs.gnu.org)
CN64KY8AH670.1T5PNRP7QDZBX@guix-aspire
close 54357
close 56908
thanks

-- (
?