mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
wolfram-for-jupyter-kernel: init at 0.9.2
Also, add a script 'wolfram-notebook' to easily start a jupyter notebook for working with the Wolfram Engine. Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
2055f85304
commit
55a070a616
@ -0,0 +1,22 @@
|
||||
{ callPackage
|
||||
, wolfram-engine
|
||||
}:
|
||||
|
||||
# To test:
|
||||
# $(nix-build -E 'with import ./. {}; jupyter.override { definitions = { wolfram = wolfram-for-jupyter-kernel.definition; }; }')/bin/jupyter-notebook
|
||||
let kernel = callPackage ./kernel.nix {};
|
||||
in {
|
||||
definition = {
|
||||
displayName = "Wolfram Language ${wolfram-engine.version}";
|
||||
argv = [
|
||||
"${wolfram-engine}/bin/wolfram"
|
||||
"-script"
|
||||
"${kernel}/share/Wolfram/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl"
|
||||
"{connection_file}"
|
||||
"ScriptInstall" # suppresses prompt
|
||||
];
|
||||
language = "Wolfram Language";
|
||||
logo32 = "${wolfram-engine}/share/icons/hicolor/32x32/apps/wolfram-wolframlanguage.png";
|
||||
logo64 = "${wolfram-engine}/share/icons/hicolor/64x64/apps/wolfram-wolframlanguage.png";
|
||||
};
|
||||
}
|
32
pkgs/applications/editors/jupyter-kernels/wolfram/kernel.nix
Normal file
32
pkgs/applications/editors/jupyter-kernels/wolfram/kernel.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wolfram-for-jupyter-kernel";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WolframResearch";
|
||||
repo = "WolframLanguageForJupyter";
|
||||
rev = "v${version}";
|
||||
sha256 = "19d9dvr0bv7iy0x8mk4f576ha7z7h7id39nyrggwf9cp7gymxf47";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
installPhase = ''
|
||||
patchShebangs ./configure-jupyter.wls
|
||||
mkdir -p $out/share/Wolfram
|
||||
cp -r {WolframLanguageForJupyter,images,extras,LICENSE} $out/share/Wolfram
|
||||
'';
|
||||
|
||||
# no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Jupyter kernel for Wolfram Language.";
|
||||
homepage = "https://github.com/WolframResearch/WolframLanguageForJupyter";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fbeffa ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{ lib, stdenv, writeScriptBin, jupyter, wolfram-for-jupyter-kernel }:
|
||||
|
||||
let
|
||||
wolfram-jupyter = jupyter.override { definitions = { wolfram = wolfram-for-jupyter-kernel.definition; }; };
|
||||
in
|
||||
writeScriptBin "wolfram-notebook" ''
|
||||
#! ${stdenv.shell}
|
||||
${wolfram-jupyter}/bin/jupyter-notebook
|
||||
''
|
@ -32637,6 +32637,10 @@ with pkgs;
|
||||
|
||||
wolfram-engine = callPackage ../applications/science/math/wolfram-engine { };
|
||||
|
||||
wolfram-for-jupyter-kernel = callPackage ../applications/editors/jupyter-kernels/wolfram { };
|
||||
|
||||
wolfram-notebook = callPackage ../applications/science/math/wolfram-engine/notebook.nix { };
|
||||
|
||||
ipopt = callPackage ../development/libraries/science/math/ipopt { };
|
||||
|
||||
gmsh = callPackage ../applications/science/math/gmsh { };
|
||||
|
Loading…
Reference in New Issue
Block a user