blob: 9e717ea08dfa2736ed6c72282e1d6bb3be0a94bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{
lib,
stdenv,
buildPythonPackage,
cargo,
fetchFromGitHub,
libiconv,
rustc,
rustPlatform,
}:
buildPythonPackage rec {
pname = "ruff-api";
version = "0.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "amyreese";
repo = "ruff-api";
tag = "v${version}";
hash = "sha256-4ekNPgOOqRIVjIR8LNSALE7fByjMEn8y25y9Rdvf+ms=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-SqouHcEDehxNnNPdrkDUYx8AieHiPMs04RgrkdqYcpU=";
};
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
# Tests have issues at the moment, check with next update
doCheck = false;
pythonImportsCheck = [ "ruff_api" ];
meta = {
description = "Experimental Python API for Ruff";
homepage = "https://github.com/amyreese/ruff-api";
changelog = "https://github.com/amyreese/ruff-api/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|