2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
brotli,
|
|
|
|
lz4,
|
|
|
|
setuptools,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
let
|
|
|
|
kaitai_compress = fetchFromGitHub {
|
|
|
|
owner = "kaitai-io";
|
|
|
|
repo = "kaitai_compress";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "12f4cffb45d95b17033ee4f6679987656c6719cc";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-l3rGbblUgxO6Y7grlsMEiT3nRIgUZV1VqTyjIgIDtyA=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kaitaistruct";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.10";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-oETe4pFz1q+6zye8rDna+JtlTdQYz6AJq4LZF4qa5So=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
preBuild = ''
|
|
|
|
ln -s ${kaitai_compress}/python/kaitai kaitai
|
2022-08-12 12:06:08 +00:00
|
|
|
sed '32ipackages = kaitai/compress' -i setup.cfg
|
2021-04-25 03:57:28 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
brotli
|
2021-04-25 03:57:28 +00:00
|
|
|
lz4
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
doCheck = false; # no tests in upstream
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"kaitaistruct"
|
|
|
|
"kaitai.compress"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Kaitai Struct: runtime library for Python";
|
|
|
|
homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime";
|
|
|
|
license = licenses.mit;
|
2023-03-24 00:07:29 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|