blob: 6e9e169ace5ee19c7d5a0b582d22faf5ae7097f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, ipython
, py3nvml
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "watermark";
version = "2.4.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "rasbt";
repo = "watermark";
rev = "refs/tags/v${version}";
hash = "sha256-4/1Y7cdh1tF33jgPrqdxCGPcRnnxx+Wf8lyztF54Ck0=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
ipython
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
passthru.optional-dependencies = {
gpu = [
py3nvml
];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"watermark"
];
meta = with lib; {
description = "IPython extension for printing date and timestamps, version numbers, and hardware information";
homepage = "https://github.com/rasbt/watermark";
changelog = "https://github.com/rasbt/watermark/releases/tag/v${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ nphilou ];
};
}
|