diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2019-02-28 18:41:29 +0100 |
---|---|---|
committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2019-03-05 11:25:21 +0100 |
commit | df747c8d68dffd665e72cb0f8e8f05ea64d5d54c (patch) | |
tree | 69b0f31f4fe266eec4d97ba01b190f29d22e7e78 /gnu/packages/ruby.scm | |
parent | be6016db4bb7caafe7d375d7a3a9908f08ce101a (diff) | |
download | patches-df747c8d68dffd665e72cb0f8e8f05ea64d5d54c.tar patches-df747c8d68dffd665e72cb0f8e8f05ea64d5d54c.tar.gz |
gnu: Add mailcatcher.
* gnu/packages/ruby.scm (mailcatcher): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 0869a2a5c3..66eb2607e6 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -8488,3 +8488,56 @@ and stability, the Thin library.") (home-page "https://github.com/sj26/skinny") (license license:expat))) + +(define-public mailcatcher + (package + (name "mailcatcher") + (version "0.7.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "mailcatcher" version)) + (sha256 + (base32 + "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n")))) + (build-system ruby-build-system) + (arguments + ;; Tests require web/assets which is not included in the output. We + ;; might be able to fix this by adding the Git repository to the GEM_PATH + ;; of the tests. See ruby-mysql2. + '(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-gemspec + (lambda _ + (substitute* ".gemspec" + (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1") + "<eventmachine>, [\">= 1.0.9.1") + (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5") + (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0") + (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2")) + #t)) + (add-before 'build 'loosen-dependency-contraint + (lambda _ + (substitute* "lib/mail_catcher.rb" + (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"") + (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"") + (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"") + (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\"")) + #t))))) + (inputs + `(("ruby-eventmachine" ,ruby-eventmachine) + ("ruby-mail" ,ruby-mail) + ("ruby-rack" ,ruby-rack) + ("ruby-sinatra" ,ruby-sinatra) + ("ruby-skinny" ,ruby-skinny) + ("ruby-sqlite3" ,ruby-sqlite3) + ("ruby-thin" ,ruby-thin))) + (synopsis "SMTP server which catches messages to display them a browser") + (description + "MailCatcher runs a super simple SMTP server which catches any message +sent to it to display in a web interface. Run mailcatcher, set your favourite +app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, +then check out http://127.0.0.1:1080 to see the mail.") + (home-page "https://mailcatcher.me") + (license license:expat))) |