Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 61 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cargo, 6 darwin, 7 fetchFromGitHub, 8 libiconv, 9 pythonOlder, 10 rustc, 11 rustPlatform, 12}: 13 14buildPythonPackage rec { 15 pname = "ruff-api"; 16 version = "0.1.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "amyreese"; 23 repo = "ruff-api"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-1XULyxu3XujhAcFnvqI5zMiXOc0axx1LS4EevjhoGDc="; 26 }; 27 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 }; 35 36 nativeBuildInputs = [ 37 cargo 38 rustPlatform.cargoSetupHook 39 rustPlatform.maturinBuildHook 40 rustc 41 ]; 42 43 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 44 darwin.apple_sdk.frameworks.CoreFoundation 45 darwin.apple_sdk.frameworks.CoreServices 46 libiconv 47 ]; 48 49 # Tests have issues at the moment, check with next update 50 doCheck = false; 51 52 pythonImportsCheck = [ "ruff_api" ]; 53 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 }; 61}