2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, packaging
|
|
|
|
, pytest
|
|
|
|
, setuptools-scm
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-snapshot";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.8.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joseph-roitman";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-ymB9h3Mc6GSMRsxIh6uuf111qLvIkNAnFsxR6O2SF7s=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pytest_snapshot"
|
|
|
|
];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A plugin to enable snapshot testing with pytest";
|
|
|
|
homepage = "https://github.com/joseph-roitman/pytest-snapshot/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|