diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-05 23:30:41 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-28 22:22:40 -0400 |
commit | ac633a7acb449d75bce12560f4c3586a400eeb33 (patch) | |
tree | 1c223739109e63ac9ae5ca9032a6c793f72d06a9 /gnu/packages/ruby.scm | |
parent | f372d3f2e2b300d39a3c0c6e7aa967938e7852be (diff) | |
download | guix-ac633a7acb449d75bce12560f4c3586a400eeb33.tar.gz |
gnu: Add ruby-dotenv-rails.
* gnu/packages/ruby.scm (ruby-dotenv-rails): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index ab384a6a72..6093273bc8 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -10460,6 +10460,42 @@ defined in a @file{.env} file.") (home-page "https://github.com/bkeepers/dotenv") (license license:expat))) +(define-public ruby-dotenv-rails + (package + (inherit ruby-dotenv) + (name "ruby-dotenv-rails") + (arguments + (substitute-keyword-arguments (package-arguments ruby-dotenv) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'do-not-build-dotenv-rails) + (add-after 'unpack 'delete-Gemfile + (lambda _ + ;; It defines extraneous dependencies; remove it. + (delete-file "Gemfile"))) + (add-after 'unpack 'remove-extraneous-gemspec + (lambda _ + (delete-file "dotenv.gemspec") + (substitute* "Gemfile" + ((".*\"dotenv\".*") "")) + (substitute* "Rakefile" + ;; Remove the dotenv-related Rake tasks. + (("Bundler::GemHelper.install_tasks name: \"dotenv\"") + "") + (("\"dotenv:[^\"]*\", ") + "")))) + (replace 'replace-git-ls-files + (lambda _ + (substitute* "dotenv-rails.gemspec" + (("`git ls-files lib \\| grep rails`") + "`find lib -type f | sort | grep rails`")))))))) + (native-inputs (list ruby-rspec ruby-spring ruby-standard)) + (propagated-inputs (list ruby-dotenv ruby-railties)) + (synopsis "Ruby library for setting environment variables in Rails project") + (description "Dotenv is a Ruby library for setting environment variables +defined in a @file{.env} file. This is the Rails variant, adapted for use +with Ruby on Rails projects."))) + (define-public ruby-http-cookie (package (name "ruby-http-cookie") |