Skip to content

Commit b2608b8

Browse files
committedJul 29, 2017
Merge remote-tracking branch 'upstream/master' into HEAD
2 parents 55357de + 140f47e commit b2608b8

File tree

45 files changed

+1105
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1105
-303
lines changed
 

‎.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
###### Things done
55

6-
Please check what applies. Note that these are not hard requirements but mereley serve as information for reviewers.
6+
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.
77

88
- [ ] Tested using sandboxing
99
([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,

‎doc/languages-frameworks/ruby.xml

+23-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,29 @@ bundlerEnv rec {
4141
<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.
4242
</para>
4343

44-
<para>Resulting derivations also have two helpful items, <literal>env</literal> and <literal>wrapper</literal>. The first one allows one to quickly drop into
44+
<para>For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
45+
</para>
46+
47+
<screen>
48+
<![CDATA[{ lib, bundlerApp }:
49+
50+
bundlerApp {
51+
pname = "corundum";
52+
gemdir = ./.;
53+
exes = [ "corundum-skel" ];
54+
55+
meta = with lib; {
56+
description = "Tool and libraries for maintaining Ruby gems.";
57+
homepage = https://github.com/nyarly/corundum;
58+
license = licenses.mit;
59+
maintainers = [ maintainers.nyarly ];
60+
platforms = platforms.unix;
61+
};
62+
}]]>
63+
64+
<para>The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
65+
66+
<para>Resulting derivations for both builders also have two helpful attributes, <literal>env</literal> and <literal>wrapper</literal>. The first one allows one to quickly drop into
4567
<command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset
4668
so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have
4769
<filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies.
@@ -74,4 +96,3 @@ in stdenv.mkDerivation {
7496
</programlisting>
7597

7698
</section>
77-

0 commit comments

Comments
 (0)
Please sign in to comment.