2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lz4
|
|
|
|
}:
|
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";
|
|
|
|
rev = "434fb42220ff58778bb9fbadb6152cad7e4f5dd0";
|
|
|
|
sha256 = "zVnkVl3amUDOB+pnw5SkMGSrVL/dTQ82E8IWfJvKC4Q=";
|
|
|
|
};
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kaitaistruct";
|
2020-11-06 00:33:48 +00:00
|
|
|
version = "0.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-06 00:33:48 +00:00
|
|
|
sha256 = "3d5845817ec8a4d5504379cc11bd570b038850ee49c4580bc0998c8fb1d327ad";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
preBuild = ''
|
|
|
|
ln -s ${kaitai_compress}/python/kaitai kaitai
|
|
|
|
sed '28ipackages = kaitai/compress' -i setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
lz4
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
dontCheck = true;
|
|
|
|
|
|
|
|
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;
|
2021-04-25 03:57:28 +00:00
|
|
|
maintainers = teams.determinatesystems.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|