3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

11533 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
Charles Strahan 9e34985430 w3m: use Arch patches
Fix the built-in help (perl.patch)
  https://bugs.archlinux.org/task/45608

Properly link w3mimgdisplay to x11
  https://bbs.archlinux.org/viewtopic.php?id=196093

Fix rendering bug in w3mimgdisplay (w3m_rgba.patch)
  https://github.com/hut/ranger/issues/86

Don't ignore input tags with invalid types (form_unkown.patch)
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615843

Fix a segfault when using https (https.patch)
  https://bugzilla.redhat.com/show_bug.cgi?id=707994
2015-12-25 15:26:14 -05:00
Robin Gloster f8ee267576 w3m: do not always link to RAND_egd for openssl
This fixes the build for libressl >= 2.3 as RAND_egd has been removed as
it is insecure.
2015-12-23 22:10:01 +00:00
Arseniy Seroka afcac3f21f Merge pull request #11907 from ericbmerritt/hub-2.2.2
hub: 2.2.1 -> 2.2.2
2015-12-23 23:09:55 +03:00
Franz Pletz cbada77b0b clawsMail: 3.13.0 -> 3.13.1 (CVE-2015-8614)
Fixes a remotely triggerable buffer overflow.
http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3557
Close #11910.
2015-12-23 18:48:38 +01:00
Eric Merritt 6108bb8971 hub: 2.2.1 -> 2.2.2 2015-12-23 08:37:02 -08:00
Thomas Tuegel 077a3102cc dropbox: 3.12.5 -> 3.12.6 2015-12-23 08:36:50 -06:00
Nicole Angel 90e881eece keepass: load plugins from store paths, fixes #11206 2015-12-23 02:12:36 +01:00
Nicole Angel e99beec0e1 Keefox (keepass plugin): init at 1.5.4 2015-12-23 02:12:15 +01:00
Tim Williams e2a25433b2 copyq: init at 2.5.0, fixed #11887 2015-12-23 01:58:59 +01:00
Nathan Zadoks 971d580a00 spotify: fix missing ffmpeg_0_10 dependency, fixes #11877
This makes local playback work.
2015-12-23 01:41:01 +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
Derek Gonyeo 540c520cf6 rkt: bump version 0.13.0 -> 0.14.0, fixes #11885 2015-12-23 01:27:26 +01:00
Thomas Tuegel a9ca11e82a melpa-stable-packages: fix dependency specification 2015-12-22 06:55:34 -06:00
Thomas Tuegel f35c3d03d6 melpa-packages: fix dependency specification 2015-12-22 06:55:25 -06:00
Thomas Tuegel 26a7470ce6 elpa-packages: fix dependency specification 2015-12-22 06:55:10 -06:00
Thomas Tuegel b3949f29cd emacsPackagesNg.ack-menu: broken upstream 2015-12-22 06:50:21 -06:00
koral 3c85ff442d nano: 2.4.2 -> 2.5.0, fixes #11829 2015-12-22 01:24:12 +01:00
John Wiegley d80aa87b13 coqPackages_8_5.coq: 8.5b2 -> 8.5rc1 2015-12-21 16:12:43 -08: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
Nathan Zadoks d5e5a7dbc3 docker: 1.9.0 -> 1.9.1 2015-12-21 12:18:22 +01:00
Pascal Wittmann 074ab57d68 Merge pull request #11849 from bobvanderlinden/lsyncd-2.1.6
lsyncd: 2.1.5 -> 2.1.6
2015-12-21 08:50:35 +01:00
Jascha Geerds 9684726ba6 Merge pull request #11850 from rycee/bump/keepassx
keepassx: 0.4.3 -> 0.4.4
2015-12-21 08:05:35 +01:00
Robert Helgesson 6742104cbe keepassx2: 2.0beta2 -> 2.0
Also switch to official download URL.
2015-12-20 22:51:09 +01:00
Robert Helgesson 1253cd926c keepassx: 0.4.3 -> 0.4.4
Fixes CVE-2015-8359 and CVE-2015-8378. Also switch URL to new download
location.
2015-12-20 22:26:10 +01:00
Bob van der Linden 760ec896ae lsyncd: 2.1.5 -> 2.1.6 2015-12-20 21:56:28 +01:00
Tobias Geerinckx-Rice 56f6be2583 saneBackendsGit 1.0.25-180-g6d8b8d5 -> 2015-12-20 2015-12-20 19:58:50 +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 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 1cd5505a9f telegram-qml: Qt 5 infrastructure update 2015-12-20 07:56:53 -06:00
Thomas Tuegel 126188be5c cutegram: Qt 5 infrastructure updates 2015-12-20 07:56:52 -06:00
Thomas Tuegel 541b2f20de fritzing: Qt 5 infrastructure update 2015-12-20 07:56:50 -06:00
Thomas Tuegel fc13f37f2c firestr: Qt 5 infrastructure update 2015-12-20 07:56:50 -06:00
Thomas Tuegel de5898a495 qtox: Qt 5 infrastructure update 2015-12-20 07:56:49 -06:00
Thomas Tuegel 249e5f732a linssid: Qt 5 infrastructure update 2015-12-20 07:56:49 -06:00
Thomas Tuegel 4e71ebd7c9 dfilemanager: Qt 5 infrastructure update 2015-12-20 07:56:48 -06:00
Thomas Tuegel 88514fdf58 robomongo: Qt 5 infrastructure update 2015-12-20 07:56:48 -06:00
Thomas Tuegel 06f9ac71dc gpsbabel: Qt 5 infrastructure update 2015-12-20 07:56:48 -06:00
Thomas Tuegel 121f944d0d qtpass: Qt 5 infrastructure update 2015-12-20 07:56:47 -06:00
Thomas Tuegel 732de87786 twmn: Qt 5 infrastructure update 2015-12-20 07:56:47 -06:00
Thomas Tuegel 36dea909b7 calibre: Qt 5 infrastructure update 2015-12-20 07:56:47 -06:00
Thomas Tuegel e292103d46 tiled: Qt 5 infrastructure update 2015-12-20 07:56:46 -06:00
Thomas Tuegel 07a79f2a9b sigil: Qt 5 infrastructure update 2015-12-20 07:56:46 -06:00
Thomas Tuegel 5af2e7b76e rapcad: Qt 5 infrastructure update 2015-12-20 07:56:46 -06:00
Thomas Tuegel 3e6a70d974 phototonic: Qt 5 infrastructure update 2015-12-20 07:56:45 -06:00
Thomas Tuegel 8bbbb31f3f awesomebump: Qt 5 infrastructure update 2015-12-20 07:56:45 -06:00