1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 fetchpatch,
6}:
7
8buildPythonPackage rec {
9 pname = "pylzma";
10 version = "0.5.0";
11 format = "setuptools";
12
13 # This vendors an old LZMA SDK
14 # After some discussion, it seemed most reasonable to keep it that way
15 # xz, and uefi-firmware-parser also does this
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q";
19 };
20
21 patches = [
22 # https://github.com/fancycode/pylzma/pull/82/
23 (fetchpatch {
24 url = "https://github.com/fancycode/pylzma/commit/2fe0a4ed0588fd572931da4be10ad955636afde4.patch";
25 hash = "sha256-sWdMAmOPVTDnxNTjzPlqQYxqnjmRpK+OqwWF6jpXvIw=";
26 })
27 ];
28
29 pythonImportsCheck = [ "pylzma" ];
30
31 meta = with lib; {
32 homepage = "https://www.joachim-bauch.de/projects/pylzma/";
33 description = "Platform independent python bindings for the LZMA compression library";
34 license = licenses.lgpl21Only;
35 maintainers = with maintainers; [ dandellion ];
36 };
37}