1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00

pythonPackages.pycdio: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-26 09:03:42 -04:00 committed by Frederik Rietdijk
parent 288082b112
commit 4c429f0be0
2 changed files with 45 additions and 33 deletions

View file

@ -0,0 +1,44 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, setuptools
, nose
, pkgs
, isPy27
}:
buildPythonPackage rec {
pname = "pycdio";
version = "2.0.0";
disabled = !isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "1a1h0lmfl56a2a9xqhacnjclv81nv3906vdylalybxrk4bhrm3hj";
};
prePatch = "sed -i -e '/DRIVER_BSDI/d' pycdio.py";
preConfigure = ''
patchShebangs .
'';
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = [ setuptools nose pkgs.swig pkgs.libcdio ]
++ 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; {
homepage = http://www.gnu.org/software/libcdio/;
description = "Wrapper around libcdio (CD Input and Control library)";
maintainers = with maintainers; [ rycee ];
license = licenses.gpl3Plus;
};
}

View file

@ -3283,39 +3283,7 @@ in {
pycaption = callPackage ../development/python-modules/pycaption { };
pycdio = buildPythonPackage rec {
name = "pycdio-2.0.0";
disabled = !isPy27;
src = pkgs.fetchurl {
url = "mirror://pypi/p/pycdio/${name}.tar.gz";
sha256 = "1a1h0lmfl56a2a9xqhacnjclv81nv3906vdylalybxrk4bhrm3hj";
};
prePatch = "sed -i -e '/DRIVER_BSDI/d' pycdio.py";
preConfigure = ''
patchShebangs .
'';
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = [ self.setuptools self.nose pkgs.swig pkgs.libcdio ]
++ 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 = {
homepage = http://www.gnu.org/software/libcdio/;
description = "Wrapper around libcdio (CD Input and Control library)";
maintainers = with maintainers; [ rycee ];
license = licenses.gpl3Plus;
};
};
pycdio = callPackage ../development/python-modules/pycdio { };
pycosat = callPackage ../development/python-modules/pycosat { };