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