mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
Merge pull request #321212 from fabaff/ufmt-bump
python312Packages.ufmt: 2.1.0 -> 2.7.0
This commit is contained in:
commit
190e9e5ee0
2932
pkgs/development/python-modules/ruff-api/Cargo.lock
generated
Normal file
2932
pkgs/development/python-modules/ruff-api/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
60
pkgs/development/python-modules/ruff-api/default.nix
Normal file
60
pkgs/development/python-modules/ruff-api/default.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
cargo,
|
||||
darwin,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
rustc,
|
||||
rustPlatform,
|
||||
ufmt,
|
||||
usort,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ruff-api";
|
||||
version = "0.0.6";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "amyreese";
|
||||
repo = "ruff-api";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-nZKf0LpCoYwWoLDGoorJ+zQSLyuxfWu3LOygocVlYSs=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"ruff-0.3.7" = "sha256-PS4YJpVut+KtEgSlTVtoVdlu6FVipPIzsl01/Io5N64=";
|
||||
};
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo
|
||||
rustPlatform.cargoSetupHook
|
||||
rustPlatform.maturinBuildHook
|
||||
rustc
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.CoreFoundation
|
||||
darwin.apple_sdk.frameworks.CoreServices
|
||||
];
|
||||
|
||||
# Tests have issues at the moment, check with next update
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "ruff_api" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Experimental Python API for Ruff";
|
||||
homepage = "https://github.com/amyreese/ruff-api";
|
||||
changelog = "https://github.com/amyreese/ruff-api/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -7,9 +7,11 @@
|
||||
flit-core,
|
||||
libcst,
|
||||
moreorless,
|
||||
pygls,
|
||||
pythonOlder,
|
||||
tomlkit,
|
||||
trailrunner,
|
||||
ruff-api,
|
||||
typing-extensions,
|
||||
unittestCheckHook,
|
||||
usort,
|
||||
@ -17,21 +19,21 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ufmt";
|
||||
version = "2.1.0";
|
||||
format = "pyproject";
|
||||
version = "2.7.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
disabled = pythonOlder "3.";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "omnilib";
|
||||
repo = "ufmt";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-eQIbSC0Oxi6JD7/3o2y9f+KhT8GIiFiYiV4A3QBoWl0=";
|
||||
hash = "sha256-hIbzW7yDqk8siob+RhcnbOonkl+67sl/IGHimIeMM+Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
build-system = [ flit-core ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
black
|
||||
click
|
||||
libcst
|
||||
@ -42,16 +44,23 @@ buildPythonPackage rec {
|
||||
usort
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ unittestCheckHook ];
|
||||
passthru.optional-dependencies = {
|
||||
lsp = [ pygls ];
|
||||
ruff = [ ruff-api ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
unittestCheckHook
|
||||
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||
|
||||
pythonImportsCheck = [ "ufmt" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Safe, atomic formatting with black and usort";
|
||||
mainProgram = "ufmt";
|
||||
homepage = "https://github.com/omnilib/ufmt";
|
||||
changelog = "https://github.com/omnilib/ufmt/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
mainProgram = "ufmt";
|
||||
};
|
||||
}
|
||||
|
@ -13586,6 +13586,8 @@ self: super: with self; {
|
||||
|
||||
rubymarshal = callPackage ../development/python-modules/rubymarshal { };
|
||||
|
||||
ruff-api = callPackage ../development/python-modules/ruff-api { };
|
||||
|
||||
ruffus = callPackage ../development/python-modules/ruffus { };
|
||||
|
||||
rules = callPackage ../development/python-modules/rules { };
|
||||
|
Loading…
Reference in New Issue
Block a user