1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, ipykernel 6, isPy27 7, python 8, pexpect 9}: 10 11buildPythonPackage rec { 12 pname = "bash_kernel"; 13 version = "0.7.1"; 14 name = "${pname}-${version}"; 15 format = "flit"; 16 disabled = isPy27; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "1s2kc7m52kq28b4j1q3456g5ani6nmq4n0rpbqi3yvh7ks0rby19"; 21 }; 22 23 patches = [ 24 (fetchpatch { 25 url = "https://patch-diff.githubusercontent.com/raw/takluyver/bash_kernel/pull/69.diff"; 26 sha256 = "1qd7qjjmcph4dk6j0bl31h2fdmfiyyazvrc9xqqj8y21ki2sl33j"; 27 }) 28 ]; 29 30 propagatedBuildInputs = [ ipykernel pexpect ]; 31 32 # no tests 33 doCheck = false; 34 35 preBuild = '' 36 export HOME=$TMPDIR 37 ''; 38 39 postInstall = '' 40 ${python.interpreter} -m bash_kernel.install --prefix $out 41 ''; 42 43 meta = { 44 description = "Bash Kernel for Jupyter"; 45 homepage = "https://github.com/takluyver/bash_kernel"; 46 license = lib.licenses.bsd3; 47 maintainers = with lib.maintainers; [ zimbatm ]; 48 }; 49}