2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, ipython
|
2024-01-02 11:29:13 +00:00
|
|
|
, py3nvml
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "watermark";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.4.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rasbt";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "watermark";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-4/1Y7cdh1tF33jgPrqdxCGPcRnnxx+Wf8lyztF54Ck0=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipython
|
2022-06-16 17:23:12 +00:00
|
|
|
importlib-metadata
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
gpu = [
|
|
|
|
py3nvml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"watermark"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "IPython extension for printing date and timestamps, version numbers, and hardware information";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/rasbt/watermark";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/rasbt/watermark/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ nphilou ];
|
|
|
|
};
|
|
|
|
}
|