With the default kernel and thus with the build I have tested in
74ec94bfa2, we get an error during
modules_install:
make[2]: execvp: /nix/store/.../bin/bash: Argument list too long
I haven't noticed this build until I actually tried booting using this
kernel because make didn't fail here.
The reason this happens within Nix and probably didn't yet surface in
other distros is that programs only have a limited amount of memory
available for storing the environment and the arguments.
Environment variables however are quite common on Nix and thus we
stumble on problems like this way earlier - in this case Linux 4.8 - but
I have noticed this in 4.7-next as well already.
The fix is far from perfect and suffers performance overhead because we
now run grep for every *.mod file instead of passing all *.mod files
into one single invocation of grep.
But comparing the performance overhead (around 1s on my machine) with
the overall build time of the kernel I think the overhead really is
neglicible.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
The postPatch attribute is already in the function argument but is
unused elsewhere in the code, so setting postPatch with buildRebar3 is
going to end up in a no-op.
This now allows to use postPatch within buildRebar3 by simply appending
to the existing postPatch hook that removes the rebar and rebar3
escripts.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @ericbmerritt
For some reason `gem install` unsets the GEM_PATH environment variable
internally unless the install dir is provided. This in turn means that
if it invokes extconf.rb and extconf.rb depends on a gem available on
the GEM_PATH (like pkg-config for nokogiri) then it's not available in
that context.
Proof: d8293c4729/lib/rubygems/commands/install_command.rb (L151)
Blame: 9ea600c9c2
This is a hack that sets the :install_dir to where we would install
anyways (the GEM_HOME is the default installation destination).
Tested by only building the linux_testing attribute, but haven't yet
tested it in production.
I've also fixed the extraMeta.branch attribute.
Verified-with-PGP: ABAF 11C6 5A29 70B1 30AB E3C4 79BE 3E43 0041 1886
Signed-off-by: aszlig <aszlig@redmoonstudios.org>