about summary refs log tree commit diff
path: root/pkgs/tools/audio/beets/alternatives-plugin.nix
blob: 27be81733d3bdf7e91b2b851247c85b7b28ff88c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, beets, pythonPackages }:

pythonPackages.buildPythonApplication rec {
  name = "beets-alternatives-${version}";
  version = "0.8.2";

  src = fetchFromGitHub {
    repo = "beets-alternatives";
    owner = "geigerzaehler";
    rev = "v${version}";
    sha256 = "10za6h59pxa13y8i4amqhc6392csml0dl771lssv6b6a98kamsy7";
  };

  postPatch = ''
    sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
    sed -i -e '/test_suite/d' setup.py
  '';

  nativeBuildInputs = [ beets pythonPackages.nose ];

  checkPhase = "nosetests";

  propagatedBuildInputs = with pythonPackages; [ futures ];

  meta = {
    description = "Beets plugin to manage external files";
    homepage = https://github.com/geigerzaehler/beets-alternatives;
    license = stdenv.lib.licenses.mit;
  };
}