diff options
author | Domen Kožar <domen@dev.si> | 2015-03-31 19:08:22 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2015-03-31 19:08:22 +0200 |
commit | 9bbf60c80ed320565c82645b5241e557f7d648d4 (patch) | |
tree | 6043179c5010ca201365540d87cc0900e9f57ba9 | |
parent | a87e2ae717667db69394634f580a948c86790a11 (diff) | |
parent | 86d82df72b9951f6e16b7700bf7f1c0422b99371 (diff) | |
download | nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar.gz nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar.bz2 nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar.lz nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar.xz nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.tar.zst nixlib-9bbf60c80ed320565c82645b5241e557f7d648d4.zip |
Merge pull request #7109 from ctheune/submit/update-ruby-doc
Update the ruby packaging docs to show how to bundle Ruby Gem-based
-rw-r--r-- | doc/language-support.xml | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/doc/language-support.xml b/doc/language-support.xml index 5fb123ddfc17..f2b64c93d22a 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -612,15 +612,45 @@ sed -i '/ = data_files/d' setup.py</programlisting> <section xml:id="ssec-language-ruby"><title>Ruby</title> - <para>For example, to package yajl-ruby package, use gem-nix:</para> + <para>There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert + this into a nix expression that contains all Gem dependencies automatically.</para> + + <para>For example, to package sensu, we did:</para> <screen> -$ nix-env -i gem-nix -$ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby -$ nix-build -A rubyPackages.yajl-ruby +<![CDATA[$ cd pkgs/servers/monitoring +$ mkdir sensu +$ cat > Gemfile +source 'https://rubygems.org' +gem 'sensu' +$ 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"; + + 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."; + homepage = http://sensuapp.org/; + license = with licenses; mit; + maintainers = with maintainers; [ theuni ]; + platforms = platforms.unix; + }; +}]]> </screen> -</section> +<para>Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily. +</para> + +</section> <section xml:id="ssec-language-go"><title>Go</title> |