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";
30 inherit pname version;
31 hash = "sha256-UJjm9FpmXSznXtaIR2rVv5YJS/H83FvRkNz09vwoe0c=";
34 propagatedBuildInputs = [ ipywidgets six docopt tqdm jupyter psutil pyyaml ansible-runner ansible ];
38 # https://github.com/ansible/ansible-jupyter-kernel/pull/82
41 # remove custom install
42 sed -i "s/cmdclass={'install': Installer},//" setup.py
45 # tests hang with launched kernel
48 # install kernel manually
50 mkdir -p $out/share/jupyter/kernels/ansible/
51 ln -s ${kernelSpecFile} $out/share/jupyter/kernels/ansible/kernel.json
55 description = "An Ansible kernel for Jupyter";
56 homepage = "https://github.com/ansible/ansible-jupyter-kernel";
57 license = licenses.asl20;