Commit graph

360 commits

Author SHA1 Message Date
Robin Gloster fed49425c5 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-03-03 16:11:55 +00:00
Robin Gloster 5936d6dbbb Revert "rubygems: 2.4.8 -> 2.5.2"
This reverts commit 7e8faf022f.

This breaks the rake call in gitlab see
https://github.com/NixOS/nixpkgs/pull/13468#issuecomment-191286066
2016-03-02 15:25:35 +00:00
Robin Gloster d47857c3d9 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-03-01 21:09:17 +00:00
Robin Gloster 3477e662e6 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-02-27 00:08:08 +00:00
zimbatm 7e8faf022f rubygems: 2.4.8 -> 2.5.2
Closes #11950
2016-02-26 18:02:24 +00:00
zimbatm cdbaee7d4b Merge pull request #12866 from nathan7/rubygem-drvname-fix
buildRubyGem: ensure gem versions don't get misparsed
2016-02-23 23:13:12 +00:00
zimbatm 49217b724f Merge pull request #12786 from phunehehe/unused-bundler-head
remove unused file bundler-head.nix
2016-02-23 22:39:55 +00:00
Robin Gloster bb2639aafc Merge branch 'curl-7.15-fixup' of https://github.com/zimbatm/nixpkgs into hardened-stdenv 2016-02-22 01:14:22 +00:00
Charles Strahan 123a9104e4 Merge pull request #13109 from zimbatm/ruby-fixes
Ruby fixes
2016-02-20 20:29:25 -05:00
Robin Gloster bc21db3692 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-02-19 21:16:14 +00:00
zimbatm a92c609ec6 gemconfig: add eventmachine and msgpack 2016-02-18 23:44:50 +00:00
zimbatm 24e0fc99f9 buildRubyGem: remove unecessary duplication 2016-02-18 23:44:49 +00:00
Vladimír Čunát e9520e81b3 Merge branch 'master' into staging 2016-02-17 10:06:31 +01:00
Franz Pletz 41698c9efa Merge branch 'master' into hardened-stdenv 2016-02-15 20:05:29 +01:00
zimbatm 9acbb9021b bundix: cleaner substitution
Use the builtin substituteInPlace instead of sed
2016-02-14 17:57:18 +00:00
Michael Fellinger b9c13dcbc7 bundix: 2.0.4 -> 2.0.5
Fixes issue with the -d flag creating duplicated `dependencies` properties.
2016-02-12 09:56:02 +01:00
Michael Fellinger db6f59619d bundix: 1.0.4 -> 2.0.4 2016-02-10 23:27:33 +00:00
Arseniy Seroka 3b1d18ff48 Merge pull request #12919 from zimbatm/new-bundix2
bundix: 1.0.4 -> 2.0.4
2016-02-10 16:04:31 +03:00
Michael Fellinger 112476ec96 bundix: 1.0.4 -> 2.0.4 2016-02-10 12:02:10 +00:00
Nathan Zadoks c998447a13 buildRubyGem: pass the gem version through into the derivation name 2016-02-07 16:53:31 +01:00
Nathan Zadoks b4da3bb88b buildRubyGem: ensure gem versions don't get misparsed
Without this, every nix-env --upgrade replaces ruby with an
arbitrary gem, which makes Ruby unusuable from user environments.
2016-02-07 16:53:27 +01:00
Vladimír Čunát a115bff08c Merge branch 'master' into staging 2016-02-07 13:52:42 +01:00
Robin Gloster 9229e9c656 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-02-07 11:17:57 +00:00
Hoang Xuan Phu cb7b811c43 remove unused file bundler-head.nix (bundler_HEAD is now just an alias for bundler) 2016-02-03 11:26:40 +07:00
Robin Gloster e96ea9712c ruby: add patch for RAND_egd 2016-01-30 16:36:57 +00:00
Michael Fellinger c24c153743 Add Ruby 2.3.0 package 2016-01-27 09:28:59 +01:00
Vladimír Čunát 2af19df364 Merge branch 'master' into staging 2016-01-25 10:02:25 +01:00
zimbatm e9eda43928 buildRubyGem: fix missing libobjc in darwin
This was preventing any ruby gem with a c extension to build.

