summary refs log tree commit diff
path: root/pkgs/tools/audio/beets/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-11-29 03:51:06 +0100
committeraszlig <aszlig@nix.build>2018-11-29 05:10:13 +0100
commit36efeac21a63d82da055378c49adb8e01b4efe65 (patch)
treea5250e000e374964fc6d9c1ef9410ef59d7ee136 /pkgs/tools/audio/beets/default.nix
parent892407a9c671103c2e4fd766a9087700a24313e8 (diff)
downloadnixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar.gz
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar.bz2
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar.lz
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar.xz
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.tar.zst
nixpkgs-36efeac21a63d82da055378c49adb8e01b4efe65.zip
beets: Add patch to fix Python 3.7 compatibility
Since 0f38d9669ffd74991b65a9c40cdbcf2a98438d1f, 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
0d2f06ae3a1f8347dc09cd0dfe6d12b757368e4d, 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)
Diffstat (limited to 'pkgs/tools/audio/beets/default.nix')
-rw-r--r--pkgs/tools/audio/beets/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix
index 8f0cc6c4f5c..1cba381a57b 100644
--- a/pkgs/tools/audio/beets/default.nix
+++ b/pkgs/tools/audio/beets/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchFromGitHub, writeScript, glibcLocales, diffPlugins
 , pythonPackages, imagemagick, gobjectIntrospection, gst_all_1
+, fetchpatch
 
 # Attributes needed for tests of the external plugins
 , callPackage, beets
@@ -155,6 +156,14 @@ in pythonPackages.buildPythonApplication rec {
   patches = [
     ./replaygain-default-bs1770gain.patch
     ./keyfinder-default-bin.patch
+
+    # Fix Python 3.7 compatibility
+    (fetchpatch {
+      url = "https://github.com/beetbox/beets/commit/"
+          + "15d44f02a391764da1ce1f239caef819f08beed8.patch";
+      sha256 = "12rjb4959nvnrm3fvvki7chxjkipa0cy8i0yi132xrcn8141dnpm";
+      excludes = [ "docs/changelog.rst" ];
+    })
   ];
 
   postPatch = ''