59 lines
1 KiB
Nix
59 lines
1 KiB
Nix
|
{ lib
|
||
|
, buildPythonPackage
|
||
|
, fetchPypi
|
||
|
, fetchpatch
|
||
|
, flit-core
|
||
|
, ipykernel
|
||
|
, python
|
||
|
, pexpect
|
||
|
, bash
|
||
|
, substituteAll
|
||
|
}:
|
||
|
|
||
|
buildPythonPackage rec {
|
||
|
pname = "bash-kernel";
|
||
|
version = "0.9.1";
|
||
|
pyproject = true;
|
||
|
|
||
|
src = fetchPypi {
|
||
|
pname = "bash_kernel";
|
||
|
inherit version;
|
||
|
hash = "sha256-AYPVPjYP+baEcQUqmiiagWIXMlFrA04njpcgtdFaFis=";
|
||
|
};
|
||
|
|
||
|
patches = [
|
||
|
(substituteAll {
|
||
|
src = ./bash-path.patch;
|
||
|
bash = lib.getExe bash;
|
||
|
})
|
||
|
];
|
||
|
|
||
|
nativeBuildInputs = [
|
||
|
flit-core
|
||
|
];
|
||
|
|
||
|
propagatedBuildInputs = [
|
||
|
ipykernel
|
||
|
pexpect
|
||
|
];
|
||
|
|
||
|
preBuild = ''
|
||
|
export HOME=$TMPDIR
|
||
|
'';
|
||
|
|
||
|
postInstall = ''
|
||
|
${python.pythonOnBuildForHost.interpreter} -m bash_kernel.install --prefix $out
|
||
|
'';
|
||
|
|
||
|
# no tests
|
||
|
doCheck = false;
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "Bash Kernel for Jupyter";
|
||
|
homepage = "https://github.com/takluyver/bash_kernel";
|
||
|
changelog = "https://github.com/takluyver/bash_kernel/releases/tag/${version}";
|
||
|
license = licenses.bsd3;
|
||
|
maintainers = with maintainers; [ zimbatm ];
|
||
|
};
|
||
|
}
|