mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
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>
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
|
|
# build-system
|
|
babel,
|
|
hatchling,
|
|
setuptools,
|
|
|
|
# dependencies
|
|
markupsafe,
|
|
|
|
# optional-dependencies
|
|
email-validator,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "wtforms";
|
|
version = "3.2.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wtforms";
|
|
repo = "wtforms";
|
|
tag = version;
|
|
hash = "sha256-jwjP/wkk8MdNJbPE8MlkrH4DyR304Ju41nN4lMo3jFs=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
babel
|
|
hatchling
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [ markupsafe ];
|
|
|
|
optional-dependencies = {
|
|
email = [ email-validator ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
]
|
|
++ lib.concatAttrValues optional-dependencies;
|
|
|
|
pythonImportsCheck = [ "wtforms" ];
|
|
|
|
meta = {
|
|
description = "Flexible forms validation and rendering library for Python";
|
|
homepage = "https://github.com/wtforms/wtforms";
|
|
changelog = "https://github.com/wtforms/wtforms/blob/${version}/CHANGES.rst";
|
|
license = lib.licenses.bsd3;
|
|
};
|
|
}
|