Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
I've introduced the plugin and have been maintaining it ever since, so
it's time to make myself the official maintainer in order to avoid
confusion about who to address when issues about the alternatives plugin
arise.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @wisp3rwind
This introduces the following upstream changes:
* The package is now on PyPI
* Require at least beets v1.4.7
* Update album art in alternatives when it changes
* Python 3 support (Python 2.7 continues to be supported)
* Support the format aliases defined by the convert plugin ('wma' and
'vorbis' with current beets)
* Bugfix: Explicitly write tags after encoding instead of relying on
the encoder to do so
* Bugfix: If the formats config option is modified, don't move files
if the extension would change, but re-encode
I updated this because I was pinged by @wisp3rwind about moving back to
@geigerzaehler's repository at [1].
This is what @wisp3rwind wrote in the comment[2] (which was originally
directed to @Profpatsch):
(I hope you're the one to bug, or at least can ping someone else), I
just noticed that you switched the NixOS package to my repository.
Would you please switch it back to this repo soon-ish? The code here
is better tested, and [3] is handled less elegantly on my fork since
it requires changes to the configuration. The latter are undocumented,
but whoever has bothered to take a look at the code might end up with
(harmless) unused config entries.
So in essence we're now back to the original upstream repository again,
which I changed to @wisp3rwind's fork in 29e89248bf
because it fixed issues with Python 3.
Stripping the long_description from setup.py also doesn't seem to be
required anymore, but I didn't investigate why (might be because either
our Python tooling now sets a default language or the README simply no
longer has non-ASCII characters).
[1]: https://github.com/geigerzaehler/beets-alternatives
[2]: https://github.com/geigerzaehler/beets-alternatives/issues/23
[3]: https://github.com/geigerzaehler/beets-alternatives/pull/27
Signed-off-by: aszlig <aszlig@nix.build>
Since 0f38d9669f, the default Python
version for Python 3 is now Python 3.7.
It has been a while since beets had a new release, but the fix for
Python 3.7 is already in master (and it's also rather small), so I
decided to cherry-pick the commit as a patch.
I've built the package along with its tests and they failed at first,
but the errors were unrelated. So I disabled the tests for pylint, as
they're failing right now.
In addition I also needed to temporarily revert
0d2f06ae3a, which supposedly should fix
issues with Python 2 but aparently breaks Python 3 support and during
the beets tests we get a ModuleNotFoundError for the "_gi_gst" module.
However I didn't further investigate why this happens, as I'm time
constrained right now. But after disabling the pylint tests and the
revert of the mentioned gst-python commit, the beets tests succeed.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @jtojnar, @lopsided98 (for introducing the gst-python change)
Cc: @domenkozar, @pjones (other beets maintainers)
Since the switch to using python3Packages in commit
72934aa94e, the plugins no longer build
because they end up with a mix of Python 2 and Python 3 packages.
The reason for this is that the Beets package itself uses callPackage to
reference the plugins, however the overrides are not applied there and
thus the plugins end up getting pythonPackages from the top-level which
is Python 2 and beets with Python 3 dependencies.
Unfortunately this is not the only reason for the builds to fail,
because both plugins did not actually support Python 3.
For the copyartifacts plugin, the fix is rather easy because we only
need to advance to two more recent commits from upstream, which already
contain fixes for Python 3.
The alternatives plugin on the other hand is not maintained anymore, but
there is a fork at https://github.com/wisp3rwind/beets-alternatives
which has a bunch of fixes. In 2e4aded366
I already backported one of these fixes to the version from
https://github.com/geigerzaehler/beets-alternatives, but for Python 3
support it's a bit more complicated than just one little fix.
So instead of adding another series of patches which replicate the code
base of the fork and become a maintenance burden, I opted to directly
switch to the fork and remove the patch on our side.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @domenkozar, @pjones, @Profpatsch
The upstream release notes are a bit bigger, so I'm not including it
here. You can find it at:
https://github.com/beetbox/beets/releases/tag/v1.4.7
Originally I wanted to just fix the build, which is currently broken
because a few tests have failed, but the fix for the tests is already
included in the 1.4.7 upstream release[1], so I opted to update instead.
Other than running the tests included in beets (in addition to
building/running tests of the "alternatives" and "copyartifacts"
external plugins) I have made some small queries on my local music
collection, but haven't tested import or any write operation.
[1]: https://github.com/beetbox/beets/commit/8eb50fee33044dea008408423ee
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @domenkozar, @pjones
Since the bump of beets to version 1.4.6 in e5fab33efd
the tests no longer run successfully because beets 1.4.6 introduces a
breaking API change for the Item.move() method which now instead of just
passing copy=True the operation is now passed using a different
"operation" keyword argument.
Unfortunately the original repository of beets-alternatives is
unmaintained since 3 years and thus there is no upstream fix available
at the moment.
However, there is a fork maintained by @wisp3rwind, which addresses this
problem (wisp3rwind/beets-alternatives@33c6525ed4)
and a bunch of other fixes.
The reason why I'm not using the patch from @wisp3rwind is that it
simply doesn't apply against beets-alternatives 0.8.2, but my patch here
essentially does the same.
Signed-off-by: aszlig <aszlig@nix.build>
Upstream issue: geigerzaehler/beets-alternatives#13
Cc: @Profpatsch
In order to run the tests for the external plugins of beets, we need to
have beets itself as a dependency. So in order to do that, we now pass
beets without plugins and tests to the nativeBuildInputs of the plugins
so that we can run them.
As soon as the plugins are built they become part of the final beets,
which also has tests enabled, so disabling the tests for beets
derivation that is used for external plugin tests is a non-issue here
because they're going to be executed anyway.
Enabling tests for the alternatives plugin is pretty straightforward,
but in order to run tests for the copyartifacts plugin, we need to bump
the source code to the latest Git master.
The reason for this is that the version that was in use until now
required to have the beets source directory alongside of the
copyartifacts source code, but we already have beets available as a
normal dependency.
Updating copyartifacts to latest master largely consists of unit test
changes and a few Python 3 compatibility changes. However, one change
has the biggest stat, which is
sbarakat/beets-copyartifacts@1a0c281da0.
Fortunately, the last change is just moving the implementation to a
newer API from upstream beets and by the looks of the implementation it
seems to break support for moving files. However, reverting this commit
also reveals that moving files was already broken before, so it wouldn't
matter much whether we have this version bump or not.
Tested with the following command:
nix-build -E '(import ./. {}).beets.override {
enableAlternatives = true;
enableCopyArtifacts = true;
}'
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @domenkozar, @pjones, @Profpatsch, @michalrus
Regression introduced by 94351197cd.
Running the tests results in the following traceback:
...
File ".../unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File ".../test/regrtest.py", line 184, in <module>
for module in sys.modules.itervalues():
RuntimeError: dictionary changed size during iteration
The reason for this is that the test directory itself is called "test"
and the package including regrtest.py is also called "test", so the
loader tries to load tests from its own implementation.
We could fix this by changing PYTHONPATH and/or making the test
directory a proper package, but we'd still have failing tests because
beets itself is required to run the tests.
However for now I'm just removing the unit_tests kwarg in setup.py so
that we have the same behaviour as before the initially mentioned
commit.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* pkgs: refactor needless quoting of homepage meta attribute
A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.
* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit
* Fixed some instances
* ultrastardx-beta: init at 1.3.5
* libbass, libbass_fx: init at 24
* ultrastar-creator: init at 2017-04-12
* buildSupport/plugins.nix: add diffPlugins
Helper function to compare expected plugin lists to the found plugins.
* ultrastar-manager: init at 2017-05-24
The plugins are built in their own derivations, speeding up (re-)compilation.
The `diffPlugins` function from `beets` is reused to test for changes in the
plugin list on updates.
* beets: switch to diffPlugins
The function is basically just extracted for better reusability.
So this was suggested as [long ago as October, 2015](https://github.com/NixOS/nixpkgs/issues/10376#issuecomment-147734898).
Despite being fairly ignorant of the nix Python support, I decided
that I really wanted this; this change brings in what I believe are
the necessary components---I have, at least, successfully run `beet
replaygain` and `beet bpd`---but it may not do it in the best way; I'm
happy to consider input on that front.
I can at least state that all three changes are necessary---leave any
one of them out and gstreamer support doesn't work.
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
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.
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>
It's not included in upstream beets but are linked in the documentation
under "Other plugins", see:
http://beets.readthedocs.org/en/v1.3.15/plugins/index.html#other-plugins
I found this one particularly useful for syncing files to varios media
players that refuse to read my FLAC files properly.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
After trying with a dozen files, it seems the bs1770gain backend is much
more reliable than the audiotools backend and especially does a better
job (well, compared to audiotools which either does doing nothing at all
or throws an exception) when used on alboms that contain different
sample rates/sizes.
Additionally, we already had a few issues regarding the audiotools
backend, even to the extent that @sampsyco almost wanted to drop it
upstream (see sampsyco/beets#1342).
Also related issues are #10376 and sampsyo/beets#1592.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
I have to admit that I did very poor testing in d7307d8 and didn't
notice that the "badfiles" plugin relies on mp3val (thanks to @devhell
for packaging in 6e1ef13) and flac to be actually useful.
We now patch in the store locations of these binaries and make
"badfiles" an optional dependency (though enabled by default).
Now, I have tested "beet bad" on my whole music collection and it worked
fine (well, it has found errors... but that's what it is for).
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Introduces a new plugin called "badfiles", which helps to scan for
corruption within the music collection. I've added this to
pluginsWithoutDeps and sorted the list.
Full upstream changelog can be found here:
https://github.com/sampsyo/beets/releases/tag/v1.3.15
This fixes#10376 via sampsyo/beets@225ba28.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>