Go beyond the obvious setup hooks now, with a bit of sed, with a skipped case:
- cc-wrapper's `dontlink`, because it already is handled.
Also, in nix files escaping was manually added.
EMP
In case of the gem type 'git', nix-bundle-install.rb was called with
wrong path to the git checkout.
${src} does contain the sources, but not the newly generated .git dir,
which is created in the buildPhase of pkgs/development/ruby-modules/gem/default.nix
In some rare cases, this .git dir is needed at installPhase.
Don't default `doCheck` to false,
and use the default set of phases
so the phases list does not need to be overriden
in order to add checkPhase or installCheckPhase.
This just defers to `fetchurl` for fetching.
Additionally, update the `nix-bundle-install.rb` script to handle gems
installed from a path, i.e. those with a `url` source.
Some parts of that script have been disabled in the `path` case
that likely shouldn't be, but cause errors and aren't necessary to get
`vagrant` to work.
Keep the `source` attrset distinct to prevent its entries from merging
with the top level attrs.
Since each type of source has a different set of entries for `source`,
this is the easiest way to keep them together.
This will pave the way for a new `url` type of source.
This is a mass-rebuild of many ruby packages,
notably those using `git` type sources.
* Manage patches in git
* Fixes the hook invocation to be more safe. Thanks @Mic92
* Install gems as user by default
* Install gem binaries with the /usr/bin/env shebang
* Fixes a bug where the passthru.libPath and passthru.gemPath would
point to the wrong directory
* Overhaul ruby version heuristics
If a gemspec has UTF-8 characters in it, ruby will fail loading it with
invalid multibyte char (US-ASCII)
This change forces the encoding to be correct, we assume everyone now
uses UTF-8.
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).
bundler for example needs to have the GEM_HOME being passed trough to
function properly.
For gems that are loading content dynamically, or can use plugins, use
buildRubyGem.
For executables that are wrapped in their own sealed thing use
bundlerEnv.
lib.escapeShellArgs doesn't work well when a null value is provided.
[] is also the correct value since it's really just an empty list of
arguments that we have.