Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 64 lines 1.3 kB view raw
1{ 2 lib, 3 atomicwrites, 4 buildPythonPackage, 5 fetchFromGitHub, 6 #, hatchling 7 ruamel-yaml, 8 poetry-core, 9 pytest, 10 pytest-asyncio, 11 pytestCheckHook, 12 pythonOlder, 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 = [ "testfixtures" ]; 37 38 nativeBuildInputs = [ 39 # hatchling used for > 0.2.2 40 poetry-core 41 ]; 42 43 buildInputs = [ pytest ]; 44 45 propagatedBuildInputs = [ 46 atomicwrites 47 ruamel-yaml 48 testfixtures 49 ]; 50 51 nativeCheckInputs = [ 52 pytest-asyncio 53 pytestCheckHook 54 ]; 55 56 pythonImportsCheck = [ "pytest_golden" ]; 57 58 meta = with lib; { 59 description = "Plugin for pytest that offloads expected outputs to data files"; 60 homepage = "https://github.com/oprypin/pytest-golden"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ fab ]; 63 }; 64}