Commit 8965dab3 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python312Packages.bash-kernel: cleanup, fix on darwin

parent 75016788
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  fetchFromGitHub,
  replaceVars,
  bashInteractive,
  flit-core,
  filetype,
  ipykernel,
  python,
  pexpect,
  bashInteractive,
  replaceVars,
  writableTmpDirAsHomeHook,
  python,
}:

buildPythonPackage rec {
@@ -16,10 +17,11 @@ buildPythonPackage rec {
  version = "0.10.0";
  pyproject = true;

  src = fetchPypi {
    pname = "bash_kernel";
    inherit version;
    hash = "sha256-LtWgpBbEGNHXUecVBb1siJ4SFXREtQxCh6aF2ndcKMo=";
  src = fetchFromGitHub {
    owner = "takluyver";
    repo = "bash_kernel";
    tag = version;
    hash = "sha256-ugFMcQx1B1nKoO9rhb6PMllRcoZi0O4B9um8dOu5DU4=";
  };

  patches = [
@@ -36,9 +38,9 @@ buildPythonPackage rec {
    pexpect
  ];

  preBuild = ''
    export HOME=$TMPDIR
  '';
  nativeBuildInputs = [
    writableTmpDirAsHomeHook
  ];

  postInstall = ''
    ${python.pythonOnBuildForHost.interpreter} -m bash_kernel.install --prefix $out
@@ -59,6 +61,8 @@ buildPythonPackage rec {
    runHook postCheck
  '';

  __darwinAllowLocalNetworking = true;

  meta = {
    description = "Bash Kernel for Jupyter";
    homepage = "https://github.com/takluyver/bash_kernel";