3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

20 commits

Author SHA1 Message Date
Alyssa Ross ec8293fbfe
buildRubyGem: remove more bloat files 2020-01-09 15:54:57 +00:00
Alyssa Ross 11970ee1d6
buildRubyGem: strip by default
I'm not sure why this was disabled, but it looks like a pretty
harmless way to bring down closure size and remove references to
compilers and stuff.
2020-01-09 15:54:56 +00:00
Burke Libbey 62e680cdcf ruby-modules: parse build_flags correctly:
In building a gem whose native extension is a Rakefile, the previous
version of this code will call essentially `rake ""`, when it means to
call `rake`.

This change converts `""` into `[]` rather than `[""]`.
2019-12-17 00:58:32 +00:00
John Ericson 2811b032d6 treewide: Make still dont* Variables are optional in most cases
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
2019-11-01 14:44:44 -04:00
Michael Fellinger 1f49035aca ruby.withPackages: init
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2019-09-03 19:44:49 +00:00
Justin Humm eb9293e4d8
ruby-modules/gem: fix path to git checkout
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.
2019-04-03 16:59:53 +02:00
Judson Lester 704d02053b (ruby-modules/gem): (refactor) (#53525)
* Changing leaveDotGit to git chacha on build

* Removing debugging cruft

* Simpler git handling

* Can't clobber index after `add`

* Update pkgs/development/ruby-modules/gem/default.nix

Useful comments

Co-Authored-By: nyarly <nyarly@users.noreply.github.com>

* Update pkgs/development/ruby-modules/gem/default.nix

Comments are useful

Co-Authored-By: nyarly <nyarly@users.noreply.github.com>
2019-03-29 14:36:04 +01:00
Michael Fellinger 34e1fa4a50 buildRubyGem: Provide manpages for Ruby gems (#49334) 2018-10-29 01:48:05 +01:00
Aneesh Agrawal fced35fa44 buildRubyGem: Make testing easier
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.
2018-03-03 23:31:00 -08:00
Aneesh Agrawal 0750c5aee4 ruby-modules: Add new url source type
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.
2018-01-04 07:54:30 -08:00
Aneesh Agrawal 36f1bcbeb8 ruby treewide: don't merge source into top-level
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.
2018-01-04 02:28:33 -05:00
Judson 07f781bd8d
Current round of tests pass, but filter function is failing to include when platform match in use. 2017-05-10 10:00:21 -07:00
Judson 0145ec999c
Current round of tests pass, but filter function is failing to include when groups match in use. 2017-05-09 09:39:20 -07:00
zimbatm b8bcbec5fd ruby: fixes rubygems user installs
* 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
2016-10-02 22:07:22 +01:00
zimbatm 62df82efcf buildRubyGem: fixes gemspec UTF-8 loading issue
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.
2016-09-06 14:42:58 +01:00
zimbatm a7cf555e2a buildRubyGem: handle build-time ruby dependencies
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).
2016-08-29 22:17:59 +01:00
zimbatm a1460473cb buildRubyGem: don't set the GEM_HOME
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.
2016-08-23 09:30:49 +01:00
zimbatm 838781ce8a buildRubyGem: fix buildFlags default attribute
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.
2016-07-21 11:46:16 +01:00
zimbatm 28fa4a2f03 Escape all shell arguments uniformly 2016-06-12 18:11:37 +01:00
zimbatm 5a64bc44ea move all ruby modules to development/ruby-modules 2016-03-19 22:06:26 +00:00