1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

pylint: add module (#2729)

This commit is contained in:
florpe 2022-04-11 03:54:04 +02:00 committed by GitHub
parent f911ebbec9
commit e39a9d0103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 0 deletions

2
.github/CODEOWNERS vendored
View file

@ -210,6 +210,8 @@
/modules/programs/pubs.nix @loicreynier
/tests/modules/programs/pubs @loicreynier
/modules/programs/pylint.nix @florpe
/modules/programs/rbw.nix @ambroisie
/tests/modules/programs/rbw @ambroisie

View file

@ -123,6 +123,12 @@
githubId = 46252070;
name = "Sara Johnsson";
};
florpe = {
email = "jens.krewald@gmail.com";
github = "florpe";
githubId = 53856373;
name = "Jens Krewald";
};
maximsmol = {
email = "maximsmol@gmail.com";
github = "maximsmol";

View file

@ -131,6 +131,7 @@ let
./programs/piston-cli.nix
./programs/powerline-go.nix
./programs/pubs.nix
./programs/pylint.nix
./programs/qutebrowser.nix
./programs/rbw.nix
./programs/readline.nix

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.pylint;
listToValue = concatMapStringsSep ", " (generators.mkValueStringDefault { });
iniFormat = pkgs.formats.ini { inherit listToValue; };
in {
meta.maintainers = [ hm.maintainers.florpe ];
options.programs.pylint = {
enable = mkEnableOption "the pylint Python linter";
package = mkOption {
type = types.package;
default = pkgs.python3Packages.pylint;
defaultText = literalExpression "pkgs.python3Packages.pylint";
description = "The pylint package to use.";
};
settings = mkOption {
type = iniFormat.type;
default = { };
defaultText = literalExpression "{}";
description = "The pylint configuration.";
};
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
home.file.".pylintrc".source = iniFormat.generate "pylintrc" cfg.settings;
};
}