From b1934ec6e9cc07868c29488a8073f276c063b5d6 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 7 Aug 2020 13:11:13 -0400 Subject: [PATCH] pythonPackages.bash_kernel: refactor pinning bash package --- pkgs/development/python-modules/bash_kernel/default.nix | 7 +++++++ pkgs/top-level/python-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/bash_kernel/default.nix b/pkgs/development/python-modules/bash_kernel/default.nix index 191f03426746..9ac72a21fa7d 100644 --- a/pkgs/development/python-modules/bash_kernel/default.nix +++ b/pkgs/development/python-modules/bash_kernel/default.nix @@ -6,6 +6,7 @@ , isPy27 , python , pexpect +, bash }: buildPythonPackage rec { @@ -26,6 +27,12 @@ buildPythonPackage rec { }) ]; + postPatch = '' + substituteInPlace bash_kernel/kernel.py \ + --replace "'bash'" "'${bash}/bin/bash'" \ + --replace "\"bash\"" "'${bash}/bin/bash'" + ''; + propagatedBuildInputs = [ ipykernel pexpect ]; # no tests diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d59ef53af274..d41f56d52cba 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -509,7 +509,9 @@ in { baselines = callPackage ../development/python-modules/baselines { }; - bash_kernel = callPackage ../development/python-modules/bash_kernel { }; + bash_kernel = callPackage ../development/python-modules/bash_kernel { + inherit (pkgs) bash; + }; bashlex = callPackage ../development/python-modules/bashlex { };