mkmf would fail with a misleading error:

    /nix/store/dmkcai8fnv21qxiasx628nim3mq4r4wg-ruby-2.2.3-p0/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
    You have to install development tools first.
2016-01-24 23:15:40 +00:00
zimbatm 9a55295c49 buildRubyGem: fix NoMethodError
generate_stub doesn't exist and the output is not used in the code so I just
removed the line.

This was preventing the binstubs from generating properly.
2016-01-24 23:14:00 +00:00
Nikolay Amiantov 9b980baa9d bundlerEnv.wrapper: rename to wrappedRuby 2016-01-24 15:59:31 +03:00
Rok Garbas dd9bad4aa4 rubygems: 2.4.1 -> 2.4.8, fixes #8492 2016-01-20 03:36:36 +01:00
Nikolay Amiantov 75358ad0e7 bundlerEnv: add wrapper 2016-01-10 07:26:37 +03:00
Charles Strahan b6c06e216b ruby: new bundler infrastructure
This improves our Bundler integration (i.e. `bundlerEnv`).

Before describing the implementation differences, I'd like to point a
breaking change: buildRubyGem now expects `gemName` and `version` as
arguments, rather than a `name` attribute in the form of
"<gem-name>-<version>".

Now for the differences in implementation.

The previous implementation installed all gems at once in a single
derivation. This was made possible by using a set of monkey-patches to
prevent Bundler from downloading gems impurely, and to help Bundler
find and activate all required gems prior to installation. This had
several downsides:

* The patches were really hard to understand, and required subtle
  interaction with the rest of the build environment.
* A single install failure would cause the entire derivation to fail.

The new implementation takes a different approach: we install gems into
separate derivations, and then present Bundler with a symlink forest
thereof. This has a couple benefits over the existing approach:

* Fewer patches are required, with less interplay with the rest of the
  build environment.
* Changes to one gem no longer cause a rebuild of the entire dependency
  graph.
* Builds take 20% less time (using gitlab as a reference).

It's unfortunate that we still have to muck with Bundler's internals,
though it's unavoidable with the way that Bundler is currently designed.
There are a number improvements that could be made in Bundler that would
simplify our packaging story:

* Bundler requires all installed gems reside within the same prefix
  (GEM_HOME), unlike RubyGems which allows for multiple prefixes to
  be specified through GEM_PATH. It would be ideal if Bundler allowed
  for packages to be installed and sourced from multiple prefixes.
* Bundler installs git sources very differently from how RubyGems
  installs gem packages, and, unlike RubyGems, it doesn't provide a
  public interface (CLI or programmatic) to guide the installation of a
  single gem. We are presented with the options of either
  reimplementing a considerable portion Bundler, or patch and use parts
  of its internals; I choose the latter. Ideally, there would be a way
  to install gems from git sources in a manner similar to how we drive
  `gem` to install gem packages.
* When a bundled program is executed (via `bundle exec` or a
  binstub that does `require 'bundler/setup'`), the setup process reads
  the Gemfile.lock, activates the dependencies, re-serializes the lock
  file it read earlier, and then attempts to overwrite the Gemfile.lock
  if the contents aren't bit-identical. I think the reasoning is that
  by merely running an application with a newer version of Bundler, you'll
  automatically keep the Gemfile.lock up-to-date with any changes in the
  format. Unfortunately, that doesn't play well with any form of
  packaging, because bundler will immediately cause the application to
  abort when it attempts to write to the read-only Gemfile.lock in the
  store. We work around this by normalizing the Gemfile.lock with the
  version of Bundler that we'll use at runtime before we copy it into
  the store. This feels fragile, but it's the best we can do without
  changes upstream, or resorting to more delicate hacks.

With all of the challenges in using Bundler, one might wonder why we
can't just cut Bundler out of the picture and use RubyGems. After all,
Nix provides most of the isolation that Bundler is used for anyway.

