all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* [bug#48126] [PATCH] Add package for vim-solarized
@ 2021-04-30 17:42 Tissevert
  2021-04-30 20:44 ` Tissevert
  2021-04-30 23:20 ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 6+ messages in thread
From: Tissevert @ 2021-04-30 17:42 UTC (permalink / raw)
  To: 48126

[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-package-for-vim-solarized.patch --]
[-- Type: text/x-patch, Size: 1912 bytes --]

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48126] [PATCH] Add package for vim-solarized
  2021-04-30 17:42 [bug#48126] [PATCH] Add package for vim-solarized Tissevert
@ 2021-04-30 20:44 ` Tissevert
  2021-04-30 22:06   ` Tobias Geerinckx-Rice via Guix-patches via
  2021-04-30 23:20 ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 1 reply; 6+ messages in thread
From: Tissevert @ 2021-04-30 20:44 UTC (permalink / raw)
  To: 48126

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48126] [PATCH] Add package for vim-solarized
  2021-04-30 20:44 ` Tissevert
@ 2021-04-30 22:06   ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-04-30 22:06 UTC (permalink / raw)
  To: Tissevert; +Cc: 48126

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48126] [PATCH] Add package for vim-solarized
  2021-04-30 17:42 [bug#48126] [PATCH] Add package for vim-solarized Tissevert
  2021-04-30 20:44 ` Tissevert
@ 2021-04-30 23:20 ` Tobias Geerinckx-Rice via Guix-patches via
  2021-04-30 23:27   ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-04-30 23:20 UTC (permalink / raw)
  To: Tissevert; +Cc: 48126

[-- Attachment #1: Type: text/plain, Size: 4582 bytes --]

Tissevert 写道:
> 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.

Thank you!

>
> 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.

Hmm.  Could we install from this authoritative(?) source instead, 
even if the download's bigger?

> (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 ?).

Oh, I think we agree.  :-)

/tmp λ git clone --depth=1 
https://github.com/vim-scripts/Solarized
Cloning into 'Solarized' [...]
/tmp λ git clone --depth=1 
https://github.com/altercation/solarized
Cloning into 'solarized' [...]
/tmp λ du -hs [Ss]olarized
196K	Solarized
30M	solarized

The relative difference is huge but I think 30M is worth it.

Could you make this change, test, and send a V2?  I'm no adherent 
of the Vim.

> 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 !

Thank you!  We try to do our best...

Your patch is great.  I'd make the following tweaks before 
committing.  You can incorporate them into your V2 if you want.

The description should explain what the package is to someone 
who's never heard of it.  We actually recommend ~10 lines (more is 
fine), although many existing packages don't meet that bar.  The 
synopsis should do the same in one line.

Don't be afraid to temper fawning upstream marketing-speak and 
empty taglines like this one.  That doesn't mean it can't be 
positive (like mine -- I hate Solarized).

C-M-q reindented the source field according to the same rules as 
etc/indent-code.el.  Better to do so before committing it, so 
future committers can just run C-M-q on the entire expression 
without creating unrelated whitespace noise.

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 477c15b9aa..ad95724c41 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -585,24 +585,33 @@ are detected, the user is notified.")
     (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"))))
+     (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)))
+    (synopsis "Solarized color scheme for Vim")
+    (description
+     "Solarized is a sixteen-color palette of eight monotones and 
eight accent
+colors.  It was designed for use with both terminal and GUI 
applications.
+
+Black text on white from a computer display is akin to reading a 
book in direct
+sunlight and can tire the eye.  Solarized reduces brightness 
contrast but,
+unlike many low-contrast color schemes, retains contrasting hues 
based on
+color wheel relations for syntax highlighting readability.
+
+Solarized retains the same selective contrast relationships and 
overall feel
+when switching between the light and dark background modes.")
+    (license license:expat)))

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48126] [PATCH] Add package for vim-solarized
  2021-04-30 23:20 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-04-30 23:27   ` Tobias Geerinckx-Rice via Guix-patches via
  2021-05-04 20:56     ` Tissevert
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-04-30 23:27 UTC (permalink / raw)
  To: Tissevert; +Cc: 48126


[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]

Well that diff got börked to hell.  Here it is again.

Kind regards,

T G-R


