git.iko.soy/typeable/nixpkgs
on master help sign in
libinjection: patch for python3 builds
ea5cfafArmeen Mahdian
pkgs/development/libraries/libinjection/default.nix+12−4
@@ -1,5 +1,5 @@
1−{ lib, stdenv, fetchFromGitHub
1+{ lib, stdenv, fetchFromGitHub, fetchpatch
2−, python2
2+, python3
3}:
3}:
4
4
5stdenv.mkDerivation rec {
5stdenv.mkDerivation rec {
@@ -13,11 +13,19 @@ stdenv.mkDerivation rec {
13 sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
13 sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
14 };
14 };
15
15
16− nativeBuildInputs = [ python2 ];
16+ nativeBuildInputs = [ python3 ];
17
17
18 strictDeps = true;
18 strictDeps = true;
19
19
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 = ''
21 patchShebangs src
29 patchShebangs src
22 substituteInPlace src/Makefile \
30 substituteInPlace src/Makefile \
23 --replace /usr/local $out
31 --replace /usr/local $out