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 ] 41 ++ lib.flatten (builtins.attrValues optional-dependencies); 42 43 pythonImportsCheck = [ "watermark" ]; 44 45 meta = with lib; { 46 description = "IPython extension for printing date and timestamps, version numbers, and hardware information"; 47 homepage = "https://github.com/rasbt/watermark"; 48 changelog = "https://github.com/rasbt/watermark/releases/tag/v${version}"; 49 license = licenses.bsd3; 50 maintainers = with maintainers; [ nphilou ]; 51 }; 52}