push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
diff --git a/bash_kernel/kernel.py b/bash_kernel/kernel.py
index 0496f1e..bd13c4f 100644
--- a/bash_kernel/kernel.py
+++ b/bash_kernel/kernel.py
@@ -88,7 +88,7 @@ class BashKernel(Kernel):
@property
def banner(self):
if self._banner is None:
- self._banner = check_output(['bash', '--version']).decode('utf-8')
+ self._banner = check_output(['@bash@', '--version']).decode('utf-8')
return self._banner
language_info = {'name': 'bash',
@@ -116,7 +116,7 @@ class BashKernel(Kernel):
# source code there for comments and context for
# understanding the code here.
bashrc = os.path.join(os.path.dirname(pexpect.__file__), 'bashrc.sh')
- child = pexpect.spawn("bash", ['--rcfile', bashrc], echo=False,
+ child = pexpect.spawn("@bash@", ['--rcfile', bashrc], echo=False,
encoding='utf-8', codec_errors='replace')
# Following comment stolen from upstream's REPLWrap:
# If the user runs 'env', the value of PS1 will be in the output. To avoid

View File

@@ -0,0 +1,73 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
bashInteractive,
flit-core,
filetype,
ipykernel,
pexpect,
writableTmpDirAsHomeHook,
python,
}:
buildPythonPackage rec {
pname = "bash-kernel";
version = "0.10.0";
pyproject = true;
src = fetchFromGitHub {
owner = "takluyver";
repo = "bash_kernel";
tag = version;
hash = "sha256-ugFMcQx1B1nKoO9rhb6PMllRcoZi0O4B9um8dOu5DU4=";
};
patches = [
(replaceVars ./bash-path.patch {
bash = lib.getExe bashInteractive;
})
];
build-system = [ flit-core ];
dependencies = [
filetype
ipykernel
pexpect
];
nativeBuildInputs = [
writableTmpDirAsHomeHook
];
postInstall = ''
${python.pythonOnBuildForHost.interpreter} -m bash_kernel.install --prefix $out
'';
checkPhase = ''
runHook preCheck
# Create a JUPYTER_PATH with the kernelspec
export JUPYTER_PATH=$(mktemp -d)
mkdir -p $JUPYTER_PATH/kernels/bash
echo '{ "language": "bash", "argv": [ "${python}/bin/python", "-m", "bash_kernel", "-f", "{connection_file}" ] }' > $JUPYTER_PATH/kernels/bash/kernel.json
# Evaluate a test notebook with papermill
cd $(mktemp -d)
${python.withPackages (ps: [ ps.papermill ])}/bin/papermill --kernel bash ${./test.ipynb} out.ipynb
runHook postCheck
'';
__darwinAllowLocalNetworking = true;
meta = {
description = "Bash Kernel for Jupyter";
homepage = "https://github.com/takluyver/bash_kernel";
changelog = "https://github.com/takluyver/bash_kernel/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ zimbatm ];
};
}

View File

@@ -0,0 +1,26 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"echo hi"
]
}
],
"metadata": {
"kernel_info": {
"display_name": "Unknown",
"name": "bash"
},
"language_info": {
"file_extension": ".ipynb",
"name": "bash",
"version": "5.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}