11 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel octave-kernel.definition'
14 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.octave = octave-kernel.definition; }'
17 kernel = callPackage ./kernel.nix {
18 python3Packages = python3.pkgs;
24 launcher = runCommand "octave-kernel-launcher" {
26 python = python3.withPackages (ps: [ ps.traitlets ps.jupyter-core ps.ipykernel ps.metakernel kernel ]);
27 nativeBuildInputs = [ makeWrapper ];
31 makeWrapper $python/bin/python $out/bin/octave-kernel \
32 --add-flags "-m octave_kernel" \
33 --suffix PATH : $octave/bin
36 sizedLogo = size: stdenv.mkDerivation {
37 pname = "octave-logo-${size}x${size}.png";
38 inherit (octave) version;
42 buildInputs = [ imagemagick ];
48 convert ./libgui/src/icons/octave/128x128/logo.png -resize ${size}x${size} $out
53 displayName = "Octave";
55 "${launcher}/bin/octave-kernel"
60 logo32 = sizedLogo "32";
61 logo64 = sizedLogo "64";