3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services/development/jupyter/kernel-options.nix

70 lines
1.7 KiB
Nix

# Options that can be used for creating a jupyter kernel.
{lib }:
with lib;
{
options = {
displayName = mkOption {
type = types.str;
default = "";
example = literalExpression ''
"Python 3"
"Python 3 for Data Science"
'';
description = lib.mdDoc ''
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 = lib.mdDoc ''
Command and arguments to start the kernel.
'';
};
language = mkOption {
type = types.str;
example = "python";
description = lib.mdDoc ''
Language of the environment. Typically the name of the binary.
'';
};
logo32 = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-32x32.png"'';
description = lib.mdDoc ''
Path to 32x32 logo png.
'';
};
logo64 = mkOption {
type = types.nullOr types.path;
default = null;
example = literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-64x64.png"'';
description = lib.mdDoc ''
Path to 64x64 logo png.
'';
};
extraPaths = mkOption {
type = types.attrsOf types.path;
default = { };
example = literalExpression ''"{ examples = ''${env.sitePack}/IRkernel/kernelspec/kernel.js"; }'';
description = lib.mdDoc ''
Extra paths to link in kernel directory
'';
};
};
}