nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 importlib-metadata,
6 ipython,
7 py3nvml,
8 pytestCheckHook,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "watermark";
14 version = "2.6.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "rasbt";
19 repo = "watermark";
20 tag = "v${version}";
21 hash = "sha256-WeHMzSt4HUJZ9M9/Yu1h3VB5GuD/I9x+v6VyUhsmFhU=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [
27 ipython
28 importlib-metadata
29 ];
30
31 optional-dependencies = {
32 gpu = [ py3nvml ];
33 };
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ]
38 ++ lib.concatAttrValues optional-dependencies;
39
40 pythonImportsCheck = [ "watermark" ];
41
42 meta = {
43 description = "IPython extension for printing date and timestamps, version numbers, and hardware information";
44 homepage = "https://github.com/rasbt/watermark";
45 changelog = "https://github.com/rasbt/watermark/releases/tag/${src.tag}";
46 license = lib.licenses.bsd3;
47 maintainers = with lib.maintainers; [ nphilou ];
48 };
49}