makeRubyWriter
pkgs.writers.makeRubyWriter
Functor
Docs pulled from | This Revision | 44 minutes ago
makeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer, If any libraries are specified, ruby.withPackages is used as interpreter, otherwise the "bare" ruby is used.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
makeRubyWriter =
ruby: rubyPackages: buildRubyPackages: name:
{
libraries ? [ ],
...
}@args:
makeScriptWriter (
(builtins.removeAttrs args [ "libraries" ])
// {
interpreter =
if libraries == [ ] then "${ruby}/bin/ruby" else "${(ruby.withPackages (ps: libraries))}/bin/ruby";
# Rubocop doesn't seem to like running in this fashion.
#check = (writeDash "rubocop.sh" ''
# exec ${lib.getExe buildRubyPackages.rubocop} "$1"
#'');
}
) name;