2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
isPy3k,
|
|
|
|
pexpect,
|
|
|
|
notebook,
|
|
|
|
nix,
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nix-kernel";
|
|
|
|
version = "unstable-2020-04-26";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GTrunSec";
|
|
|
|
repo = "nix-kernel";
|
|
|
|
rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec";
|
|
|
|
sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace nix-kernel/kernel.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail "'nix'" "'${nix}/bin/nix'" \
|
|
|
|
--replace-fail "'nix repl'" "'${nix}/bin/nix repl'"
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail "cmdclass={'install': install_with_kernelspec}," ""
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2020-08-20 17:08:02 +00:00
|
|
|
pexpect
|
|
|
|
notebook
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests in repo
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "nix-kernel" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple jupyter kernel for nix-repl";
|
|
|
|
homepage = "https://github.com/GTrunSec/nix-kernel";
|
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|