2018-10-26 15:03:42 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, setuptools
|
|
|
|
, nose
|
|
|
|
, pkgs
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycdio";
|
2019-09-28 16:21:35 +02:00
|
|
|
version = "2.1.0";
|
2018-10-26 15:03:42 +02:00
|
|
|
disabled = !isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-28 16:21:35 +02:00
|
|
|
sha256 = "01b7vqqfry071p60sabydym7r3m3rxszyqpdbs1qi5rk2sfyblnn";
|
2018-10-26 15:03:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = "sed -i -e '/DRIVER_BSDI/d' pycdio.py";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2019-04-16 01:03:02 +02:00
|
|
|
nativeBuildInputs = [ nose pkgs.pkgconfig pkgs.swig ];
|
|
|
|
buildInputs = [ setuptools pkgs.libcdio ]
|
2018-10-26 15:03:42 +02:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin pkgs.libiconv;
|
|
|
|
|
|
|
|
# Run tests using nosetests but first need to install the binaries
|
|
|
|
# to the root source directory where they can be found.
|
|
|
|
checkPhase = ''
|
|
|
|
./setup.py install_lib -d .
|
|
|
|
nosetests
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-12-01 19:22:13 +01:00
|
|
|
homepage = https://www.gnu.org/software/libcdio/;
|
2018-10-26 15:03:42 +02:00
|
|
|
description = "Wrapper around libcdio (CD Input and Control library)";
|
|
|
|
maintainers = with maintainers; [ rycee ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|