summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-03-19 11:47:55 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-03-20 13:33:20 +0100
commitb405e82edb4cb00a191839ad8208748189767f9d (patch)
treeef197a0d4ab9b4f7981799fba941fadc5f947457 /doc
parent88a62b3aeac7225a8b1cfd152793287b1142a7c1 (diff)
downloadnixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar.gz
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar.bz2
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar.lz
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar.xz
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.tar.zst
nixpkgs-b405e82edb4cb00a191839ad8208748189767f9d.zip
ruby docs: improve the example
- missing cd command
- invoke bundler through nix-shell, so it doesn't need to be on $PATH
  Note: running bundix through nix-shell won't work ATM, as the shell sets
  SSL_CERT_FILE=/no-cert-file.crt which prevents fetching throug https.
- use version from gemset to simplify updating
- don't break line in meta.description
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/ruby.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/languages-frameworks/ruby.xml b/doc/languages-frameworks/ruby.xml
index 6a0388d24c7..15c0802ad69 100644
--- a/doc/languages-frameworks/ruby.xml
+++ b/doc/languages-frameworks/ruby.xml
@@ -12,25 +12,26 @@
 <screen>
 <![CDATA[$ cd pkgs/servers/monitoring
 $ mkdir sensu
+$ cd sensu
 $ cat > Gemfile
 source 'https://rubygems.org'
 gem 'sensu'
-$ bundler package --path /tmp/vendor/bundle
+$ nix-shell -p bundler --command "bundler package --path /tmp/vendor/bundle"
 $ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix
 $ cat > default.nix
 { lib, bundlerEnv, ruby }:
 
-bundlerEnv {
-  name = "sensu-0.17.1";
+bundlerEnv rec {
+  name = "sensu-${version}";
 
+  version = (import gemset).sensu.version;
   inherit ruby;
   gemfile = ./Gemfile;
   lockfile = ./Gemfile.lock;
   gemset = ./gemset.nix;
 
   meta = with lib; {
-    description = "A monitoring framework that aims to be simple, malleable,
-and scalable";
+    description = "A monitoring framework that aims to be simple, malleable, and scalable";
     homepage    = http://sensuapp.org/;
     license     = with licenses; mit;
     maintainers = with maintainers; [ theuni ];