mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
45 lines
895 B
Nix
45 lines
895 B
Nix
{ 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 ];
|
|
};
|
|
}
|