pythonPackages.pyacoustid: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-25 21:56:14 -04:00 committed by Frederik Rietdijk
parent 51a75d353b
commit 098c097190
3 changed files with 35 additions and 25 deletions

View File

@ -0,0 +1,34 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, requests
, audioread
, pkgs
}:
buildPythonPackage rec {
pname = "pyacoustid";
version = "1.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "0117039cb116af245e6866e8e8bf3c9c8b2853ad087142bd0c2dfc0acc09d452";
};
propagatedBuildInputs = [ requests audioread ];
patches = [ ./pyacoustid-py3.patch ];
postPatch = ''
sed -i \
-e '/^FPCALC_COMMAND *=/s|=.*|= "${pkgs.chromaprint}/bin/fpcalc"|' \
acoustid.py
'';
meta = with stdenv.lib; {
description = "Bindings for Chromaprint acoustic fingerprinting";
homepage = "https://github.com/sampsyo/pyacoustid";
license = licenses.mit;
};
}

View File

@ -3241,31 +3241,7 @@ in {
py = callPackage ../development/python-modules/py { };
pyacoustid = buildPythonPackage rec {
name = "pyacoustid-1.1.0";
src = pkgs.fetchurl {
url = "mirror://pypi/p/pyacoustid/${name}.tar.gz";
sha256 = "0117039cb116af245e6866e8e8bf3c9c8b2853ad087142bd0c2dfc0acc09d452";
};
propagatedBuildInputs = with self; [ requests audioread ];
patches = [ ../development/python-modules/pyacoustid-py3.patch ];
postPatch = ''
sed -i \
-e '/^FPCALC_COMMAND *=/s|=.*|= "${pkgs.chromaprint}/bin/fpcalc"|' \
acoustid.py
'';
meta = {
description = "Bindings for Chromaprint acoustic fingerprinting";
homepage = "https://github.com/sampsyo/pyacoustid";
license = licenses.mit;
};
};
pyacoustid = callPackage ../development/python-modules/pyacoustid { };
pyalgotrade = buildPythonPackage {
name = "pyalgotrade-0.16";