diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2022-08-03 18:20:53 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2022-08-03 20:01:23 +0300 |
commit | d50f8b7ddc913a0d89af891846564777bdf1bc9c (patch) | |
tree | c4ca24d21be794be8de0a74c60942bd8dc99adc4 | |
parent | 85e2a79a3e86f6981c01372be31279451280c2fe (diff) |
gnu: nim: Install shell completions.
* gnu/packages/nim.scm (nim)[arguments]: Add custom 'install-completions
phase to install shell completion scripts.
-rw-r--r-- | gnu/packages/nim.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/nim.scm b/gnu/packages/nim.scm index 321f4d3e3e..cf6d19c518 100644 --- a/gnu/packages/nim.scm +++ b/gnu/packages/nim.scm @@ -77,7 +77,22 @@ (invoke "./install.sh" bin) (for-each (lambda (file) (install-file file bin)) - (delete "testament" (find-files "bin"))))))))) + (delete "testament" (find-files "bin")))))) + (add-after 'install 'install-completions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((share (string-append (assoc-ref outputs "out") "/share")) + (bash (string-append share "/bash-completion/completions")) + (zsh (string-append share "/zsh/vendor_completions"))) + (mkdir-p bash) + (mkdir-p zsh) + (copy-file "tools/nim.bash-completion" + (string-append bash "/nim")) + (copy-file "dist/nimble/nimble.bash-completion" + (string-append bash "/nimble")) + (copy-file "tools/nim.zsh-completion" + (string-append zsh "/_nim")) + (copy-file "dist/nimble/nimble.bash-completion" + (string-append zsh "/_nimble")))))))) (home-page "https://nim-lang.org") (synopsis "Statically-typed, imperative programming language") (description "Nim (formerly known as Nimrod) is a statically-typed, |