Skip to content

Commit

Permalink
libinjection: patch for python3 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
armeenm committed Apr 21, 2022
1 parent 09a02d7 commit ea5cfaf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pkgs/development/libraries/libinjection/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub
, python2
{ lib, stdenv, fetchFromGitHub, fetchpatch
, python3
}:

stdenv.mkDerivation rec {
Expand All @@ -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
Expand Down

0 comments on commit ea5cfaf

Please sign in to comment.