18 kernelSpecFile = writeText "kernel.json" (builtins.toJSON {
19 argv = [ python.interpreter "-m" "ansible_kernel" "-f" "{connection_file}" ];
20 codemirror_mode = "yaml";
21 display_name = "Ansible";
25 buildPythonPackage rec {
26 pname = "ansible-kernel";
28 format = "setuptools";
31 inherit pname version;
32 hash = "sha256-UJjm9FpmXSznXtaIR2rVv5YJS/H83FvRkNz09vwoe0c=";
35 propagatedBuildInputs = [ ipywidgets six docopt tqdm jupyter psutil pyyaml ansible-runner ansible ];
39 # https://github.com/ansible/ansible-jupyter-kernel/pull/82
42 # remove custom install
43 sed -i "s/cmdclass={'install': Installer},//" setup.py
46 # tests hang with launched kernel
49 # install kernel manually
51 mkdir -p $out/share/jupyter/kernels/ansible/
52 ln -s ${kernelSpecFile} $out/share/jupyter/kernels/ansible/kernel.json
56 description = "An Ansible kernel for Jupyter";
57 homepage = "https://github.com/ansible/ansible-jupyter-kernel";
58 license = licenses.asl20;