Files
nixpkgs/pkgs/development/python-modules/apischema/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

54 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
graphql-core,
pytest-asyncio,
pytest8_3CheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "apischema";
version = "0.18.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "wyfo";
repo = "apischema";
tag = "v${version}";
hash = "sha256-YFJbNxCwDrJb603Bf8PDrvhVt4T53PNWOYs716c0f1I=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools==75.1.0" "setuptools" \
--replace-fail "wheel~=0.44.0" "wheel"
'';
build-system = [ setuptools ];
optional-dependencies = {
graphql = [ graphql-core ];
};
nativeCheckInputs = [
pytest-asyncio
pytest8_3CheckHook
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "apischema" ];
meta = {
description = "JSON (de)serialization, GraphQL and JSON schema generation using typing";
homepage = "https://github.com/wyfo/apischema";
changelog = "https://github.com/wyfo/apischema/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}