[-- Attachment #1.2: d --]
[-- Type: application/octet-stream, Size: 2114 bytes --]

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 477c15b9aa..ad95724c41 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -585,24 +585,33 @@ are detected, the user is notified.")
     (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"))))
+     (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)))
+    (synopsis "Solarized color scheme for Vim")
+    (description
+     "Solarized is a sixteen-color palette of eight monotones and eight accent
+colors.  It was designed for use with both terminal and GUI applications.
+
+Black text on white from a computer display is akin to reading a book in direct
+sunlight and can tire the eye.  Solarized reduces brightness contrast but,
+unlike many low-contrast color schemes, retains contrasting hues based on
+color wheel relations for syntax highlighting readability.
+
+Solarized retains the same selective contrast relationships and overall feel
+when switching between the light and dark background modes.")
+    (license license:expat)))
 
 (define-public editorconfig-vim
   (package

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48126] [PATCH] Add package for vim-solarized
  2021-04-30 23:27   ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-05-04 20:56     ` Tissevert
  0 siblings, 0 replies; 6+ messages in thread
From: Tissevert @ 2021-05-04 20:56 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 48126

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

Hello !

Thanks a lot for all your feedback.

It took me a little while but I think I've improved my first patch proposal. I
had tried to indent the code automatically like mentioned in the video tutorial
using etc/indent-code.el but obviously this had failed. Maybe I overwrote the
changes with vim ? Anyway, I tried doing it again but there are many other
badly indented blocks in the rest of the file so it is hard to do and retain
only what is in my new package. So I've done it twice during the process, but
it could still be a little weird.

I changed the source to use the main «heavy» repos, and since it has a release
tag but the actual commit corresponding to this tag is a little behind the
current state (I checked the diff, it has changes to the vim files, not just
the documentation) so I used the latest commit as target to be sure the most
recent changes were included in the package even though I still call it by the
name of the most recent tag.

So here goes.

Kind regards,

Tissevert


Le Sat, May 01, 2021 at 01:27:19AM +0200, Tobias Geerinckx-Rice a écrit :
> Well that diff got börked to hell.  Here it is again.
> 
> Kind regards,
> 
> T G-R
> 





[-- Attachment #2: 0001-Update-version-indentation-and-description.patch --]
[-- Type: text/plain, Size: 2870 bytes --]

From e310e94869cfa274d0699ab97c60835dab6fa5eb Mon Sep 17 00:00:00 2001
From: Tissevert <tissevert+guix@marvid.fr>
Date: Tue, 4 May 2021 22:43:25 +0200
Subject: [PATCH] Update version, indentation and description

---
 gnu/packages/vim.scm | 53 ++++++++++++++++++++++++++------------------
 1 file changed, 32 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 477c15b9aa..6fb79851b8 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -581,28 +581,39 @@ are detected, the user is notified.")
     (license license:wtfpl2)))
 
 (define-public vim-solarized
-  (package
-    (name "vim-solarized")
-    (version "v1.0.0beta1")
-    (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
+  (let ((commit "62f656a02f93c5190a8753159e34b385588d5ff3")
+        (revision "1"))
+    (package
+      (name "vim-solarized")
+      (version (git-version "v1.0.0beta1" revision commit))
+      (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)))
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan
+         '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
+           ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
+      (home-page "https://github.com/altercation/vim-colors-solarized")
+      (synopsis "Solarized color scheme for Vim")
+      (description
+	   "Solarized is a 16-color palette comprising 8 monotones and 8 accent
+colors.  It was designed for use with both terminal and GUI applicatins, and
+has a dark and a light mode.
+
+Based on CIELAB lightness relationships between colors, this theme reduces
+brightness contrast but retains contrasting hues based on colorwheel relations
+for syntax highlighting readability.
+
+It retains the same selective contrast relationships and overall feel when
+switching between the light and dark background modes.")
+      (license license:expat))))
 
 (define-public editorconfig-vim
   (package
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-04 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 17:42 [bug#48126] [PATCH] Add package for vim-solarized Tissevert
2021-04-30 20:44 ` Tissevert
2021-04-30 22:06   ` Tobias Geerinckx-Rice via Guix-patches via
2021-04-30 23:20 ` Tobias Geerinckx-Rice via Guix-patches via
2021-04-30 23:27   ` Tobias Geerinckx-Rice via Guix-patches via
2021-05-04 20:56     ` Tissevert

all messages for Guix-related lists mirrored at yhetil.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix

Example config snippet for mirrors.


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git