@@ -1,5 +1,5 @@
1−{ lib, stdenv, fetchFromGitHub
1+{ lib, stdenv, fetchFromGitHub, fetchpatch
5stdenv.mkDerivation rec {
5stdenv.mkDerivation rec {
@@ -13,11 +13,19 @@ stdenv.mkDerivation rec {
13 sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
13 sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
16− nativeBuildInputs = [ python2 ];
16+ nativeBuildInputs = [ python3 ];
18 strictDeps = true;
18 strictDeps = true;
20− patchPhase = ''
20+ patches = [
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=";
21 patchShebangs src
29 patchShebangs src
22 substituteInPlace src/Makefile \
30 substituteInPlace src/Makefile \
23 --replace /usr/local $out
31 --replace /usr/local $out