From 4d66de88fffada1f4970e5173be78c1ef30a8798 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sat, 29 Jul 2017 18:39:32 +0200 Subject: nixpkgs-manual: fix build, reindent cc #25980 --- doc/languages-frameworks/ruby.xml | 54 +++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/doc/languages-frameworks/ruby.xml b/doc/languages-frameworks/ruby.xml index eb1696ad224..4b48f7ffa1b 100644 --- a/doc/languages-frameworks/ruby.xml +++ b/doc/languages-frameworks/ruby.xml @@ -4,10 +4,14 @@ Ruby - There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a Gemfile, let bundler create a Gemfile.lock, and then convert - this into a nix expression that contains all Gem dependencies automatically. +There currently is support to bundle applications that are packaged as +Ruby gems. The utility "bundix" allows you to write a +Gemfile, let bundler create a +Gemfile.lock, and then convert this into a nix +expression that contains all Gem dependencies automatically. + - For example, to package sensu, we did: +For example, to package sensu, we did: -Please check in the Gemfile, Gemfile.lock and the gemset.nix so future updates can be run easily. +Please check in the Gemfile, +Gemfile.lock and the +gemset.nix so future updates can be run easily. -For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. rake at the command line, there is an alternative builder called bundlerApp. Set up the gemset.nix the same way, and then, for example: +For tools written in Ruby - i.e. where the desire is to install +a package and then execute e.g. rake at the command +line, there is an alternative builder called bundlerApp. +Set up the gemset.nix the same way, and then, for +example: - + -The chief advantage of bundlerApp over bundlerEnv is the executables introduced in the environment are precisely those selected in the exes list, as opposed to bundlerEnv which adds all the executables made available by gems in the gemset, which can mean e.g. rspec or rake in unpredictable versions available from various packages. +The chief advantage of bundlerApp over +bundlerEnv is the executables introduced in the +environment are precisely those selected in the exes +list, as opposed to bundlerEnv which adds all the +executables made available by gems in the gemset, which can mean e.g. +rspec or rake in unpredictable +versions available from various packages. + -Resulting derivations for both builders also have two helpful attributes, env and wrapper. The first one allows one to quickly drop into -nix-shell with the specified environment present. E.g. nix-shell -A sensu.env would give you an environment with Ruby preset -so it has all the libraries necessary for sensu in its paths. The second one can be used to make derivations from custom Ruby scripts which have -Gemfiles with their dependencies specified. It is a derivation with ruby wrapped so it can find all the needed dependencies. -For example, to make a derivation my-script for a my-script.rb (which should be placed in bin) you should -run bundix as specified above and then use bundlerEnv like this: +Resulting derivations for both builders also have two helpful +attributes, env and wrapper. +The first one allows one to quickly drop into +nix-shell with the specified environment present. +E.g. nix-shell -A sensu.env would give you an +environment with Ruby preset so it has all the libraries necessary +for sensu in its paths. The second one can be +used to make derivations from custom Ruby scripts which have +Gemfiles with their dependencies specified. It is +a derivation with ruby wrapped so it can find all +the needed dependencies. For example, to make a derivation +my-script for a my-script.rb +(which should be placed in bin) you should run +bundix as specified above and then use +bundlerEnv like this: +