mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 05:59:17 +03:00

After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
79 lines
2 KiB
Nix
79 lines
2 KiB
Nix
# Options that can be used for creating a jupyter kernel.
|
|
{ lib, pkgs }:
|
|
{
|
|
freeformType = (pkgs.formats.json { }).type;
|
|
|
|
options = {
|
|
|
|
displayName = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "";
|
|
example = lib.literalExpression ''
|
|
"Python 3"
|
|
"Python 3 for Data Science"
|
|
'';
|
|
description = ''
|
|
Name that will be shown to the user.
|
|
'';
|
|
};
|
|
|
|
argv = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
example = [
|
|
"{customEnv.interpreter}"
|
|
"-m"
|
|
"ipykernel_launcher"
|
|
"-f"
|
|
"{connection_file}"
|
|
];
|
|
description = ''
|
|
Command and arguments to start the kernel.
|
|
'';
|
|
};
|
|
|
|
language = lib.mkOption {
|
|
type = lib.types.str;
|
|
example = "python";
|
|
description = ''
|
|
Language of the environment. Typically the name of the binary.
|
|
'';
|
|
};
|
|
|
|
env = lib.mkOption {
|
|
type = lib.types.attrsOf lib.types.str;
|
|
default = { };
|
|
example = {
|
|
OMP_NUM_THREADS = "1";
|
|
};
|
|
description = ''
|
|
Environment variables to set for the kernel.
|
|
'';
|
|
};
|
|
|
|
logo32 = lib.mkOption {
|
|
type = lib.types.nullOr lib.types.path;
|
|
default = null;
|
|
example = lib.literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-32x32.png"'';
|
|
description = ''
|
|
Path to 32x32 logo png.
|
|
'';
|
|
};
|
|
logo64 = lib.mkOption {
|
|
type = lib.types.nullOr lib.types.path;
|
|
default = null;
|
|
example = lib.literalExpression ''"''${env.sitePackages}/ipykernel/resources/logo-64x64.png"'';
|
|
description = ''
|
|
Path to 64x64 logo png.
|
|
'';
|
|
};
|
|
|
|
extraPaths = lib.mkOption {
|
|
type = lib.types.attrsOf lib.types.path;
|
|
default = { };
|
|
example = lib.literalExpression ''"{ examples = ''${env.sitePack}/IRkernel/kernelspec/kernel.js"; }'';
|
|
description = ''
|
|
Extra paths to link in kernel directory
|
|
'';
|
|
};
|
|
};
|
|
}
|