diff --git a/pkgs/applications/audio/picard/default.nix b/pkgs/applications/audio/picard/default.nix index 235a81a6a32..d0c3f010e6e 100644 --- a/pkgs/applications/audio/picard/default.nix +++ b/pkgs/applications/audio/picard/default.nix @@ -1,26 +1,17 @@ -{ stdenv, fetchurl, pythonPackages, gettext, pyqt4 -, pkgconfig, libdiscid, libofa, ffmpeg, chromaprint +{ stdenv, buildPythonPackage, fetchurl, gettext +, pkgconfig, libofa, ffmpeg, chromaprint +, pyqt4, mutagen, python-libdiscid }: -pythonPackages.buildPythonPackage rec { +let version = "1.3"; in +buildPythonPackage { name = "picard-${version}"; - namePrefix = ""; - version = "1.2"; src = fetchurl { - url = "http://ftp.musicbrainz.org/pub/musicbrainz/picard/${name}.tar.gz"; - sha256 = "0sbsf8hzxhxcnnjqvsd6mc23lmk7w33nln0f3w72f89mjgs6pxm6"; + url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-${version}.tar.gz"; + sha256 = "06s90w1j29qhd931dgj752k5v4pjbvxiz6g0613xzj3ms8zsrlys"; }; - postPatch = let - discid = "${libdiscid}/lib/libdiscid.so.0"; - fpr = "${chromaprint}/bin/fpcalc"; - in '' - substituteInPlace picard/disc.py --replace libdiscid.so.0 ${discid} - substituteInPlace picard/const.py \ - --replace "FPCALC_NAMES = [" "FPCALC_NAMES = ['${fpr}'," - ''; - buildInputs = [ pkgconfig ffmpeg @@ -29,19 +20,11 @@ pythonPackages.buildPythonPackage rec { ]; propagatedBuildInputs = [ - pythonPackages.mutagen pyqt4 - libdiscid + mutagen + python-libdiscid ]; - configurePhase = '' - python setup.py config - ''; - - buildPhase = '' - python setup.py build - ''; - installPhase = '' python setup.py install --prefix="$out" ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cab75d8f0ca..839f5f154a8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10248,7 +10248,10 @@ let pianobooster = callPackage ../applications/audio/pianobooster { }; - picard = callPackage ../applications/audio/picard { }; + picard = callPackage ../applications/audio/picard { + python-libdiscid = pythonPackages.discid; + mutagen = pythonPackages.mutagen; + }; picocom = callPackage ../tools/misc/picocom { };