1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, poetry-core 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "filecheck"; 10 version = "0.0.22"; 11 format = "pyproject"; 12 13 src = fetchFromGitHub { 14 owner = "mull-project"; 15 repo = "FileCheck.py"; 16 rev = "v${version}"; 17 sha256 = "sha256-I2SypKkgcVuLyLiwNw5oWDb9qT56TbC6vbui8PEcziI="; 18 }; 19 20 postPatch = '' 21 substituteInPlace pyproject.toml \ 22 --replace "poetry>=0.12" "poetry-core" \ 23 --replace "poetry.masonry.api" "poetry.core.masonry.api" 24 ''; 25 26 nativeBuildInputs = [ 27 poetry-core 28 ]; 29 30 checkInputs = [ 31 pytestCheckHook 32 ]; 33 34 pythonImportsCheck = [ 35 "filecheck" 36 ]; 37 38 meta = with lib; { 39 homepage = "https://github.com/mull-project/FileCheck.py"; 40 license = licenses.asl20; 41 description = "Python port of LLVM's FileCheck, flexible pattern matching file verifier"; 42 maintainers = with maintainers; [ yorickvp ]; 43 }; 44}