git.iko.soy/typeable/nixpkgs
on master help sign in
libinjection: patch for python3 builds
commitea5cfaf8e1123610ac29ef988620d06fca49bc89 authorArmeen Mahdian <mahdianarmeen@gmail.com> dateThu 21 Apr 2022, 10:47 (5 years ago) parent09a02d7
1 file changed+12−4
pkgs/development/libraries/libinjection/default.nix+12−4
pkgs/development/libraries/libinjection/default.nix+12−4
@@ -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