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
This commit is contained in:
Vladimír Čunát 2016-03-19 11:47:55 +01:00
parent 88a62b3aea
commit b405e82edb

View File

@ -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 ];