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