nixpkgs/pkgs/development/python-modules/dvc-render/default.nix
2023-01-05 01:09:00 +01:00

64 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, funcy
, matplotlib
, tabulate
, pytestCheckHook
, pytest-mock
, pytest-test-utils
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "dvc-render";
version = "0.0.17";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "iterative";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-GDfrkcKP/EZZ/ONZ2Afoxj4Q8sp8mRmtZf93kXcNQcg=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
passthru.optional-dependencies = {
table = [
tabulate
];
markdown = [
tabulate
matplotlib
];
};
checkInputs = [
funcy
pytestCheckHook
pytest-mock
pytest-test-utils
]
++ passthru.optional-dependencies.table
++ passthru.optional-dependencies.markdown;
pythonImportsCheck = [
"dvc_render"
];
meta = with lib; {
description = "Library for rendering DVC plots";
homepage = "https://github.com/iterative/dvc-render";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}