diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 18032c354f0c1..16b251667b77d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -18497,6 +18497,13 @@ githubId = 246631; keys = [ { fingerprint = "3E46 7EF1 54AA A1D0 C7DF A694 E45C B17F 1940 CA52"; } ]; }; + prestonhager = { + name = "Preston Hager"; + email = "preston@hagerfamily.com"; + github = "PrestonHager"; + githubId = 15862207; + keys = [ { fingerprint = "3C5C CAEA 1F71 F5A0 29C0 98F5 F2FF 516B 32A2 B82E"; } ]; + }; priegger = { email = "philipp@riegger.name"; github = "priegger"; diff --git a/pkgs/by-name/li/lintrunner/package.nix b/pkgs/by-name/li/lintrunner/package.nix new file mode 100644 index 0000000000000..4fa26737f39d8 --- /dev/null +++ b/pkgs/by-name/li/lintrunner/package.nix @@ -0,0 +1,52 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + rustPlatform, + cargo, + rustc, +}: + +python3Packages.buildPythonApplication rec { + pname = "lintrunner"; + version = "0.12.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "suo"; + repo = "lintrunner"; + rev = "f05b0a3f56fbc183b11347a2a879e2009fc982b7"; + hash = "sha256-/kNySvqCwfWPRITJEZ+8akQa+ZW7gfo2aOGDyvsRs9E="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + hash = "sha256-+ZuOWIbN5+ZfzpMu5AC449sXrC3ohw1+tNb681VgCww="; + }; + + # Adding maturninBuildHook will automatically build and install the executable + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + cargo + rustc + ]; + + build-system = [ rustPlatform.maturinBuildHook ]; + + meta = { + description = "Tool that runs linters"; + longDescription = '' + Runs linters by deciding which files need to be linted, invoking linters + according to a common protocol, and gathering results and presenting them + to users. + ''; + homepage = "https://github.com/suo/lintrunner"; + changelog = "https://github.com/suo/lintrunner/releases/tag/v${version}"; + mainProgram = "lintrunner"; + license = [ + lib.licenses.mit + lib.licenses.bsd3 + ]; + maintainers = with lib.maintainers; [ prestonhager ]; + }; +}