diff --git a/pkgs/development/python-modules/nodeenv/default.nix b/pkgs/development/python-modules/nodeenv/default.nix index d88661ae757c..1ff2d47b32d6 100644 --- a/pkgs/development/python-modules/nodeenv/default.nix +++ b/pkgs/development/python-modules/nodeenv/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, setuptools }: +{ lib, buildPythonPackage, fetchPypi, setuptools, python, which }: buildPythonPackage rec { pname = "nodeenv"; @@ -16,6 +16,13 @@ buildPythonPackage rec { # Tests not included in PyPI tarball doCheck = false; + preFixup = '' + substituteInPlace $out/${python.sitePackages}/nodeenv.py \ + --replace '["which", candidate]' '["${lib.getBin which}/bin/which", candidate]' + ''; + + pythonImportsCheck = [ "nodeenv" ]; + meta = with lib; { description = "Node.js virtual environment builder"; homepage = "https://github.com/ekalinin/nodeenv";