3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

20676 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 11c702c582 Merge master into staging 2015-12-23 18:57:35 +01:00
Nicole Angel 90e881eece keepass: load plugins from store paths, fixes #11206 2015-12-23 02:12:36 +01:00
Tim Williams e2a25433b2 copyq: init at 2.5.0, fixed #11887 2015-12-23 01:58:59 +01:00
Derek Gonyeo 9671674959 acbuild: 0.1.1 -> 0.2.2 and moved to own default.nix, fixes #11889 2015-12-23 01:33:37 +01:00
Arseniy Seroka bdd2073389 Merge pull request #11880 from FRidh/audiotools
python audiotools: 2.22 -> 3.1.1
2015-12-22 17:52:30 +03: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
Frederik Rietdijk 47f7cbb5bf python audiotools: 2.22 -> 3.1.1 2015-12-22 15:12:02 +01:00
Thomas Tuegel 57c9994a08 ace-jump-mode: 20140616 -> 2.0 2015-12-22 06:46:15 -06:00
Peter Simons 4418b8b034 Add LTS Haskell 3.19. 2015-12-22 13:17:20 +01:00
Christian Theune 2823814c5b syncthing: 0.12.4 -> 0.12.9 2015-12-22 12:56:12 +01:00
Domen Kožar a591390d8d pythonPackages.dash: fix hash 2015-12-22 12:06:53 +01:00
Aneesh Agrawal 53a5a44190 vagrant: 1.7.4 -> 1.8.0 2015-12-22 05:55:48 -05:00
Thomas Strobel d856841ba4 nixos trustedGRUB: add support for HP laptops 2015-12-22 03:12:30 +01:00
Alexander Shabalin d76c26e876 gibo: init at 1.0.4, fixes #11871 2015-12-22 02:43:24 +01:00
Charles Strahan 60df6fdd34 vanilla-dmz: init at 0.4.4, fixes #11102
Vanilla DMZ cursor theme
2015-12-22 02:28:08 +01:00
Alexander Shabalin a0138e1ed5 dynamic-colors: init at 2013-12-28, fixes #11874 2015-12-22 02:04:06 +01:00
Rok Garbas 38a6b5fb43 Merge pull request #11683 from rvl/fail2ban
Make fail2ban work again
2015-12-22 01:46:18 +01:00
Pascal Wittmann bf47b58f21 Merge pull request #11868 from gebner/ipaexfont
ipaexfont: init at 003.01
2015-12-22 00:32:44 +01:00
Gabriel Ebner 7e23ffd2c8 ipaexfont: init at 003.01 2015-12-21 17:49:06 +01:00
Arseniy Seroka 0cd13e6b7b Merge pull request #11853 from NeQuissimus/gradle29
gradle: 2.8 -> 2.9
2015-12-21 19:42:21 +03:00
Tim Steinbach 9121277144 gradle: 2.8 -> 2.9 2015-12-21 11:37:21 -05:00
obadz 29c676e73d pdfmod: init at 0.9.1 (close #11417)
vcunat did some cosmetic changes, such as joining lines
because we seem to rarely use one-identifier-per-line style,
or fixing hyena description to conform to our rules.
2015-12-21 15:19:36 +01:00
Thomas Tuegel 226a83edd8 Merge pull request #11300 from obadz/go-pup
go/pup: init at 0.3.9
2015-12-21 07:54:24 -06:00
Domen Kožar 94b5099d31 Merge pull request #11857 from FRidh/blaze
python packages: fix builds
2015-12-21 09:31:48 +01:00
Frederik Rietdijk 4d2d2c6a6e python tunigo: add missing test dependencies 2015-12-21 09:20:58 +01:00
Frederik Rietdijk 3b93952297 python mathics: patch to allow current sympy 2015-12-21 09:20:40 +01:00
Frederik Rietdijk 81b0f551c7 python mahotas: does not work on i686 2015-12-21 09:20:22 +01:00
Domen Kožar 30daa58195 Merge pull request #11855 from FRidh/blaze
python packages updates
2015-12-21 09:03:16 +01:00
Frederik Rietdijk 825f2e64e6 python odo: 0.3.4 -> 0.4.0 2015-12-21 09:01:43 +01:00
Frederik Rietdijk 8017e1af93 python datashape: 0.4.7 -> 0.5.0 2015-12-21 09:01:34 +01:00
Frederik Rietdijk b40264de12 python dask: 0.7.0 -> 0.7.5 2015-12-21 09:01:12 +01:00
Frederik Rietdijk 8d2bcfe2e7 python blaze: 0.8.3 -> 0.9.0 2015-12-21 09:01:00 +01:00
Pascal Wittmann c6eab0c980 Merge pull request #11852 from luispedro/update_mahotas141
mahotas: 1.4.0 -> 1.4.1
2015-12-21 08:50:05 +01:00
Luis Pedro Coelho d24b2a2aa2 mahotas: 1.4.0 -> 1.4.1
This new release should fix all errors on 32 bit systems
(reported here:
https://github.com/NixOS/nixpkgs/pull/11699#issuecomment-165410506)
2015-12-20 23:22:41 +01:00
Domen Kožar 804cafe6c2 add Django 1.9
(cherry picked from commit 1451f004c7)
Signed-off-by: Domen Kožar <domen@dev.si>
2015-12-20 22:56:00 +01:00
Thomas Tuegel 5ff1c58606 Merge pull request #11839 from ttuegel/qt-5.4
Qt infrastructure update
2015-12-20 08:11:52 -06:00
Thomas Tuegel 298c4befda phonon-backend-vlc: normalize attribute name to upstream 2015-12-20 08:03:26 -06:00
Thomas Tuegel 27c522cc3b phonon-backend-gstreamer: normalize attribute name to upstream 2015-12-20 08:02:42 -06:00
Thomas Tuegel 85c19f8fb4 smtube: Qt 5 infrastructure update 2015-12-20 07:56:55 -06:00
Thomas Tuegel d534d5f097 smplayer: Qt 5 infrastructure upgrade 2015-12-20 07:56:55 -06:00
Thomas Tuegel 5810f0e7ed tomahawk: Qt 5 infrastructure upgrade 2015-12-20 07:56:55 -06:00
Thomas Tuegel 54bcdcc0a7 teamspeak_client: Qt 5 infrastructure update 2015-12-20 07:56:54 -06:00
Thomas Tuegel 143d6123dc qutebrowser: Qt 5 infrastructure update 2015-12-20 07:56:54 -06:00
Thomas Tuegel 1d331481fc quazip: Qt 5 infrastructure update 2015-12-20 07:56:54 -06:00
Thomas Tuegel 538ce57feb qtcreator: Qt 5 infrastructure update 2015-12-20 07:56:53 -06:00
Thomas Tuegel 9d79319eae remove qt5Libs 2015-12-20 07:56:52 -06:00
Thomas Tuegel 660736def8 polkit-qt: normalize package name to upstream 2015-12-20 07:56:51 -06:00
Thomas Tuegel e782026719 poppler: normalize package name to upstream 2015-12-20 07:56:51 -06:00
Thomas Tuegel 17e17ea649 cmst: Qt 5 infrastructure update 2015-12-20 07:56:51 -06:00