2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, ruyaml
|
|
|
|
}:
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yamlfix";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "0.8.2";
|
2021-12-30 13:39:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lyz-code";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-YCC4xK1fB5Gyv32JhbSuejtzLNMRnH7iyUpzccVijS0=";
|
2021-12-24 04:21:11 +00:00
|
|
|
};
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
ruyaml
|
|
|
|
];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'python_paths = "."' ""
|
|
|
|
'';
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"yamlfix"
|
|
|
|
];
|
2021-12-24 04:21:11 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-30 13:39:12 +00:00
|
|
|
description = "Python YAML formatter that keeps your comments";
|
2021-12-24 04:21:11 +00:00
|
|
|
homepage = "https://github.com/lyz-code/yamlfix";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ koozz ];
|
|
|
|
};
|
|
|
|
}
|