anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / editors / jupyter-kernels / wolfram / default.nix
blobefa78f74bc960e22ac8440c076c4a550c481b694
1 { callPackage
2 , wolfram-engine
3 }:
5 # Jupyter console:
6 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel wolfram-for-jupyter-kernel.definition'
8 # Jupyter notebook:
9 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.wolfram = wolfram-for-jupyter-kernel.definition; }'
11 let kernel = callPackage ./kernel.nix {};
12 in {
13   definition = {
14     displayName = "Wolfram Language ${wolfram-engine.version}";
15     argv = [
16       "${wolfram-engine}/bin/wolfram"
17       "-script"
18       "${kernel}/share/Wolfram/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl"
19       "{connection_file}"
20       "ScriptInstall" # suppresses prompt
21     ];
22     language = "Wolfram Language";
23     logo32 = "${wolfram-engine}/share/icons/hicolor/32x32/apps/wolfram-wolframlanguage.png";
24     logo64 = "${wolfram-engine}/share/icons/hicolor/64x64/apps/wolfram-wolframlanguage.png";
25   };