nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.9 KiB
Nix
Raw Normal View History

2018-01-11 23:13:55 +00:00
# Options that can be used for creating a jupyter kernel.
{ lib, pkgs }:
2018-01-11 23:13:55 +00:00
with lib;
{
freeformType = (pkgs.formats.json { }).type;
2018-01-11 23:13:55 +00:00
options = {
displayName = mkOption {
type = types.str;
default = "";
example = literalExpression ''
2018-01-11 23:13:55 +00:00
"Python 3"
"Python 3 for Data Science"
'';
description = ''
2018-01-11 23:13:55 +00:00
Name that will be shown to the user.
'';
};
argv = mkOption {
type = types.listOf types.str;
example = [
"{customEnv.interpreter}"
"-m"
"ipykernel_launcher"
"-f"
"{connection_file}"
];
description = ''
2018-01-11 23:13:55 +00:00
Command and arguments to start the kernel.
'';
};
language = mkOption {
type = types.str;
example = "python";
description = ''
2018-01-11 23:13:55 +00:00
Language of the environment. Typically the name of the binary.
'';
};
2021-03-30 09:31:59 +00:00
env = mkOption {
type = types.attrsOf types.str;
default = { };
example = { OMP_NUM_THREADS = "1"; };
description = ''
2021-03-30 09:31:59 +00:00
Environment variables to set for the kernel.
'';
};
2018-01-11 23:13:55 +00:00
logo32 = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-32x32.png"'';
description = ''
2018-01-11 23:13:55 +00:00
Path to 32x32 logo png.
'';
};
logo64 = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-64x64.png"'';
description = ''
2018-01-11 23:13:55 +00:00
Path to 64x64 logo png.
'';
};
extraPaths = mkOption {
type = types.attrsOf types.path;
default = { };
example = literalExpression ''"{ examples = ''${env.sitePack}/IRkernel/kernelspec/kernel.js"; }'';
description = ''
Extra paths to link in kernel directory
'';
};
2018-01-11 23:13:55 +00:00
};
}