Commit b2608b89 authored by Frederik Rietdijk's avatar Frederik Rietdijk
Browse files

Merge remote-tracking branch 'upstream/master' into HEAD

parents 55357de6 140f47eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@

###### Things done

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

- [ ] Tested using sandboxing
  ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,
+23 −2
Original line number Diff line number Diff line
@@ -41,7 +41,29 @@ bundlerEnv rec {
<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>

<para>Resulting derivations also have two helpful items, <literal>env</literal> and <literal>wrapper</literal>. The first one allows one to quickly drop into
<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:
</para>

<screen>
  <![CDATA[{ lib, bundlerApp }:

bundlerApp {
  pname = "corundum";
  gemdir = ./.;
  exes = [ "corundum-skel" ];

  meta = with lib; {
    description = "Tool and libraries for maintaining Ruby gems.";
    homepage    = https://github.com/nyarly/corundum;
    license     = licenses.mit;
    maintainers = [ maintainers.nyarly ];
    platforms   = platforms.unix;
  };
}]]>

<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.

<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
<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
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
<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 {
</programlisting>

</section>
+1 −0
Original line number Diff line number Diff line
@@ -407,6 +407,7 @@
  np = "Nicolas Pouillard <np.nix@nicolaspouillard.fr>";
  nslqqq = "Nikita Mikhailov <nslqqq@gmail.com>";
  nthorne = "Niklas Thörne <notrupertthorne@gmail.com>";
  nyarly = "Judson Lester <nyarly@gmail.com>";
  obadz = "obadz <obadz-nixos@obadz.com>";
  ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
  odi = "Oliver Dunkl <oliver.dunkl@gmail.com>";
+4 −0
Original line number Diff line number Diff line
@@ -543,6 +543,10 @@ rec {

      # Cavium ThunderX stuff.
      PCI_HOST_THUNDER_ECAM y

      # The default (=y) forces us to have the XHCI firmware available in initrd,
      # which our initrd builder can't currently do easily.
      USB_XHCI_TEGRA m
    '';
    uboot = null;
    kernelTarget = "Image";
+4 −1
Original line number Diff line number Diff line
@@ -15,9 +15,12 @@ let
    election-port=${toString cfg.zkElectionPort}
    cleanup-period-ms=${toString cfg.zkCleanupPeriod}
    servers-spec=${concatStringsSep "," cfg.zkServersSpec}
    auto-manage-instances=${lib.boolToString cfg.autoManageInstances}
    auto-manage-instances=${toString cfg.autoManageInstances}
    ${cfg.extraConf}
  '';
  # NB: toString rather than lib.boolToString on cfg.autoManageInstances is intended.
  # Exhibitor tests if it's an integer not equal to 0, so the empty string (toString false)
  # will operate in the same fashion as a 0.
  configDir = pkgs.writeTextDir "exhibitor.properties" exhibitorConfig;
  cliOptionsCommon = {
    configtype = cfg.configType;
Loading