46 lines
966 B
Nix
46 lines
966 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.grimmShared) enable tooling graphical;
|
|
pyLibs =
|
|
python-pkgs: with python-pkgs; [
|
|
requests
|
|
matplotlib
|
|
numpy
|
|
scipy
|
|
pygobject3
|
|
];
|
|
in
|
|
{
|
|
config = lib.mkIf (enable && tooling.enable) {
|
|
environment.systemPackages = [
|
|
(pkgs.python3.withPackages pyLibs)
|
|
] ++ lib.optionals graphical (with pkgs; [ jetbrains.pycharm-community ]);
|
|
|
|
programs.xonsh = {
|
|
enable = true;
|
|
config = lib.concatLines (
|
|
lib.mapAttrsToList (
|
|
name: value: "aliases[\"${name}\"] = '''${value}'''"
|
|
) config.environment.shellAliases
|
|
);
|
|
# package = pkgs.xonsh.wrapper.override { extraPackages = pyLibs; };
|
|
};
|
|
|
|
grimmShared.tooling.lang_servers = [
|
|
{
|
|
lsp.package = pkgs.pyright;
|
|
fmt = {
|
|
package = pkgs.yapf;
|
|
includes = [ "*.py" ];
|
|
options = [ "-i" ];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|