Files
nixpkgs/pkgs/development/python-modules/bash-kernel/default.nix
T
Martin Weinelt 403a240615 python311Packages.bash-kernel: fix build
Substitute the bash path more carefully, as not all quoted bash strings
are meant to be paths.
2023-11-10 13:19:08 +01:00

59 lines
1.0 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 ];
};
}