mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 19:23:50 +00:00
4b6fe282c4
Diff: https://github.com/charliermarsh/ruff/compare/v0.0.243...v0.0.244 Changelog: https://github.com/charliermarsh/ruff/releases/tag/v0.0.244
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ruff";
|
|
version = "0.0.244";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "charliermarsh";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-oQBNVs7hoiXNqz5lYq5YNKHfpQ/c8LZAvNvtFqpTM2E=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-61kypAXWfUZLfTbSp+b0gCKwuWtxAYVtKIwfVOcJ2o8=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
];
|
|
|
|
# building tests fails with `undefined symbols`
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd ruff \
|
|
--bash <($out/bin/ruff generate-shell-completion bash) \
|
|
--fish <($out/bin/ruff generate-shell-completion fish) \
|
|
--zsh <($out/bin/ruff generate-shell-completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An extremely fast Python linter";
|
|
homepage = "https://github.com/charliermarsh/ruff";
|
|
changelog = "https://github.com/charliermarsh/ruff/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|