python311Packages.nix-kernel: modernize

This commit is contained in:
Peder Bergebakken Sundt
2024-08-13 17:49:36 +02:00
parent 52e111e252
commit 48b72b80d9
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
isPy3k,
pexpect,
notebook,
@@ -11,7 +12,7 @@
buildPythonPackage rec {
pname = "nix-kernel";
version = "unstable-2020-04-26";
format = "setuptools";
pyproject = true;
disabled = !isPy3k;
@@ -24,14 +25,16 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace nix-kernel/kernel.py \
--replace "'nix'" "'${nix}/bin/nix'" \
--replace "'nix repl'" "'${nix}/bin/nix repl'"
--replace-fail "'nix'" "'${nix}/bin/nix'" \
--replace-fail "'nix repl'" "'${nix}/bin/nix repl'"
substituteInPlace setup.py \
--replace "cmdclass={'install': install_with_kernelspec}," ""
--replace-fail "cmdclass={'install': install_with_kernelspec}," ""
'';
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
pexpect
notebook
];