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