about summary refs log tree commit diff
path: root/pkgs/tools/audio/beets/copyartifacts-plugin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/audio/beets/copyartifacts-plugin.nix')
-rw-r--r--pkgs/tools/audio/beets/copyartifacts-plugin.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/audio/beets/copyartifacts-plugin.nix b/pkgs/tools/audio/beets/copyartifacts-plugin.nix
index fdd70db4e640..6f84e98d23e8 100644
--- a/pkgs/tools/audio/beets/copyartifacts-plugin.nix
+++ b/pkgs/tools/audio/beets/copyartifacts-plugin.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pythonPackages }:
+{ stdenv, fetchFromGitHub, beets, pythonPackages, glibcLocales }:
 
 pythonPackages.buildPythonApplication rec {
   name = "beets-copyartifacts";
@@ -6,16 +6,25 @@ pythonPackages.buildPythonApplication rec {
   src = fetchFromGitHub {
     repo = "beets-copyartifacts";
     owner = "sbarakat";
-    rev = "dac4a1605111e24bb5b498aa84cead7c87480834";
-    sha256 = "0p5cskfgqinzh48a58hw56f96g9lar3k3g2p0ip1m9kawzf6axng";
+    rev = "4a5d347c858d25641c8a0eb7d8cb1a2cac10252a";
+    sha256 = "0bn6fci480ilghrdhpsjxxq29dxgni22sv1qalz770xy130g1zk3";
   };
 
   postPatch = ''
     sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
     sed -i -e '/namespace_packages/d' setup.py
     printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
+
+    # Skip test which is already failing upstream.
+    sed -i -e '1i import unittest' \
+           -e 's/\(^ *\)# failing/\1@unittest.skip/' \
+           tests/test_reimport.py
   '';
 
+  nativeBuildInputs = [ beets pythonPackages.nose glibcLocales ];
+
+  checkPhase = "LANG=en_US.UTF-8 nosetests";
+
   meta = {
     description = "Beets plugin to move non-music files during the import process";
     homepage = https://github.com/sbarakat/beets-copyartifacts;