2012-09-05 01:15:23 +02:00
|
|
|
{ stdenv, fetchurl, pythonPackages, gettext, pyqt4
|
2014-08-23 23:56:06 +02:00
|
|
|
, pkgconfig, libdiscid, libofa, ffmpeg, chromaprint
|
2013-08-14 18:39:35 +02:00
|
|
|
}:
|
2012-09-05 01:15:23 +02:00
|
|
|
|
|
|
|
pythonPackages.buildPythonPackage rec {
|
|
|
|
name = "picard-${version}";
|
|
|
|
namePrefix = "";
|
2013-08-14 12:54:49 +02:00
|
|
|
version = "1.2";
|
2012-09-05 01:15:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ftp.musicbrainz.org/pub/musicbrainz/picard/${name}.tar.gz";
|
2014-08-23 23:56:06 +02:00
|
|
|
sha256 = "0sbsf8hzxhxcnnjqvsd6mc23lmk7w33nln0f3w72f89mjgs6pxm6";
|
2012-09-05 01:15:23 +02:00
|
|
|
};
|
|
|
|
|
2013-08-14 18:39:35 +02:00
|
|
|
postPatch = let
|
2014-08-23 23:56:06 +02:00
|
|
|
discid = "${libdiscid}/lib/libdiscid.so.0";
|
|
|
|
fpr = "${chromaprint}/bin/fpcalc";
|
2013-08-14 18:39:35 +02:00
|
|
|
in ''
|
2014-08-23 23:56:06 +02:00
|
|
|
substituteInPlace picard/disc.py --replace libdiscid.so.0 ${discid}
|
|
|
|
substituteInPlace picard/const.py \
|
|
|
|
--replace "FPCALC_NAMES = [" "FPCALC_NAMES = ['${fpr}',"
|
2013-08-14 18:39:35 +02:00
|
|
|
'';
|
|
|
|
|
2012-09-05 01:15:23 +02:00
|
|
|
buildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
ffmpeg
|
|
|
|
libofa
|
|
|
|
gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pythonPackages.mutagen
|
|
|
|
pyqt4
|
|
|
|
libdiscid
|
|
|
|
];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
python setup.py config
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
python setup.py build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
python setup.py install --prefix="$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2014-08-23 23:56:06 +02:00
|
|
|
meta = with stdenv.lib; {
|
2012-09-05 01:15:23 +02:00
|
|
|
homepage = "http://musicbrainz.org/doc/MusicBrainz_Picard";
|
|
|
|
description = "The official MusicBrainz tagger";
|
2014-08-23 23:56:06 +02:00
|
|
|
maintainers = with maintainers; [ emery ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
2012-09-05 01:15:23 +02:00
|
|
|
};
|
|
|
|
}
|