Files
nixpkgs/pkgs/development/python-modules/mpl-scatter-density/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

66 lines
1.3 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
pytestCheckHook,
fetchFromGitHub,
setuptools-scm,
setuptools,
fast-histogram,
matplotlib,
numpy,
wheel,
pytest-mpl,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "mpl-scatter-density";
version = "0.8";
pyproject = true;
src = fetchFromGitHub {
owner = "astrofrog";
repo = "mpl-scatter-density";
tag = "v${version}";
hash = "sha256-pDiKJAN/4WFf5icNU/ZGOvw0jqN3eGZHgilm2oolpbE=";
};
build-system = [
setuptools
setuptools-scm
wheel
];
dependencies = [
matplotlib
numpy
fast-histogram
];
nativeCheckInputs = [
pytestCheckHook
pytest-mpl
writableTmpDirAsHomeHook
];
# Need to set MPLBACKEND=agg for headless `matplotlib` on darwin.
# https://github.com/matplotlib/matplotlib/issues/26292
env.MPLBACKEND = lib.optionalString stdenv.hostPlatform.isDarwin "agg";
disabledTests = [
# AssertionError: (240, 240) != (216, 216)
# Erroneous pinning of figure DPI, sensitive to runtime environment
"test_default_dpi"
];
pythonImportsCheck = [ "mpl_scatter_density" ];
meta = {
homepage = "https://github.com/astrofrog/mpl-scatter-density";
description = "Fast scatter density plots for Matplotlib";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ifurther ];
};
}