13 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel coq-kernel.definition'
15 # Jupyter console with packages:
16 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter-console.withSingleKernel (coq-kernel.definitionWithPackages [coqPackages.bignums])'
19 # nix run --impure --expr 'with import <nixpkgs> {}; jupyter.override { definitions.coq = coq-kernel.definition; }'
22 python = python3.withPackages (ps: [
26 (callPackage ./kernel.nix { })
29 logos = runCommand "coq-logos" { buildInputs = [ imagemagick ]; } ''
31 convert ${coq.src}/ide/coqide/coq.png -resize 32x32 $out/logo-32x32.png
32 convert ${coq.src}/ide/coqide/coq.png -resize 64x64 $out/logo-64x64.png
39 runCommand "coq-kernel-launcher"
41 nativeBuildInputs = [ makeWrapper ];
46 makeWrapper ${python.interpreter} $out/bin/coq-kernel \
47 --add-flags "-m coq_jupyter" \
48 --suffix PATH : ${coq}/bin
51 definition = definitionWithPackages [ ];
53 definitionWithPackages = packages: {
54 displayName = "Coq " + coq.version;
56 "${launcher}/bin/coq-kernel"
61 logo32 = "${logos}/logo-32x32.png";
62 logo64 = "${logos}/logo-64x64.png";
64 COQPATH = lib.concatStringsSep ":" (
65 map (x: "${x}/lib/coq/${coq.coq-version}/user-contrib/") packages