diff mbox series

[bug#48126] Add package for vim-solarized

Message ID 20210430194235.1461cada@pine.local
State New
Headers show
Series [bug#48126] Add package for vim-solarized | expand

Checks

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

Commit Message

Tissevert April 30, 2021, 5:42 p.m. UTC
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

Comments

Tissevert April 30, 2021, 8:44 p.m. UTC | #1
Hello again,

I'm sorry I've just noticed that I set the wrong license in my package, I
hadn't checked it at the time when I first wrote it and forgot to edit it today
when I cleaned and sent it. Trouble is, I have no idea what the actual license is:

From Ethan Schoonover's original repository[1] it seems to be the MIT license but

- I can't find it in guix/license.scm, is that even an admissible free license ?
- The existing emacs-solarized-theme[2] package shipped with guix is distributed
  under a gpl3 license ?! (how is that possible ? can one redistribute software
  under a different license than its original one ? I assume it's because
  solarized-emacs is builds on solarized but adds something more ?) Then, I see
  that the main solarized repository imported an emacs theme[3] (a different one
  it seems) and put it under the MIT license as well…

Can we distribute vim-solarized ? If yes, under what license ? If not, do I
have to build a separate independant vim color theme for solarized and version
it under a free license like bbatsov did ?

[1]: https://github.com/altercation/solarized
[2]: https://github.com/bbatsov/solarized-emacs
[3]: https://github.com/altercation/solarized/tree/master/emacs-colors-solarized

Tissevert
Tobias Geerinckx-Rice April 30, 2021, 10:06 p.m. UTC | #2
Hullo greensleeves,

Don't worry; the package is free.

Tissevert 写道:
> From Ethan Schoonover's original repository[1] it seems to be 
> the MIT license but
>
> - I can't find it in guix/license.scm, is that even an 
> admissible free license ?

Yes.  It's available as ‘expat’.  See the third paragraph of [0].

> - The existing emacs-solarized-theme[2] package shipped with 
> guix is distributed
>   under a gpl3 license ?! (how is that possible ? can one 
>   redistribute software
>   under a different license than its original one ?

Yes, you can combine (say) MIT/Expat-licenced software with (say) 
GPL-3 software and redistribute the combination as (say) GPL-3. 
You can also add your own or others' GPL-3 code to existing Expat 
software.  The modified result is GPL-3.

In both cases, the original Expat software doesn't go away, but at 
least people can't use the GPL-3 portions to restrict others' 
freedom.

Kind regards,

T G-R

[0]: 
https://en.wikipedia.org/wiki/MIT_License#Minor_ambiguity_and_variants
diff mbox series

Patch

From 8c6f15a97910d2786968818fc8ecf82a73df24c3 Mon Sep 17 00:00:00 2001
From: Tissevert <tissevert+guix@marvid.fr>
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 <kuba@kadziolka.net>
 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2021 Tissevert <tissevert+guix@marvid.fr>
 ;;;
 ;;; 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