global/programming: move python packages into separate option
This commit is contained in:
parent
09b7f83b97
commit
b676e832dc
2 changed files with 23 additions and 14 deletions
|
@ -32,7 +32,12 @@ rec {
|
||||||
in
|
in
|
||||||
coercedTo packageListType flatten (listOf package);
|
coercedTo packageListType flatten (listOf package);
|
||||||
|
|
||||||
|
coercedPackageListFunction =
|
||||||
|
with types;
|
||||||
|
coercedTo coercedPackageList (v: (_: v)) (functionTo coercedPackageList);
|
||||||
|
|
||||||
packageListOpt = mkOpt coercedPackageList [ ];
|
packageListOpt = mkOpt coercedPackageList [ ];
|
||||||
|
packageListFunctionOpt = mkOpt coercedPackageListFunction [ ];
|
||||||
|
|
||||||
addPackageLists = lib.mapAttrs (
|
addPackageLists = lib.mapAttrs (
|
||||||
name: value:
|
name: value:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) flip;
|
inherit (lib) flip;
|
||||||
inherit (lib.our) mkBoolOpt' addPackageLists;
|
inherit (lib.our) mkBoolOpt' packageListFunctionOpt addPackageLists;
|
||||||
|
|
||||||
cfg = config.universe.programming;
|
cfg = config.universe.programming;
|
||||||
|
|
||||||
|
@ -24,7 +24,10 @@ in
|
||||||
java.enable = programmingOpt "Java";
|
java.enable = programmingOpt "Java";
|
||||||
lua.enable = programmingOpt "Lua";
|
lua.enable = programmingOpt "Lua";
|
||||||
nim.enable = programmingOpt "Nim";
|
nim.enable = programmingOpt "Nim";
|
||||||
python.enable = programmingOpt' "Python" true;
|
python = {
|
||||||
|
enable = programmingOpt' "Python" true;
|
||||||
|
pythonPackages = packageListFunctionOpt;
|
||||||
|
};
|
||||||
racket.enable = programmingOpt "Racket";
|
racket.enable = programmingOpt "Racket";
|
||||||
rust.enable = programmingOpt "Rust";
|
rust.enable = programmingOpt "Rust";
|
||||||
zig.enable = programmingOpt "Zig";
|
zig.enable = programmingOpt "Zig";
|
||||||
|
@ -79,19 +82,20 @@ in
|
||||||
nim
|
nim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
python.pythonPackages = (
|
||||||
|
p: with p; [
|
||||||
|
black
|
||||||
|
isort
|
||||||
|
jupyter
|
||||||
|
mypy
|
||||||
|
parallel-ssh
|
||||||
|
pip
|
||||||
|
pyflakes
|
||||||
|
pytest
|
||||||
|
]
|
||||||
|
);
|
||||||
python.packages = [
|
python.packages = [
|
||||||
(python313.withPackages (
|
(python313.withPackages cfg.python.pythonPackages)
|
||||||
p: with p; [
|
|
||||||
black
|
|
||||||
isort
|
|
||||||
jupyter
|
|
||||||
mypy
|
|
||||||
parallel-ssh
|
|
||||||
pip
|
|
||||||
pyflakes
|
|
||||||
pytest
|
|
||||||
]
|
|
||||||
))
|
|
||||||
pipenv
|
pipenv
|
||||||
ruff
|
ruff
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue