nixpkgs/pkgs/development/python-modules/construct-classes/default.nix
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

46 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
construct,
fetchFromGitHub,
fetchpatch2,
pytestCheckHook,
uv-build,
}:
buildPythonPackage rec {
pname = "construct-classes";
version = "0.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "matejcik";
repo = "construct-classes";
tag = "v${version}";
hash = "sha256-goOQMt/nVjWXYltpnKHtJaLOhR+gRTmtoUh7zVb7go4=";
};
patches = [
(fetchpatch2 {
name = "uv-build.patch";
url = "https://github.com/matejcik/construct-classes/commit/d1ecacc0cf5cb332ffe6ed85ce9dfc552f77231f.patch?full_index=1";
hash = "sha256-VeifL8bER0mIRNXKTA+/cje8AxWJKg/q8ipmf3gTeiw=";
})
];
build-system = [ uv-build ];
dependencies = [ construct ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "construct_classes" ];
meta = {
description = "Parse your binary data into dataclasses";
homepage = "https://github.com/matejcik/construct-classes";
changelog = "https://github.com/matejcik/construct-classes/blob/${src.tag}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ prusnak ];
};
}