python39Packages.nodeenv: hardcode which path

This commit is contained in:
Artturin 2022-04-04 22:26:08 +03:00 committed by Jonathan Ringer
parent b393b879e0
commit 6edf36f81c

View file

@ -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";