2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2018-10-26 13:03:42 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, setuptools
|
|
|
|
, nose
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycdio";
|
2019-09-28 14:21:35 +00:00
|
|
|
version = "2.1.0";
|
2018-10-26 13:03:42 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-09-28 14:21:35 +00:00
|
|
|
sha256 = "01b7vqqfry071p60sabydym7r3m3rxszyqpdbs1qi5rk2sfyblnn";
|
2018-10-26 13:03:42 +00:00
|
|
|
};
|
|
|
|
|
2019-12-14 03:21:34 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'library_dirs=library_dirs' 'library_dirs=[dir.decode("utf-8") for dir in library_dirs]' \
|
|
|
|
--replace 'include_dirs=include_dirs' 'include_dirs=[dir.decode("utf-8") for dir in include_dirs]' \
|
|
|
|
--replace 'runtime_library_dirs=runtime_lib_dirs' 'runtime_library_dirs=[dir.decode("utf-8") for dir in runtime_lib_dirs]'
|
|
|
|
'';
|
2018-10-26 13:03:42 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-03-16 21:44:57 +00:00
|
|
|
nativeBuildInputs = [ nose pkgs.pkg-config pkgs.swig ];
|
2019-04-15 23:03:02 +00:00
|
|
|
buildInputs = [ setuptools pkgs.libcdio ]
|
2021-01-24 00:29:22 +00:00
|
|
|
++ lib.optional stdenv.isDarwin pkgs.libiconv;
|
2018-10-26 13:03:42 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/libcdio/";
|
2018-10-26 13:03:42 +00:00
|
|
|
description = "Wrapper around libcdio (CD Input and Control library)";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|