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