Subject: [PATCH] Add package for vim-solarized

From: Tissevert <[email-masked]>
Date: Fri, 30 Apr 2021 19:42:35 +0200

Hi Guix !

I here's my first attempt at packaging something, I noticed that vim-solarized
was missing so I tried to write a package for it.

The only warning I got was from the guix lint which told me it couldn't find
upstream releases. I believe this is due to vim-solarized particular structure:
it's a light «clone» of the main repository
https://github.com/altercation/solarized containing only the vim-files. It
doesn't have any tags/releases but the full repository does. I used the latest
commit on the master branch in git-reference for guix to retrieve it and the
corresponding version on the full repository as package version. Does that seem
right ? I found another copy in project vim-scripts
(https://github.com/vim-scripts/Solarized) which has made a tag (the same
version name that I chose) so we could be using either the full repository
(more unneeded data retrieved during the build) or this second copy (they do
provide a tag but isn't it better to remain as close as possible to the
original source ?).

I hope my patch is correct and thank you everyone for being such a welcoming
community and having made my experience with Guix so far absolutely great !

Tissevert
From 8c6f15a97910d2786968818fc8ecf82a73df24c3 Mon Sep 17 00:00:00 2001
From: Tissevert <[email-masked]>
Date: Fri, 30 Apr 2021 19:04:35 +0200
Subject: [PATCH] Add package for vim-solarized

---
 gnu/packages/vim.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 47ac984fc7..477c15b9aa 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2019, 2020 Jakub Kądziołka <[email-masked]>
 ;;; Copyright © 2020 Jack Hill <[email-masked]>
 ;;; Copyright © 2021 Simon Tournier <[email-masked]>
+;;; Copyright © 2021 Tissevert <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -579,6 +580,30 @@ are detected, the user is notified.")
     (home-page "https://github.com/vim-syntastic/syntastic")
     (license license:wtfpl2)))
 
+(define-public vim-solarized
+  (package
+    (name "vim-solarized")
+    (version "v1.0.0beta1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/altercation/vim-colors-solarized")
+               (commit "528a59f26d12278698bb946f8fb82a63711eec21")))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "05d3lmd1shyagvr3jygqghxd3k8a4vp32723fvxdm57fdrlyzcm1"))))
+    (build-system copy-build-system)
+    (arguments
+     '(#:install-plan
+       '(("colors" "share/vim/vimfiles/")
+         ("doc" "share/vim/vimfiles/"))))
+    (home-page "https://github.com/altercation/vim-colors-solarized")
+    (synopsis "Solarized Colorscheme for Vim")
+    (description "Precision colors for machines and people")
+    (license license:bsd-3)))
+
 (define-public editorconfig-vim
   (package
     (name "editorconfig-vim")
-- 
2.31.1