Files
nixpkgs/pkgs/development/python-modules/kaitaistruct/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

56 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
brotli,
lz4,
setuptools,
}:
let
kaitai_compress = fetchFromGitHub {
owner = "kaitai-io";
repo = "kaitai_compress";
rev = "12f4cffb45d95b17033ee4f6679987656c6719cc";
hash = "sha256-l3rGbblUgxO6Y7grlsMEiT3nRIgUZV1VqTyjIgIDtyA=";
};
in
buildPythonPackage rec {
pname = "kaitaistruct";
version = "0.11";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-BT7nZCiOeLjlOs90jpczJorL1Xm42CpCexgFRTYl10s=";
};
patches = [ ./01-add-kaitai-compress.patch ];
preBuild = ''
ln -s ${kaitai_compress}/python/kaitai kaitai
'';
build-system = [ setuptools ];
propagatedBuildInputs = [
brotli
lz4
];
doCheck = false; # no tests in upstream
pythonImportsCheck = [
"kaitaistruct"
"kaitai.compress"
];
meta = {
description = "Kaitai Struct: runtime library for Python";
homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime";
license = lib.licenses.mit;
maintainers = [ ];
};
}