about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2022-05-04 21:00:32 +0200
committerGitHub <noreply@github.com>2022-05-04 21:00:32 +0200
commitf9e8fbce74507c1ddfd1a61d8f1f84d95fc40d46 (patch)
tree452e1bfecc2bb25f624abec70d35017e1218637a /pkgs/development
parent560e691ffb3da65225e39784f57d7c037c41515c (diff)
parentea5cfaf8e1123610ac29ef988620d06fca49bc89 (diff)
Merge pull request #169601 from armeenm/libinjection-python3
libinjection: patch for python3 builds
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/libinjection/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libinjection/default.nix b/pkgs/development/libraries/libinjection/default.nix
index 81a1398147bae..d4193f32ccc08 100644
--- a/pkgs/development/libraries/libinjection/default.nix
+++ b/pkgs/development/libraries/libinjection/default.nix
@@ -1,5 +1,5 @@
-{ lib, stdenv, fetchFromGitHub
-, python2
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, python3
 }:
 
 stdenv.mkDerivation rec {
@@ -13,11 +13,19 @@ stdenv.mkDerivation rec {
     sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
   };
 
-  nativeBuildInputs = [ python2 ];
+  nativeBuildInputs = [ python3 ];
 
   strictDeps = true;
 
-  patchPhase = ''
+  patches = [
+    (fetchpatch {
+      name = "support-python3-for-building";
+      url = "https://raw.githubusercontent.com/sysown/proxysql/bed58f92917eb651b80fd8ffa627a485eb320805/deps/libinjection/update-build-py3.diff";
+      hash = "sha256-SPdf57FIDDNpatWe5pjhAiZl5yPMDEv50k0Wj+eWTEM=";
+    })
+  ];
+
+  postPatch = ''
     patchShebangs src
     substituteInPlace src/Makefile \
       --replace /usr/local $out