2017-12-31 12:08:59 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, lzma
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "backports.lzma";
|
2018-01-07 09:00:15 +01:00
|
|
|
version = "0.0.9";
|
2017-12-31 12:08:59 +01:00
|
|
|
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-01-07 09:00:15 +01:00
|
|
|
sha256 = "9ba5d94214a79900ee297a594b8e154cd8e4a54d26eb06243c0e2f3ad5286539";
|
2017-12-31 12:08:59 +01: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;
|
|
|
|
};
|
|
|
|
}
|