grimm-nixos-laptop/common/tooling/python.nix

49 lines
994 B
Nix
Raw Normal View History

2024-05-07 23:31:41 +02:00
{
pkgs,
config,
lib,
...
}:
let
cfg = config.grimmShared;
in
{
2024-05-07 23:31:41 +02:00
config =
with cfg;
lib.mkIf (enable && tooling.enable) {
environment.systemPackages =
with pkgs;
2024-05-11 11:37:59 +02:00
[
(python3.withPackages (
python-pkgs: with python-pkgs; [
requests
matplotlib
numpy
scipy
pygobject3
]
))
]
++ lib.optionals cfg.graphical [ jetbrains.pycharm-community ];
2024-05-07 23:31:41 +02:00
programs.xonsh = {
enable = true;
2024-05-08 21:50:08 +02:00
config = lib.concatLines (
lib.mapAttrsToList (
name: value: ''aliases["${name}"] = "${value}"''
) config.environment.shellAliases
);
2024-05-11 11:37:59 +02:00
package = pkgs.xonsh.wrapper.override {
2024-05-07 23:31:41 +02:00
extraPackages =
ps: with ps; [
requests
matplotlib
numpy
scipy
pygobject3
];
};
};
};
}