* On my way to my first patch, need review
@ 2016-03-26 22:49 vincent
2016-03-27 20:29 ` rain1
2016-03-28 5:11 ` Ben Woodcroft
0 siblings, 2 replies; 9+ messages in thread
From: vincent @ 2016-03-26 22:49 UTC (permalink / raw)
To: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 2503 bytes --]
Even though I don't know if I am accepted for GSoC yet, I thought it would be
nice to start contributing now! :)
I started by adding the gem wayback_machine_downloader (a very useful piece
of software by the way).
So I used `guix edit ruby` and I copied it in the Documents folder. Then I
added somewhere in the middle of the file:
(define-public wayback-machine-downloader
(package
(name "wayback-machine-downloader")
(version "0.2.1")
(source
(origin
(method url-fetch)
(uri (rubygems-uri
"wayback_machine_downloader"
version))
(sha256
(base32
"1nrwm5bc7vqm02m2x0lylxyya446kg0spg6ksi7dfkrad0l9jq8y"))))
(build-system ruby-build-system)
(arguments
`(#:tests? #f ; no rakefile
))
(native-inputs
`(("ruby-rake-compiler" ,ruby-rake-compiler)
("ruby-minitest" ,ruby-minitest)))
(synopsis
"Download website from archive.org's Wayback Machine")
(description
"Download any website from the Wayback Machine. Wayback Machine by
Internet Archive (archive.org) is an awesome tool to view any website at any
point of time but lacks an export feature. Wayback Machine Downloader brings
exactly this.")
(home-page
"https://github.com/hartator/wayback-machine-downloader")
(license expat)))
Then I ran: `guix package -i wayback-machine-downloader -f ~/Documents/ruby`
and it successfully installed.
So my questions are:
1) Do you guys and gals have a better workflow that includes the git repo, so
I can send a patch? All I saw in the documentation was about building guix
itself. I guess I could clone somewhere and use `guix package -f`, but will
this be a reliable way of testing? And will this make my guix less stable on
the long run?
2) Should I add "ruby-" before the name of the package? I know technically
all gems should have "ruby-" before the name, but this is designed to be use
independently. Could it have multiple names, or is it a bad idea?
3) Where does this package belong in the directory?
4) Is the package declaration itself all right? Are packages sorted or
organized in any way?
5) I speak fluent French, can I add a description and summary in French?
Thanks!
Vincent
[-- Attachment #2: Type: text/html, Size: 3627 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: On my way to my first patch, need review
2016-03-26 22:49 On my way to my first patch, need review vincent
@ 2016-03-27 20:29 ` rain1
2016-03-28 0:37 ` vincent
2016-03-28 5:11 ` Ben Woodcroft
1 sibling, 1 reply; 9+ messages in thread
From: rain1 @ 2016-03-27 20:29 UTC (permalink / raw)
To: vincent; +Cc: guix-devel
On 2016-03-26 22:49, vincent@cloutier.co wrote:
> Even though I don't know if I am accepted for GSoC yet, I thought it
> would be nice to start contributing now! :)
>
> I started by adding the gem wayback_machine_downloader (a very useful
> piece of software by the way).
>
> So I used `guix edit ruby` and I copied it in the Documents folder.
> Then I added somewhere in the middle of the file:
>
> (define-public wayback-machine-downloader
> (package
> (name "wayback-machine-downloader")
> (version "0.2.1")
> (source
> (origin
> (method url-fetch)
> (uri (rubygems-uri
> "wayback_machine_downloader"
> version))
> (sha256
> (base32
> "1nrwm5bc7vqm02m2x0lylxyya446kg0spg6ksi7dfkrad0l9jq8y"))))
> (build-system ruby-build-system)
> (arguments
> `(#:tests? #f ; no rakefile
> ))
>
> (native-inputs
> `(("ruby-rake-compiler" ,ruby-rake-compiler)
> ("ruby-minitest" ,ruby-minitest)))
>
> (synopsis
> "Download website from archive.org's Wayback Machine")
> (description
> "Download any website from the Wayback Machine. Wayback Machine by
> Internet Archive (archive.org) is an awesome tool to view any website
> at any point of time but lacks an export feature. Wayback Machine
> Downloader brings exactly this.")
> (home-page
> "https://github.com/hartator/wayback-machine-downloader [1]")
> (license expat)))
>
> Then I ran: `guix package -i wayback-machine-downloader -f
> ~/Documents/ruby` and it successfully installed.
>
> So my questions are:
>
> 1) Do you guys and gals have a better workflow that includes the git
> repo, so I can send a patch? All I saw in the documentation was about
> building guix itself. I guess I could clone somewhere and use `guix
> package -f`, but will this be a reliable way of testing? And will this
> make my guix less stable on the long run?
>
> 2) Should I add "ruby-" before the name of the package? I know
> technically all gems should have "ruby-" before the name, but this is
> designed to be use independently. Could it have multiple names, or is
> it a bad idea?
>
> 3) Where does this package belong in the directory?
>
> 4) Is the package declaration itself all right? Are packages sorted or
> organized in any way?
>
> 5) I speak fluent French, can I add a description and summary in
> French?
>
> Thanks!
> Vincent
>
>
> Links:
> ------
> [1] https://github.com/hartator/wayback-machine-downloader
Hello!
I tested this out on guixsd, I changed (license expat) to (license
license:expat) and it built fine but when I tried to run it I got this
error:
~$ wayback_machine_downloader
/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:319:in
`to_specs': Could not find 'wayback_machine_downloader' (>= 0.a) among
11 total gem(s) (Gem::LoadError)
Checked in
'GEM_PATH=/home/rain/.gem/ruby/2.3.0:/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/gems/2.3.0',
execute `gem env` for more information
from
/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:328:in
`to_spec'
from
/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in
`gem'
from /home/rain/.guix-profile/bin/wayback_machine_downloader:22:in
`<main>'
I'm not sure what the fix would be.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: On my way to my first patch, need review
2016-03-27 20:29 ` rain1
@ 2016-03-28 0:37 ` vincent
2016-03-28 6:47 ` Ricardo Wurmus
0 siblings, 1 reply; 9+ messages in thread
From: vincent @ 2016-03-28 0:37 UTC (permalink / raw)
To: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 3833 bytes --]
27. Mar 2016 16:29 by rain1@openmailbox.org:
> On 2016-03-26 22:49, > vincent@cloutier.co> wrote:
>> Even though I don't know if I am accepted for GSoC yet, I thought it
>> would be nice to start contributing now! :)
>>
>> I started by adding the gem wayback_machine_downloader (a very useful
>> piece of software by the way).
>>
>> So I used `guix edit ruby` and I copied it in the Documents folder.
>> Then I added somewhere in the middle of the file:
>>
>> (define-public wayback-machine-downloader
>> (package
>> (name "wayback-machine-downloader")
>> (version "0.2.1")
>> (source
>> (origin
>> (method url-fetch)
>> (uri (rubygems-uri
>> "wayback_machine_downloader"
>> version))
>> (sha256
>> (base32
>> "1nrwm5bc7vqm02m2x0lylxyya446kg0spg6ksi7dfkrad0l9jq8y"))))
>> (build-system ruby-build-system)
>> (arguments
>> `(#:tests? #f ; no rakefile
>> ))
>>
>> (native-inputs
>> `(("ruby-rake-compiler" ,ruby-rake-compiler)
>> ("ruby-minitest" ,ruby-minitest)))
>>
>> (synopsis
>> "Download website from archive.org's Wayback Machine")
>> (description
>> "Download any website from the Wayback Machine. Wayback Machine by
>> Internet Archive (archive.org) is an awesome tool to view any website
>> at any point of time but lacks an export feature. Wayback Machine
>> Downloader brings exactly this.")
>> (home-page
>> ">> https://github.com/hartator/wayback-machine-downloader>> [1]")
>> (license expat)))
>>
>> Then I ran: `guix package -i wayback-machine-downloader -f
>> ~/Documents/ruby` and it successfully installed.
>>
>> So my questions are:
>>
>> 1) Do you guys and gals have a better workflow that includes the git
>> repo, so I can send a patch? All I saw in the documentation was about
>> building guix itself. I guess I could clone somewhere and use `guix
>> package -f`, but will this be a reliable way of testing? And will this
>> make my guix less stable on the long run?
>>
>> 2) Should I add "ruby-" before the name of the package? I know
>> technically all gems should have "ruby-" before the name, but this is
>> designed to be use independently. Could it have multiple names, or is
>> it a bad idea?
>>
>> 3) Where does this package belong in the directory?
>>
>> 4) Is the package declaration itself all right? Are packages sorted or
>> organized in any way?
>>
>> 5) I speak fluent French, can I add a description and summary in
>> French?
>>
>> Thanks!
>> Vincent
>>
>>
>> Links:
>> ------
>> [1] >> https://github.com/hartator/wayback-machine-downloader
>
> Hello!
>
> I tested this out on guixsd, I changed (license expat) to (license
> license:expat)
Going to fix it.
> and it built fine but when I tried to run it I got this error:
>
>
> ~$ wayback_machine_downloader
> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:319:in
> `to_specs': Could not find 'wayback_machine_downloader' (>= 0.a) among 11
> total gem(s) (Gem::LoadError)
> Checked in
> 'GEM_PATH=/home/rain/.gem/ruby/2.3.0:/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/gems/2.3.0',
> execute `gem env` for more information
> from
> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:328:in
> `to_spec'
> from
> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in
> `gem'
> from /home/rain/.guix-profile/bin/wayback_machine_downloader:22:in
> `<main>'
>
> I'm not sure what the fix would be.
It worked for me when I added `export
GEM_PATH="/home/vincent/.guix-profile/lib/ruby/gems/2.3.0"
` to my bashrc. I run Guix on top of Debian, so there might be subtle
difference with ruby gems on GuixSD.
[-- Attachment #2: Type: text/html, Size: 4879 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: On my way to my first patch, need review
2016-03-28 0:37 ` vincent
@ 2016-03-28 6:47 ` Ricardo Wurmus
0 siblings, 0 replies; 9+ messages in thread
From: Ricardo Wurmus @ 2016-03-28 6:47 UTC (permalink / raw)
To: vincent; +Cc: Guix Devel
vincent@cloutier.co writes:
>> and it built fine but when I tried to run it I got this error:
>>
>>
>> ~$ wayback_machine_downloader
>> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:319:in
>> `to_specs': Could not find 'wayback_machine_downloader' (>= 0.a) among 11
>> total gem(s) (Gem::LoadError)
>> Checked in
>> 'GEM_PATH=/home/rain/.gem/ruby/2.3.0:/gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/gems/2.3.0',
>> execute `gem env` for more information
>> from
>> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/dependency.rb:328:in
>> `to_spec'
>> from
>> /gnu/store/jaf2s3paa3fswfpzi6amlqjxd3fwiw9x-ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in
>> `gem'
>> from /home/rain/.guix-profile/bin/wayback_machine_downloader:22:in
>> `<main>'
>>
>> I'm not sure what the fix would be.
>
>
>
>
> It worked for me when I added `export
> GEM_PATH="/home/vincent/.guix-profile/lib/ruby/gems/2.3.0"
> ` to my bashrc. I run Guix on top of Debian, so there might be subtle
> difference with ruby gems on GuixSD.
In that case the executable should be wrapped with the appropriate
GEM_PATH. There are a couple of packages under “gnu/packages/” that
have a “wrap-programs” phase doing the same.
~~ Ricardo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: On my way to my first patch, need review
2016-03-26 22:49 On my way to my first patch, need review vincent
2016-03-27 20:29 ` rain1
@ 2016-03-28 5:11 ` Ben Woodcroft
2016-03-28 6:43 ` Chris Marusich
1 sibling, 1 reply; 9+ messages in thread
From: Ben Woodcroft @ 2016-03-28 5:11 UTC (permalink / raw)
To: vincent, Guix Devel
[-- Attachment #1: Type: text/plain, Size: 4526 bytes --]
Hi Vincent, thanks for the contribution.
On 26/03/16 15:49, vincent@cloutier.co wrote:
> [..]
First some comments on the patch. In general we try to keep line lengths
below 80 chars, and not leave blank lines within package definitions.
>
> (define-public wayback-machine-downloader
> (package
> (name "wayback-machine-downloader")
> (version "0.2.1")
> (source
> (origin
> (method url-fetch)
> (uri (rubygems-uri
> "wayback_machine_downloader"
> version))
Please put the above 3 lines on the same line.
> (sha256
> (base32
> "1nrwm5bc7vqm02m2x0lylxyya446kg0spg6ksi7dfkrad0l9jq8y"))))
> (build-system ruby-build-system)
> (arguments
> `(#:tests? #f ; no rakefile
> ))
Stylistically, we don't leave empty braces alone like this.
It seems there is a Rakefile with a test task defined in the github
repository, but not in the gem itself. So in this case I would point
guix to download the source from the github page not rubygems.org, as is
currently done for ruby-nokogumbo for example:
(define-public ruby-nokogumbo
(package
(name "ruby-nokogumbo")
(version "1.4.6")
(source (origin
;; We use the git reference, because there's no Rakefile
in the
;; published gem and the tarball on Github is outdated.
(method git-fetch)
(uri (git-reference
(url "https://github.com/rubys/nokogumbo.git")
(commit "d56f954d20a")))
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
"0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
>
> (native-inputs
> `(("ruby-rake-compiler" ,ruby-rake-compiler)
Is this really needed?
> ("ruby-minitest" ,ruby-minitest)))
>
> (synopsis
> "Download website from archive.org's Wayback Machine")
Maybe "Download a website ..." ? Also, please put on one line.
> (description
> "Download any website from the Wayback Machine. Wayback Machine
> by Internet Archive (archive.org) is an awesome tool to view any
> website at any point of time but lacks an export feature. Wayback
> Machine Downloader brings exactly this.")
I would remove "awesome" as being too opinionated. I think it would also
make sense to comment on the fact that it is a command line tool.
> (home-page
> "https://github.com/hartator/wayback-machine-downloader")
> (license expat)))
>
>
> Then I ran: `guix package -i wayback-machine-downloader -f
> ~/Documents/ruby` and it successfully installed.
>
> So my questions are:
>
> 1) Do you guys and gals have a better workflow that includes the git
> repo, so I can send a patch? All I saw in the documentation was about
> building guix itself. I guess I could clone somewhere and use `guix
> package -f`, but will this be a reliable way of testing? And will
> this make my guix less stable on the long run?
My personal workflow for this situation would be something like this:
$ git checkout -b wayback-machine-downloader origin/master
$ make -j4
... modify gnu/packages/ruby.scm adding the package definition ...
$ ./pre-inst-env guix build -K wayback-machine-downloader
... modify further as necessary until I am happy ...
... run through the checklist of things to do (e.g. list) when
submitting a package at
https://www.gnu.org/software/guix/manual/guix.html#Submitting-Patches
$ git diff #check that I'm committing the right code and only the one
package's code
$ git commit
... edit commit message ...
$ git format-patch -1
... send to guix-devel ...
hope that helps.
>
> 2) Should I add "ruby-" before the name of the package? I know
> technically all gems should have "ruby-" before the name, but this is
> designed to be use independently. Could it have multiple names, or is
> it a bad idea?
In this case I would say no, leave it as wayback-machine-downloader
since it is not intended to be used as a library, rather a command line
tool.
>
> 3) Where does this package belong in the directory?
My guess would be web.scm not ruby.scm.
>
> 4) Is the package declaration itself all right? Are packages sorted or
> organized in any way?
This depends on the file being modified, in ruby.scm we just add it to
the end of the file.
>
> 5) I speak fluent French, can I add a description and summary in French?
I'm not sure on this sorry.
Would you mind submitting an updated patch please?
Thanks,
ben
[-- Attachment #2: Type: text/html, Size: 7722 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: On my way to my first patch, need review
2016-03-28 5:11 ` Ben Woodcroft
@ 2016-03-28 6:43 ` Chris Marusich
2016-03-28 16:29 ` Translating package descriptions Ludovic Courtès
0 siblings, 1 reply; 9+ messages in thread
From: Chris Marusich @ 2016-03-28 6:43 UTC (permalink / raw)
To: Ben Woodcroft; +Cc: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
> 5) I speak fluent French, can I add a description and summary in
> French?
>
>
> I'm not sure on this sorry.
I think Guix uses GNU Gettext [1] to localize strings, including those
used in package descriptions, but I don't know very much about it.
Since Ludo has committed over 80% of the commits involving the guix/po
directory, he's probably the one who can answer your questions about how
to add a translation.
[1] https://www.gnu.org/software/gettext/manual/index.html
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Translating package descriptions
2016-03-28 6:43 ` Chris Marusich
@ 2016-03-28 16:29 ` Ludovic Courtès
2016-03-30 16:01 ` vincent
0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2016-03-28 16:29 UTC (permalink / raw)
To: Chris Marusich, vincent; +Cc: Guix Devel
Chris Marusich <cmmarusich@gmail.com> skribis:
> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>
>> 5) I speak fluent French, can I add a description and summary in
>> French?
>>
>>
>> I'm not sure on this sorry.
>
> I think Guix uses GNU Gettext [1] to localize strings, including those
> used in package descriptions, but I don't know very much about it.
> Since Ludo has committed over 80% of the commits involving the guix/po
> directory, he's probably the one who can answer your questions about how
> to add a translation.
Translations are handled by the Translation Project; all I do is to
commit the updates we receive. :-)
http://translationproject.org/domain/guix-packages.html
Vincent, if you’d like to help with the translation of package
descriptions and synopses, please see:
http://translationproject.org/html/translators.html
We need more people on this, so your help would be most welcome!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Translating package descriptions
2016-03-28 16:29 ` Translating package descriptions Ludovic Courtès
@ 2016-03-30 16:01 ` vincent
2016-03-30 21:30 ` Ludovic Courtès
0 siblings, 1 reply; 9+ messages in thread
From: vincent @ 2016-03-30 16:01 UTC (permalink / raw)
To: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
28. Mar 2016 12:29 by ludo@gnu.org:
> Chris Marusich <> cmmarusich@gmail.com> > skribis:
>
>> Ben Woodcroft <>> b.woodcroft@uq.edu.au>> > writes:
>>
>>> 5) I speak fluent French, can I add a description and summary in
>>> French?
>>>
>>>
>>> I'm not sure on this sorry.
>>
>> I think Guix uses GNU Gettext [1] to localize strings, including those
>> used in package descriptions, but I don't know very much about it.
>> Since Ludo has committed over 80% of the commits involving the guix/po
>> directory, he's probably the one who can answer your questions about how
>> to add a translation.
>
> Translations are handled by the Translation Project; all I do is to
> commit the updates we receive. :-)
>
> > http://translationproject.org/domain/guix-packages.html
>
> Vincent, if you’d like to help with the translation of package
> descriptions and synopses, please see:
>
> > http://translationproject.org/html/translators.html
>
> We need more people on this, so your help would be most welcome!
>
>
Do I have to go through translationproject.org or can I update the scheme
files directly and send you patches? I would only need a package that is
already translated to see how it works and start translating others.
Have a good day,
Vincent
[-- Attachment #2: Type: text/html, Size: 2028 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-03-30 21:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-26 22:49 On my way to my first patch, need review vincent
2016-03-27 20:29 ` rain1
2016-03-28 0:37 ` vincent
2016-03-28 6:47 ` Ricardo Wurmus
2016-03-28 5:11 ` Ben Woodcroft
2016-03-28 6:43 ` Chris Marusich
2016-03-28 16:29 ` Translating package descriptions Ludovic Courtès
2016-03-30 16:01 ` vincent
2016-03-30 21:30 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).