diff --git a/default.nix b/default.nix index 3eaec0e..803aa92 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,8 @@ { pkgs ? import {}, writeScriptBin ? pkgs.writeScriptBin, - python ? pkgs.python35 }: + python ? pkgs.python3, +}: # If you are using callPackage to invoke this, ensure that python attribute is set to atleast a python >= 3.5 @@ -34,6 +35,6 @@ in writeScriptBin "nix-kernel" '' #! ${pkgs.bash}/bin/bash -PATH=${pkgs.nix-repl}/bin:${env}/bin:$PATH +PATH=${pkgs.nixFlakes}/bin/:${env}/bin:$PATH exec python -m nix-kernel $@ '' diff --git a/nix-kernel/kernel.py b/nix-kernel/kernel.py index 045df42..6f3da68 100644 --- a/nix-kernel/kernel.py +++ b/nix-kernel/kernel.py @@ -56,7 +56,7 @@ def language_version(self): @property def banner(self): if self._banner is None: - self._banner = check_output(['nix-repl', '--version']).decode('utf-8') + self._banner = check_output(['nix', 'repl', '--version']).decode('utf-8') return self._banner language_info = {'name': 'nix', @@ -74,7 +74,7 @@ def _start_repl(self): # so that bash and its children are interruptible. sig = signal.signal(signal.SIGINT, signal.SIG_DFL) try: - child = pexpect.spawn("nix-repl", [], echo=False, encoding='utf-8', codec_errors='replace') + child = pexpect.spawn('nix repl', [], echo=False, encoding='utf-8', codec_errors='replace') prompt = u'nix-repl> ' continuation = u' ' self.wrapper = IncrementalOutputWrapper(child, prompt, None,