nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatchling,
6 numpy,
7 platformdirs,
8 pytestCheckHook,
9 typing-extensions,
10 siphash24,
11}:
12
13buildPythonPackage rec {
14 pname = "pytools";
15 version = "2025.2.5";
16 pyproject = true;
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-p/U1BkTUbZjunH5ntLQWkzCKoPXpsYjY8GlLJ9yU46I=";
21 };
22
23 build-system = [ hatchling ];
24
25 dependencies = [
26 platformdirs
27 siphash24
28 typing-extensions
29 ];
30
31 optional-dependencies = {
32 numpy = [ numpy ];
33 };
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "pytools"
41 "pytools.lex"
42 ];
43
44 meta = {
45 description = "Miscellaneous Python lifesavers";
46 homepage = "https://github.com/inducer/pytools/";
47 changelog = "https://github.com/inducer/pytools/releases/tag/v${version}";
48 license = lib.licenses.mit;
49 maintainers = [ ];
50 };
51}