Commit 48b72b80 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

python311Packages.nix-kernel: modernize

parent 52e111e2
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -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
  ];