From ae696ba3d6ffbd3c5c285363dbd0b0f9db846909 Mon Sep 17 00:00:00 2001 From: pmahoney Date: Thu, 30 Mar 2017 17:09:42 -0500 Subject: [PATCH] wrk: use packaged openssl, luajit (#24481) This has the side effect of now building on darwin. Previously, the vendored luajit would fail to build. --- pkgs/tools/networking/wrk/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/wrk/default.nix b/pkgs/tools/networking/wrk/default.nix index c8315d0c3f5..226180196fd 100644 --- a/pkgs/tools/networking/wrk/default.nix +++ b/pkgs/tools/networking/wrk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, openssl, perl }: +{ stdenv, fetchFromGitHub, luajit, openssl, perl }: stdenv.mkDerivation rec { name = "wrk-${version}"; @@ -11,7 +11,16 @@ stdenv.mkDerivation rec { sha256 = "1qg6w8xz4pr227h1gxrbm6ylhqvspk95hvq2f9iakni7s56pkh1w"; }; - buildInputs = [ openssl perl ]; + buildInputs = [ luajit openssl perl ]; + + makeFlags = [ "WITH_LUAJIT=${luajit}" "WITH_OPENSSL=${openssl.dev}" "VER=${version}" ]; + + preBuild = '' + for f in src/*.h; do + substituteInPlace $f \ + --replace "#include