summary refs log tree commit diff
path: root/pkgs/development/python-modules/watermark/default.nix
blob: 6cb717679d1ae1e251b053ce4b9332cb5e77ead5 (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
{ lib
, fetchFromGitHub
, buildPythonPackage
, importlib-metadata
, ipython
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "watermark";
  version = "2.3.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "rasbt";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-E3UxdGlxTcvkiKa3RoG9as6LybyW+QrCUZvA9VHwxlk=";
  };

  propagatedBuildInputs = [
    ipython
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ];

  nativeCheckInputs =  [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "watermark"
  ];

  meta = with lib; {
    description = "IPython extension for printing date and timestamps, version numbers, and hardware information";
    homepage = "https://github.com/rasbt/watermark";
    license = licenses.bsd3;
    maintainers = with maintainers; [ nphilou ];
  };
}