python3Packages.stream-unzip: init at 0.0.101

Python function to stream unzip all the files in a ZIP archive
on the fly

https://github.com/uktrade/stream-unzip
This commit is contained in:
Fabian Affolter
2026-08-21 21:14:13 +02:00
parent 41113aac48
commit ced16cd2e1
2 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
{
lib,
buildPythonPackage,
cargo,
fetchFromGitHub,
nix-update-script,
pycryptodome,
pyprojectVersionPatchHook,
rustc,
rustPlatform,
stream-inflate,
trio,
}:
buildPythonPackage (finalAttrs: {
pname = "stream-unzip";
version = "0.0.101";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "uktrade";
repo = "stream-unzip";
tag = "v${finalAttrs.version}";
hash = "sha256-JTMJdc61wR2nqYq3BMkLgi+krKsDUKBAgzbqlvYx8L0=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-CKtu4ERN0L7XoZxFAQhgZSymLqGkBdP0eSy9DhFPwZk=";
};
build-system = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];
nativeBuildInputs = [ pyprojectVersionPatchHook ];
dependencies = [
pycryptodome
stream-inflate
];
optional-dependencies = {
ci = [
pycryptodome
stream-inflate
];
};
# Module has no tests
doCheck = false;
pythonImportsCheck = [ "stream_unzip" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Python function to stream unzip all the files in a ZIP archive on the fly";
homepage = "https://github.com/uktrade/stream-unzip";
changelog = "https://github.com/uktrade/stream-unzip/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
})

View File

@@ -19954,6 +19954,8 @@ self: super: with self; {
stream-inflate = callPackage ../development/python-modules/stream-inflate { };
stream-unzip = callPackage ../development/python-modules/stream-unzip { };
streamcontroller-plugin-tools =
callPackage ../development/python-modules/streamcontroller-plugin-tools
{ };