Files
nixpkgs/pkgs/development/python-modules/nix-kernel/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

54 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
isPy3k,
pexpect,
notebook,
nix,
}:
buildPythonPackage {
pname = "nix-kernel";
version = "unstable-2020-04-26";
pyproject = true;
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "GTrunSec";
repo = "nix-kernel";
rev = "dfa42d0812d508ded99f690ee1a83281d900a3ec";
sha256 = "1lf4rbbxjmq9h6g3wrdzx3v3dn1bndfmiybxiy0sjavgb6lzc8kq";
};
postPatch = ''
substituteInPlace nix-kernel/kernel.py \
--replace-fail "'nix'" "'${nix}/bin/nix'" \
--replace-fail "'nix repl'" "'${nix}/bin/nix repl'"
substituteInPlace setup.py \
--replace-fail "cmdclass={'install': install_with_kernelspec}," ""
'';
build-system = [ setuptools ];
dependencies = [
pexpect
notebook
];
# no tests in repo
doCheck = false;
pythonImportsCheck = [ "nix-kernel" ];
meta = {
description = "Simple jupyter kernel for nix-repl";
homepage = "https://github.com/GTrunSec/nix-kernel";
license = lib.licenses.mit;
maintainers = [ ];
};
}