pkgsets/python3: pkgs should be mergable function
This commit is contained in:
parent
eaf3bf45c5
commit
460d3f1d30
3 changed files with 32 additions and 21 deletions
|
@ -12,7 +12,7 @@ let
|
||||||
serviceList = fn.makeOptionTypeList (toString ../services);
|
serviceList = fn.makeOptionTypeList (toString ../services);
|
||||||
pkgOption = pname: {
|
pkgOption = pname: {
|
||||||
name = pname;
|
name = pname;
|
||||||
value = rec {
|
value = {
|
||||||
pkgwrap = mkOption {
|
pkgwrap = mkOption {
|
||||||
type =
|
type =
|
||||||
with types;
|
with types;
|
||||||
|
@ -26,7 +26,10 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
pkgs = mkOption {
|
pkgs = mkOption {
|
||||||
type = types.unspecified;
|
type = types.oneOf [
|
||||||
|
(types.listOf types.package)
|
||||||
|
(types.functionTo (types.listOf types.package))
|
||||||
|
];
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
${pname} package list.
|
${pname} package list.
|
||||||
|
|
|
@ -1,25 +1,33 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
machine.pkgsets.python3.pkgwrap = pkgs.python3.withPackages (
|
machine.pkgsets.python3 = {
|
||||||
ps: (fn.pkgFilter config.machine.pkgsets.python3.pkgs)
|
pkgwrap = pkgs.python3.withPackages (config.machine.pkgsets.python3.pkgs);
|
||||||
);
|
pkgs = ps: with ps; [
|
||||||
machine.pkgsets.python3.pkgs = with pkgs.python3Packages; [
|
bpython
|
||||||
bpython
|
click
|
||||||
flake8
|
flake8
|
||||||
genanki
|
genanki
|
||||||
matplotlib
|
holidays
|
||||||
mypy
|
matplotlib
|
||||||
mysqlclient
|
mypy
|
||||||
numpy
|
mysqlclient
|
||||||
pandas
|
numpy
|
||||||
pillow
|
pandas
|
||||||
scipy
|
pillow
|
||||||
virtualenv
|
pyaml
|
||||||
];
|
scipy
|
||||||
|
jupyter
|
||||||
|
jupyterlab
|
||||||
|
requests
|
||||||
|
pip
|
||||||
|
notebook
|
||||||
|
seaborn
|
||||||
|
virtualenv
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ mkIf (elem "desktop::i3" config.machine.services) {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
machine.pkgsets.python3.pkgs = with pkgs.python3Packages; [
|
machine.pkgsets.python3.pkgs = ps: with ps; [
|
||||||
py3status
|
py3status
|
||||||
pytz
|
pytz
|
||||||
tzlocal
|
tzlocal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue