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

44 lines
843 B
Nix

{
lib,
fetchPypi,
buildPythonPackage,
# build-system
setuptools,
setuptools-scm,
# tests
pytest7CheckHook,
}:
buildPythonPackage rec {
pname = "makefun";
version = "1.16.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-4UYBgxVwv/H21+aIKLzTDS9YVvJLrV3gzLIpIc7ryUc=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools>=39.2,<72"' '"setuptools"'
'';
build-system = [
setuptools
setuptools-scm
];
nativeCheckInputs = [ pytest7CheckHook ];
pythonImportsCheck = [ "makefun" ];
meta = {
homepage = "https://github.com/smarie/python-makefun";
description = "Small library to dynamically create python functions";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ veehaitch ];
};
}