2017-12-31 12:08:59 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, lzma
|
|
|
|
, python
|
2018-01-24 14:13:22 +01:00
|
|
|
, pythonOlder
|
2017-12-31 12:08:59 +01:00
|
|
|
}:
|
|
|
|
|
2018-01-24 14:13:22 +01:00
|
|
|
if !(pythonOlder "3.3") then null else buildPythonPackage rec {
|
2017-12-31 12:08:59 +01:00
|
|
|
pname = "backports.lzma";
|
2019-10-16 11:43:03 +02:00
|
|
|
version = "0.0.14";
|
2017-12-31 12:08:59 +01:00
|
|
|
|
|
|
|
disabled = isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-16 11:43:03 +02:00
|
|
|
sha256 = "16d8b68e4d3cd4e6c9ddb059850452946da3914c8a8e197a7f2b0954559f2df4";
|
2017-12-31 12:08:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ lzma ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-08-30 14:52:26 +02:00
|
|
|
${python.interpreter} test/test_lzma.py
|
2017-12-31 12:08:59 +01:00
|
|
|
'';
|
|
|
|
|
2018-08-13 11:44:06 +02:00
|
|
|
# Relative import does not seem to function.
|
|
|
|
doCheck = false;
|
|
|
|
|
2017-12-31 12:08:59 +01:00
|
|
|
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;
|
|
|
|
};
|
2018-08-30 14:52:26 +02:00
|
|
|
}
|