29e89248bf
Since the switch to using python3Packages in commit72934aa94e
, 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. In2e4aded366
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
28 lines
790 B
Nix
28 lines
790 B
Nix
{ stdenv, fetchFromGitHub, beets, pythonPackages }:
|
|
|
|
pythonPackages.buildPythonApplication rec {
|
|
name = "beets-alternatives-${version}";
|
|
version = "0.8.2";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "beets-alternatives";
|
|
owner = "wisp3rwind";
|
|
# This is 0.8.2 with fixes against Beets 1.4.6 and Python 3 compatibility.
|
|
rev = "331eb406786a2d4dc3dd721a534225b087474b1e";
|
|
sha256 = "1avds2x5sp72c89l1j52pszprm85g9sm750jh1dhnyvgcbk91cb5";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i -e '/long_description/d' setup.py
|
|
'';
|
|
|
|
nativeBuildInputs = [ beets pythonPackages.nose ];
|
|
|
|
checkPhase = "nosetests";
|
|
|
|
meta = {
|
|
description = "Beets plugin to manage external files";
|
|
homepage = https://github.com/geigerzaehler/beets-alternatives;
|
|
license = stdenv.lib.licenses.mit;
|
|
};
|
|
}
|