proxysql: fix build after 201859

- by not pulling in python2 directly
- by applying patches to sources we "unvendor", so e.g. libinjection builds
This commit is contained in:
ajs124
2023-01-09 14:50:13 +01:00
parent d744fdbab9
commit 8dbaf80fdd
+30 -14
View File
@@ -1,5 +1,6 @@
{ stdenv
, lib
, applyPatches
, fetchFromGitHub
, autoconf
, automake
@@ -23,9 +24,10 @@
, openssl
, pcre
, perl
, python2
, python3
, re2
, zlib
, texinfo
}:
stdenv.mkDerivation rec {
@@ -50,7 +52,8 @@ stdenv.mkDerivation rec {
cmake
libtool
perl
python2
python3
texinfo # for makeinfo
];
buildInputs = [
@@ -65,6 +68,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
# otherwise, it looks for …-1.15
ACLOCAL = "aclocal";
AUTOMAKE = "automake";
GIT_VERSION = version;
dontConfigure = true;
@@ -94,18 +101,27 @@ stdenv.mkDerivation rec {
}
${lib.concatMapStringsSep "\n"
(x: ''replace_dep "${x.f}" "${x.p.src}" "${x.p.pname or (builtins.parseDrvName x.p.name).name}" "${x.p.name}"'') [
{ f = "curl"; p = curl; }
{ f = "libconfig"; p = libconfig; }
{ f = "libdaemon"; p = libdaemon; }
{ f = "libev"; p = libev; }
{ f = "libinjection"; p = libinjection; }
{ f = "libmicrohttpd"; p = libmicrohttpd_0_9_69; }
{ f = "libssl"; p = openssl; }
{ f = "lz4"; p = lz4; }
{ f = "pcre"; p = pcre; }
{ f = "re2"; p = re2; }
]}
(x: ''replace_dep "${x.f}" "${x.p.src}" "${x.p.pname or (builtins.parseDrvName x.p.name).name}" "${x.p.name}"'') (
map (x: {
inherit (x) f;
p = x.p // {
src = applyPatches {
inherit (x.p) src patches;
};
};
}) [
{ f = "curl"; p = curl; }
{ f = "libconfig"; p = libconfig; }
{ f = "libdaemon"; p = libdaemon; }
{ f = "libev"; p = libev; }
{ f = "libinjection"; p = libinjection; }
{ f = "libmicrohttpd"; p = libmicrohttpd_0_9_69; }
{ f = "libssl"; p = openssl; }
{ f = "lz4"; p = lz4; }
{ f = "pcre"; p = pcre; }
{ f = "re2"; p = re2; }
]
)}
pushd libhttpserver
tar xf libhttpserver-0.18.1.tar.gz