nixpkgs/pkgs/development/python-modules/yamlfix/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
894 B
Nix
Raw Normal View History

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