darwin.iproute2mac: explicitly use python2

This commit is contained in:
Daiderd Jordan 2020-01-13 10:47:37 +01:00
parent da6bc4b4cb
commit c05efedd4d
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, darwin, python }:
{ stdenv, fetchFromGitHub, darwin, python2 }:
stdenv.mkDerivation rec {
version = "1.2.1";
@ -11,11 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "1n6la7blbxza2m79cpnywsavhzsdv4gzdxrkly4dppyidjg6jy1h";
};
buildInputs = [ python ];
buildInputs = [ python2 ];
postPatch = ''
substituteInPlace src/ip.py \
--replace /usr/bin/python ${python}/bin/python \
--replace /usr/bin/python ${python2}/bin/python \
--replace /sbin/ifconfig ${darwin.network_cmds}/bin/ifconfig \
--replace /sbin/route ${darwin.network_cmds}/bin/route \
--replace /usr/sbin/netstat ${darwin.network_cmds}/bin/netstat \