guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: On my way to my first patch, need review


From: vincent
Subject: Re: On my way to my first patch, need review
Date: Mon, 28 Mar 2016 01:37:59 +0100 (BST)




27. Mar 2016 16:29 by address@hidden:

On 2016-03-26 22:49, address@hidden 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]