@@ -1,5 +1,5 @@
1−{ lib, stdenv, fetchFromGitHub
2−, python2
1+{ lib, stdenv, fetchFromGitHub, fetchpatch
2+, python3
33}:
44
55stdenv.mkDerivation rec {
@@ -13,11 +13,19 @@ stdenv.mkDerivation rec {
1313 sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
1414 };
1515
16− nativeBuildInputs = [ python2 ];
16+ nativeBuildInputs = [ python3 ];
1717
1818 strictDeps = true;
1919
20− patchPhase = ''
20+ patches = [
21+ (fetchpatch {
22+ name = "support-python3-for-building";
23+ url = "https://raw.githubusercontent.com/sysown/proxysql/bed58f92917eb651b80fd8ffa627a485eb320805/deps/libinjection/update-build-py3.diff";
24+ hash = "sha256-SPdf57FIDDNpatWe5pjhAiZl5yPMDEv50k0Wj+eWTEM=";
25+ })
26+ ];
27+
28+ postPatch = ''
2129 patchShebangs src
2230 substituteInPlace src/Makefile \
2331 --replace /usr/local $out