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

74 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
hatch-vcs,
hatchling,
interface-meta,
narwhals,
numpy,
pandas,
scipy,
typing-extensions,
wrapt,
pyarrow,
polars,
sympy,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "formulaic";
version = "1.2.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "matthewwardrop";
repo = "formulaic";
tag = "v${version}";
hash = "sha256-mZt+cwk/AaUmmeCj7aLu1QEBqlPUVUqQbYdgETMj/vY=";
};
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
build-system = [
hatchling
hatch-vcs
];
dependencies = [
narwhals
numpy
pandas
scipy
wrapt
typing-extensions
interface-meta
];
optional-dependencies = {
arrow = [ pyarrow ];
polars = [ polars ];
calculus = [ sympy ];
};
nativeCheckInputs = [
pytestCheckHook
]
++ optional-dependencies.arrow
++ optional-dependencies.calculus;
pythonImportsCheck = [ "formulaic" ];
meta = {
description = "High-performance implementation of Wilkinson formulas";
homepage = "https://matthewwardrop.github.io/formulaic/";
changelog = "https://github.com/matthewwardrop/formulaic/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ swflint ];
};
}