Commit Graph

3138 Commits

Author SHA1 Message Date
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
Vladimír Čunát
12a0e09563 Merge #11674: libressl-2.3 patches for various pkgs 2015-12-23 23:16:27 +01:00
Arseniy Seroka
93d3f6f52b Merge pull request #11905 from aborsu/jenkins-update
jenkins ci: 1.638 -> 1.643
2015-12-23 23:10:46 +03:00
Vladimír Čunát
11c702c582 Merge master into staging 2015-12-23 18:57:35 +01:00
Augustin Borsu
170f91a249 jenkins ci: 1.638 -> 1.643 2015-12-23 15:47:11 +01:00
Tim Steinbach
d509f8a30a gradle: 2.9 -> 2.10 2015-12-23 08:44:49 -05:00
Vladimír Čunát
bf9c16d4ac texinfo6: remove meta.branch and refactor meta
It was wrong ("5.2") and seemed unused in nixpkgs.
2015-12-23 09:19:38 +01:00
Arseniy Seroka
87d2532f82 Merge pull request #11879 from aneeshusa/update-vagrant-to-1.8.0
vagrant: 1.7.4 -> 1.8.0
2015-12-22 17:51:35 +03:00
Aneesh Agrawal
53a5a44190 vagrant: 1.7.4 -> 1.8.0 2015-12-22 05:55:48 -05:00
Tim Steinbach
895875bdac maven: 3.3.3 -> 3.3.9, fixes #11867 2015-12-22 02:11:00 +01:00
Tim Steinbach
9121277144 gradle: 2.8 -> 2.9 2015-12-21 11:37:21 -05:00
Tobias Geerinckx-Rice
ca8903c3c2 include-what-you-use: use unversioned llvm attribute
...in the expression itself, while hard-coding the officially supported
version in all-packages.nix for sanity's sake (mine).
2015-12-20 03:22:24 +01:00
Tobias Geerinckx-Rice
986f446674 include-what-you-use: 0.4 -> 0.5
Compatible with llvm+clang 3.7. Changes:
- Added Boost and Qt mappings.
- Better support for using declarations.
- Allow size_t from multiple headers.
- Fixed handling includes with common path prefix.

