Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, atomicwrites 3, buildPythonPackage 4, fetchFromGitHub 5 #, hatchling 6, ruamel-yaml 7, poetry-core 8, pytest 9, pytest-asyncio 10, pytestCheckHook 11, pythonOlder 12, pythonRelaxDepsHook 13, testfixtures 14}: 15 16buildPythonPackage rec { 17 pname = "pytest-golden"; 18 version = "0.2.2"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchFromGitHub { 24 owner = "oprypin"; 25 repo = pname; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-l5fXWDK6gWJc3dkYFTokI9tWvawMRnF0td/lSwqkYXE="; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace "poetry>=0.12" poetry-core \ 33 --replace poetry.masonry.api poetry.core.masonry.api 34 ''; 35 36 pythonRelaxDeps = [ 37 "testfixtures" 38 ]; 39 40 nativeBuildInputs = [ 41 # hatchling used for > 0.2.2 42 poetry-core 43 pythonRelaxDepsHook 44 ]; 45 46 buildInputs = [ 47 pytest 48 ]; 49 50 propagatedBuildInputs = [ 51 atomicwrites 52 ruamel-yaml 53 testfixtures 54 ]; 55 56 nativeCheckInputs = [ 57 pytest-asyncio 58 pytestCheckHook 59 ]; 60 61 pythonImportsCheck = [ 62 "pytest_golden" 63 ]; 64 65 meta = with lib; { 66 description = "Plugin for pytest that offloads expected outputs to data files"; 67 homepage = "https://github.com/oprypin/pytest-golden"; 68 license = licenses.mit; 69 maintainers = with maintainers; [ fab ]; 70 }; 71}