This largely reverts commit 599312739e.
The main reason is that it breaks the plugins, because the mentioned
commit didn't change the attributes for the plugins as well.
But instead of just fixing the attributes when we import the plugin
packages, let's just override pythonPackages in all-packages.nix.
Right now, Beets is in transition to Python 3, so we don't need to wait
that long until we can remove the dependency on Python 2:
https://github.com/beetbox/beets/releases/tag/v1.4.1
Once Python 3 support is no longer beta, we can just change this by
changing one line only instead of several.
Tested this by building beets with both external plugins.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @FRidh
Full upstream release announcement:
https://github.com/beetbox/beets/releases/tag/v1.4.1
I had to rebase the keyfinder-default-bin.patch in order to apply with
the new release.
Other than that I didn't test whether beets works on my machine, as I
have a more or less temporary setup at the moment.
However, since the bump of mutagen to version 1.34 in commit
555928c228, the mediafile tests fail and
thus this commit unbreaks beets.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
The top-level attribute has been removed in commit
771ed59b48.
This has been partially resolved in commit
18bdd44729.
The latter change however only addressed the main derivations but missed
out on the plugins. This is now done by just passing pythonPackages down
the chain.
Tested by only evaluating the expression, not building.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @domenkozar, @pjones, @profpatsch
See #11567.
Furthermore, it renames pythonPackages.dbus to pythonPackages.dbus-
python as that's the name upstream uses.
There is a small rebuild but I couldn't figure out the actual cause.
The echonest plugin was removed in 3.18 because the API it used is
shutting down. You might want to try the acousticbrainz instead.
Update pluginsWithoutDeps as needed to keep preCheck working.
This patches the ffmpeg command path so that it will work without ffmpeg
being in the user's current path. The commit contains a suggestion from
me to patch command_output() instead of just replacing "ffmpeg" so that
if a user configuration alters the default commands it will still work.
The default convert configuration invokes ffmpeg, so this patches in the
right storepath. Since it patches the shlex split, even user config will
use the correct path. kudos @aszlig.
The reason why the completion tests didn't pass was because we had it
already disabled in 2acc258dff.
Meanwhile, beetbox/beets@a07cb83 has moved the file from
test/test_completion.sh to test/rsrc/test_completion.sh.
So this has silently re-enabled the completion tests, which we need to
investigate on our side why they failed in the first place.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
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