summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bash-kernel/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/bash-kernel/default.nix')
-rw-r--r--pkgs/development/python-modules/bash-kernel/default.nix26
1 files changed, 15 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/bash-kernel/default.nix b/pkgs/development/python-modules/bash-kernel/default.nix
index 6e546b311d3f..68bdbd190951 100644
--- a/pkgs/development/python-modules/bash-kernel/default.nix
+++ b/pkgs/development/python-modules/bash-kernel/default.nix
@@ -1,14 +1,15 @@
{
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";