Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, ipykernel 6, isPy27 7, python 8, pexpect 9, bash 10}: 11 12buildPythonPackage rec { 13 pname = "bash_kernel"; 14 version = "0.9.0"; 15 format = "flit"; 16 disabled = isPy27; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "sha256-BCPwUS72+DplThQ5o2lxiJmjjyeUj+IbZlst8dvzp8c="; 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 postPatch = '' 31 substituteInPlace bash_kernel/kernel.py \ 32 --replace "'bash'" "'${bash}/bin/bash'" \ 33 --replace "\"bash\"" "'${bash}/bin/bash'" 34 ''; 35 36 propagatedBuildInputs = [ ipykernel pexpect ]; 37 38 # no tests 39 doCheck = false; 40 41 preBuild = '' 42 export HOME=$TMPDIR 43 ''; 44 45 postInstall = '' 46 ${python.pythonForBuild.interpreter} -m bash_kernel.install --prefix $out 47 ''; 48 49 meta = with lib; { 50 description = "Bash Kernel for Jupyter"; 51 homepage = "https://github.com/takluyver/bash_kernel"; 52 changelog = "https://github.com/takluyver/bash_kernel/releases/tag/${version}"; 53 license = licenses.bsd3; 54 maintainers = with maintainers; [ zimbatm ]; 55 }; 56}