The problem, however, is that almost every Rails application calls
`Bundler::require` at startup (by way of the default project templates).
Because bundler will then, by default, `require` each gem listed in the
Gemfile, Rails applications are almost always written such that none of
the source files explicitly require their dependencies. That leaves us
with two options: support and use Bundler, or maintain massive patches
for every Rails application that we package.

Closes #8612
2015-12-29 09:30:21 -05:00
Robin Gloster d30904ea89 ruby: fix build with libressl2.3 2015-12-23 22:08:33 +00:00
Vladimír Čunát fdf3aa9923 buildRubyGem: use a saner default version to fix #11805
Previously the gems defaulted to "ruby" as the name and
"${ruby-version}-${gem-name}-${gem-version}" as the version,
which was just insane.

https://github.com/NixOS/nixpkgs/issues/9771#issuecomment-141041414
Noone is reacting so it's high time to take at least some action.
/cc @cstrahan.
2015-12-23 09:02:13 +01:00
aszlig 6945557dba
ruby: Fix SHA256 hashes of several versions.
According to @zimbatm, he got the SHA256 hashes via nix-prefetch-git.

However, fetchFromGitHub doesn't use Git to fetch the sources but uses
fetchzip under the hood, so we get plain source directories in the Nix
store, which in turn are hashed.

Tested by:

nix-build --no-out-link -E 'map (x:
    (builtins.getAttr x (import ./.  {})).src
) [ "ruby_1_9_3" "ruby_2_0_0" "ruby_2_1_0" "ruby_2_1_1" "ruby_2_1_2"
    "ruby_2_1_3" "ruby_2_1_6" "ruby_2_1_7" "ruby_2_2_0" "ruby_2_2_2"
    "ruby_2_2_3"
]'

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-12-08 02:56:29 +01:00
zimbatm f399ab50d8 ruby: update railsexpress patchsets, fixes #11347 2015-12-07 15:37:55 +01:00
zimbatm 7c338ffb77 ruby_2_2: 2.2.2 -> 2.2.3 2015-12-07 15:37:33 +01:00
zimbatm d9f0568ccb ruby_2_1: 2.1.6 -> 2.1.7 2015-12-07 15:37:33 +01:00
zimbatm 9ebc399432 ruby_2_0: 2.0.0p645 -> 2.0.0p647 2015-12-07 15:37:33 +01:00
Arseniy Seroka 0c05f14d53 Merge pull request #10535 from roblabla/feature-updateGitlab8.0.5
gitlab: 7.4.2 -> 8.0.5
2015-12-04 16:30:09 +03:00
roblabla b7a4231aa2 gitlab: 7.4.2 -> 8.0.5 2015-12-04 01:14:24 +01:00
zimbatm ad2a4ab24c ruby: remove insecure 1.8.7, fixes #11194
1.8.x is unsupported and is probably insecure.

This also simplifies things a little bit
2015-11-25 12:10:03 +01:00
William A. Kennington III 6602f49495 Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06""
This reverts commit 741bf840da.

This reverts the fallout from reverting the major changes.
2015-11-14 12:32:51 -08:00
Vladimír Čunát 4917a4f8b3 Merge master into staging 2015-10-23 01:57:14 +02:00
Allan Espinosa c20e79abb9 ruby: adjust the libPath 2015-10-17 22:28:22 +09:00
Eelco Dolstra 741bf840da Revert "Merge pull request #9543 from NixOS/staging.post-15.06"
This reverts commit f61176c539, reversing
changes made to a27ca029ee.

Conflicts:
	pkgs/development/libraries/ncurses/default.nix
2015-10-06 15:24:20 +02:00
Jude Taylor 83a5cfb260 add darwin.libobjc to some ruby gems that need it 2015-10-01 13:30:30 -07:00
Jude Taylor 10054a676a update bundler-head SHA256 2015-10-01 08:58:28 -07:00
Jude Taylor 5379504451 Merge pull request #9834 from NixOS/rubies
Merge Ruby versions into one file
2015-10-01 08:58:28 -07:00