2021-09-23 15:35:13 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, pytestCheckHook
|
2023-10-19 13:55:26 +00:00
|
|
|
, pythonOlder
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-09-23 15:35:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "in-place";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.0.0";
|
2021-09-23 15:35:13 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jwodder";
|
|
|
|
repo = "inplace";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-TfWfSb1GslzcT30/xvBg5Xui7ptp7+g89Fq/giLCoQ8=";
|
2021-09-23 15:35:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tox.ini --replace "--cov=in_place --no-cov-on-fail" ""
|
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-09-23 15:35:13 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "in_place" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "In-place file processing";
|
|
|
|
homepage = "https://github.com/jwodder/inplace";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/jwodder/inplace/blob/v${version}/CHANGELOG.md";
|
2021-09-23 15:35:13 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ samuela ];
|
|
|
|
};
|
|
|
|
}
|