mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / ruff-api / default.nix
blobeb4e1234a57b9715eb56a5538d9e1478fc4cd7f6
2   lib,
3   stdenv,
4   buildPythonPackage,
5   cargo,
6   darwin,
7   fetchFromGitHub,
8   libiconv,
9   pythonOlder,
10   rustc,
11   rustPlatform,
14 buildPythonPackage rec {
15   pname = "ruff-api";
16   version = "0.1.0";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "amyreese";
23     repo = "ruff-api";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-1XULyxu3XujhAcFnvqI5zMiXOc0axx1LS4EevjhoGDc=";
26   };
28   cargoDeps = rustPlatform.importCargoLock {
29     lockFile = ./Cargo.lock;
30     outputHashes = {
31       "lsp-types-0.95.1" = "sha256-8Oh299exWXVi6A39pALOISNfp8XBya8z+KT/Z7suRxQ=";
32       "ruff-0.4.10" = "sha256-FRBuvXtnbxRWoI0f8SM0U0Z5TRyX5Tbgq3d34Oh2bG4=";
33     };
34   };
36   nativeBuildInputs = [
37     cargo
38     rustPlatform.cargoSetupHook
39     rustPlatform.maturinBuildHook
40     rustc
41   ];
43   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
44     darwin.apple_sdk.frameworks.CoreFoundation
45     darwin.apple_sdk.frameworks.CoreServices
46     libiconv
47   ];
49   # Tests have issues at the moment, check with next update
50   doCheck = false;
52   pythonImportsCheck = [ "ruff_api" ];
54   meta = with lib; {
55     description = "Experimental Python API for Ruff";
56     homepage = "https://github.com/amyreese/ruff-api";
57     changelog = "https://github.com/amyreese/ruff-api/blob/${src.rev}/CHANGELOG.md";
58     license = licenses.mit;
59     maintainers = with maintainers; [ fab ];
60   };