2017-12-31 11:08:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, lzma
|
|
|
|
, python
|
2018-01-24 13:13:22 +00:00
|
|
|
, pythonOlder
|
2017-12-31 11:08:59 +00:00
|
|
|
}:
|
|
|
|
|
2018-01-24 13:13:22 +00:00
|
|
|
if !(pythonOlder "3.3") then null else buildPythonPackage rec {
|
2017-12-31 11:08:59 +00:00
|
|
|
pname = "backports.lzma";
|
2018-07-22 11:05:04 +01:00
|
|
|
version = "0.0.13";
|
2017-12-31 11:08:59 +00:00
|
|
|
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 11:05:04 +01:00
|
|
|
sha256 = "50829db66f0445442f6c796bba0ca62d1f87f54760c4682b6d1489e729a43744";
|
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;
|
|
|
|
};
|
|
|
|
}
|