More: http://include-what-you-use.org/
2015-12-20 03:15:36 +01:00
Herwig Hochleitner
b3b7f9f37f fix lib path for gradle, fixes #11191 2015-12-18 23:12:43 +03:00
Peter Simons
16e9b44afa cabal2nix: update to version 20151217 2015-12-18 11:37:44 +01:00
Pascal Wittmann
21522ede83 Merge pull request #11753 from nlewo/master
Add devpi-client and its dependencies
2015-12-17 16:21:46 +01:00
Vladimír Čunát
5d4f0b556e texinfo: cleanups and doCheck = false for non-interactive
... to simplify bootstrapping. Discussion on #11527.
2015-12-17 14:45:46 +01:00
Jan Malakhovski
daa199a95e texinfo: fix doCheck properly, cleanup (close #11527) 2015-12-17 14:45:46 +01:00
Antoine Eiche
f21a65f719 devpi-client: init at 2.3.2 2015-12-17 09:34:13 +01:00
Mathieu Boespflug
bb30c79f0b vagrant: bring embedded/ libraries in scope of dynamic linker. 2015-12-16 18:14:40 +01:00
Peter Simons
82c673d4c9 Merge pull request #11651 from gleber/add-erlang-modules
Add erlang modules
2015-12-15 17:55:25 +01:00
Gleb Peregud
bb1b5c7194 Update hex.pm registry 2015-12-15 15:06:47 +01:00
Gleb Peregud
474da3bf24 Add sources of specific rebar bootstrap deps via new fetchHex
derivation.
2015-12-15 15:06:44 +01:00
Gleb Peregud
108f3cf67f Add patch which makes rebar compilation hermetic 2015-12-15 14:05:51 +01:00
Gleb Peregud
4ba1a51b7f Move registry to rebar3, since it needs it itself to be bootstrapped.
This makes rebar3 build a bit more hermetic. Next stage is to pull in
rebar3 plugins dependencies for bootstrap to pick up.
2015-12-15 14:05:19 +01:00
Gleb Peregud
033902d269 Refactor fetchHex out of buildHex.
This will allow to reuse this code to fetch rebar3's dependencies to
ensure it's hermetic build.
2015-12-15 14:01:38 +01:00
Gleb Peregud
bcc4ca029a Add rebar3 package 2015-12-15 01:02:52 +01:00
Lancelot SIX
5aa99f680e pkgs.gdb: 7.10 -> 7.10.1
See https://lists.gnu.org/archive/html/info-gnu/2015-12/msg00003.html
2015-12-12 14:54:25 +01:00
Pascal Wittmann
e0a7c3a54b intel-gpu-tools: 1.12 -> 1.13 2015-12-12 12:05:19 +01:00
Pascal Wittmann
42c7004d33 checkstyle: 6.12.1 -> 6.13 2015-12-12 12:05:19 +01:00
Pavan Rikhi
2de85bd7e5 sassc: v3.2.4 -> v3.3.2 2015-12-10 17:27:46 -05:00
Robin Gloster
34e67f558f rustfmt: 2015-10-28 -> 2015-12-08 2015-12-10 16:23:39 +00:00
Herwig Hochleitner
58ba1d5bd3 leiningen: 2.5.2 -> 2.5.3, fixes #11537 2015-12-08 02:58:33 +01:00
Vladimír Čunát
263fd55d4b Merge recent staging built on Hydra
http://hydra.nixos.org/eval/1231884
Only Darwin jobs seem to be queued now,
but we can't afford to wait for that single build slave.
2015-12-05 11:11:51 +01:00
Matt Whiteley
94baac8d02 chefdk: 0.4.0 -> 0.10.0 2015-12-03 13:28:26 -08:00
Arseniy Seroka
e024f7fec9 Merge pull request #11409 from FlorentBecker/kcov
kcov: fix issue #11399
2015-12-03 16:28:45 +03:00
Florent Becker
fa8586495d kcov: fix issue #11399 2015-12-02 22:20:01 +01:00
William Casarin
bc698428aa multi-ghc-travis: init at git-2015-11-04 2015-11-29 17:39:34 -08:00
Vladimír Čunát
f2ad4a47e8 cmake: remove conditional patch that no longer applies
Close #11290. The patch will no longer apply on *any* platform.
2015-11-29 08:58:39 +01:00
Vincent Laporte
6a622acc87 merlin: 2.3 -> 2.3.1 2015-11-28 10:42:08 +01:00
Nikolay Amiantov
2472e19914 Merge pull request #11278 from abbradar/gdb-guile
gdb: use system zlib, fix guile support
2015-11-27 02:09:13 +03:00
Tobias Geerinckx-Rice
2798b02ad0 Convert some *Flags from strings to lists 2015-11-26 23:45:31 +01:00
Domen Kožar
67e03d0c50 Merge branch 'buildPythonPackage+wheels' 2015-11-26 17:38:35 +01:00
Nikolay Amiantov
d96f7128e1 gdb: use system zlib, fix guile support 2015-11-26 16:43:44 +03:00
Pascal Wittmann
765afaec88 sslmate: make meta.maintainers a list 2015-11-25 23:06:09 +01:00
Joachim Fasting
6ccf87defe bam: reimplement using mkDerivation 2015-11-24 14:45:15 +01:00
Vladimír Čunát
13eca6f79a Merge #11067: SmartOS updates
I amended some commits slightly.
2015-11-23 14:45:44 +01:00
Danny Wilson
baf7fdcb75 SmartOS: bison: make help2man target specific dependency 2015-11-23 11:42:01 +01:00
Danny Wilson
d510109c54 SmartOS: texinfo: Fix build and make configureFlags target optional. 2015-11-23 11:42:00 +01:00
Danny Wilson
1752268aed SmartOS: Fix pkgconfig 0.29 build 2015-11-23 00:01:55 +01:00