Merge pull request #211934 from fabaff/yamlfix-fix

python310Packages.yamlfix: 0.8.2 -> 1.5.0
This commit is contained in:
Fabian Affolter 2023-01-22 09:24:06 +01:00 committed by GitHub
commit 9fc39a81c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 10 deletions

View File

@ -0,0 +1,51 @@
{ lib
, buildPythonPackage
, click
, fetchFromGitHub
, poetry-core
, pydantic
, pytestCheckHook
, pythonOlder
, toml
}:
buildPythonPackage rec {
pname = "maison";
version = "1.4.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "dbatten5";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Ny/n1vDWS6eA9zLIB0os5zrbwvutb+7sQ6iPXeid1M0=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
click
pydantic
toml
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"maison"
];
meta = with lib; {
description = "Library to read settings from config files";
homepage = "https://github.com/dbatten5/maison";
changelog = "https://github.com/dbatten5/maison/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -2,28 +2,37 @@
, buildPythonPackage
, click
, fetchFromGitHub
, maison
, pdm-pep517
, pytest-xdist
, pytestCheckHook
, pythonOlder
, ruyaml
, setuptools
}:
buildPythonPackage rec {
pname = "yamlfix";
version = "0.8.2";
format = "setuptools";
version = "1.5.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "lyz-code";
repo = pname;
rev = version;
sha256 = "sha256-YCC4xK1fB5Gyv32JhbSuejtzLNMRnH7iyUpzccVijS0=";
rev = "refs/tags/${version}";
hash = "sha256-TdW2vVj5wZw8xANSRY8ke1ECw8UTDwRjJDD1g+p9DV4=";
};
nativeBuildInputs = [
setuptools
pdm-pep517
];
propagatedBuildInputs = [
click
maison
ruyaml
];
@ -32,11 +41,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'python_paths = "."' ""
'';
pythonImportsCheck = [
"yamlfix"
];
@ -44,7 +48,8 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python YAML formatter that keeps your comments";
homepage = "https://github.com/lyz-code/yamlfix";
license = licenses.gpl3Plus;
changelog = "https://github.com/lyz-code/yamlfix/blob/${version}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ koozz ];
};
}

View File

@ -5610,6 +5610,8 @@ self: super: with self; {
mailsuite = callPackage ../development/python-modules/mailsuite { };
maison = callPackage ../development/python-modules/maison { };
Mako = callPackage ../development/python-modules/Mako { };
malduck= callPackage ../development/python-modules/malduck { };