From bc53465f766664b4956138ab234995f2a1d3b08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Tue, 1 Jul 2014 08:59:51 +0800 Subject: [PATCH] add python-discid, a binding of libdiscid by MusicBrainz --- pkgs/top-level/python-packages.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17b36a887e0a..2db19dbdf8bc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -67,6 +67,28 @@ rec { inherit python; }; + discid = buildPythonPackage rec { + name = "discid-1.1.0"; + + meta = with stdenv.lib; { + description = "Python binding of libdiscid"; + homepage = "https://python-discid.readthedocs.org/"; + license = licenses.lgpl3Plus; + platforms = platforms.linux; + maintainer = with maintainers; [ iyzsong ]; + }; + + src = fetchurl { + url = "https://pypi.python.org/packages/source/d/discid/${name}.tar.gz"; + md5 = "2ad2141452dd10b03ad96ccdad075235"; + }; + + patchPhase = '' + substituteInPlace discid/libdiscid.py \ + --replace '_open_library(_LIB_NAME)' "_open_library('${pkgs.libdiscid}/lib/libdiscid.so.0')" + ''; + }; + ipython = import ../shells/ipython { inherit (pkgs) stdenv fetchurl sip pyqt4; inherit buildPythonPackage pythonPackages;