2017-12-31 11:08:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, lzma
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "backports.lzma";
|
2017-12-31 11:09:23 +00:00
|
|
|
version = "0.0.8";
|
2017-12-31 11:08:59 +00:00
|
|
|
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-12-31 11:09:23 +00:00
|
|
|
sha256 = "200584ad5079d8ca6b1bfe14890c7be58666ab0128d8ca26cfb2669b476085f3";
|
2017-12-31 11:08:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ lzma ];
|
|
|
|
|
|
|
|
# Needs the compiled module in $out
|
|
|
|
checkPhase = ''
|
|
|
|
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -m unittest discover -s test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Backport of Python 3.3's 'lzma' module for XZ/LZMA compressed files";
|
|
|
|
homepage = https://github.com/peterjc/backports.lzma;
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|