1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "filecheck";
10 version = "0.0.23";
11 format = "pyproject";
12
13 src = fetchFromGitHub {
14 owner = "mull-project";
15 repo = "FileCheck.py";
16 rev = "refs/tags/v${version}";
17 hash = "sha256-R+e4Z1EX6Nk7INLar3gtkUpk+30xIJO7yiZbUvrhN74=";
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 nativeCheckInputs = [
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}