1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "in-place";
12 version = "1.0.0";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromGitHub {
18 owner = "jwodder";
19 repo = "inplace";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-TfWfSb1GslzcT30/xvBg5Xui7ptp7+g89Fq/giLCoQ8=";
22 };
23
24 postPatch = ''
25 substituteInPlace tox.ini --replace "--cov=in_place --no-cov-on-fail" ""
26 '';
27
28 nativeBuildInputs = [ setuptools ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "in_place" ];
33
34 meta = with lib; {
35 description = "In-place file processing";
36 homepage = "https://github.com/jwodder/inplace";
37 changelog = "https://github.com/jwodder/inplace/blob/v${version}/CHANGELOG.md";
38 license = licenses.mit;
39 maintainers = with maintainers; [ samuela ];
40 };
41}