12 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel clojupyter.definition'
15 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.clojure = clojupyter.definition; }'
18 cljdeps = import ./deps.nix { inherit pkgs; };
19 classp = cljdeps.makeClasspaths {};
21 shellScript = writeShellScript "clojupyter" ''
22 ${jre}/bin/java -cp ${classp} clojupyter.kernel.core "$@"
29 description = "Jupyter kernel for Clojure";
30 homepage = "https://github.com/clojupyter/clojupyter";
31 sourceProvenance = with sourceTypes; [ binaryBytecode ]; # deps from maven
32 license = licenses.mit;
33 maintainers = with maintainers; [ thomasjm ];
34 platforms = jre.meta.platforms;
37 sizedLogo = size: stdenv.mkDerivation {
38 name = "clojupyter-logo-${size}x${size}.png";
40 src = fetchFromGitHub {
44 sha256 = "sha256-BCzcPnLSonm+ELFU4JIIzLPlVnP0VzlrRSGxOd/LFow=";
47 buildInputs = [ imagemagick ];
53 convert ./resources/clojupyter/assets/logo-64x64.png -resize ${size}x${size} $out
62 launcher = runCommand "clojupyter" { inherit pname version meta shellScript; } ''
64 ln -s $shellScript $out/bin/clojupyter
68 displayName = "Clojure";
70 "${launcher}/bin/clojupyter"
74 logo32 = sizedLogo "32";
75 logo64 = sizedLogo "64";