wrk: use packaged openssl, luajit (#24481)

This has the side effect of now building on darwin. Previously, the
vendored luajit would fail to build.

authored by

pmahoney and committed by zimbatm.tngl.sh ae696ba3 163668f6

+12 -3
+12 -3
pkgs/tools/networking/wrk/default.nix
··· 1 - { stdenv, fetchFromGitHub, openssl, perl }: 1 + { stdenv, fetchFromGitHub, luajit, openssl, perl }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "wrk-${version}"; ··· 11 11 sha256 = "1qg6w8xz4pr227h1gxrbm6ylhqvspk95hvq2f9iakni7s56pkh1w"; 12 12 }; 13 13 14 - buildInputs = [ openssl perl ]; 14 + buildInputs = [ luajit openssl perl ]; 15 + 16 + makeFlags = [ "WITH_LUAJIT=${luajit}" "WITH_OPENSSL=${openssl.dev}" "VER=${version}" ]; 17 + 18 + preBuild = '' 19 + for f in src/*.h; do 20 + substituteInPlace $f \ 21 + --replace "#include <luajit-2.0/" "#include <" 22 + done 23 + ''; 15 24 16 25 installPhase = '' 17 26 mkdir -p $out/bin ··· 29 38 ''; 30 39 license = licenses.asl20; 31 40 maintainers = with maintainers; [ ragge ]; 32 - platforms = platforms.linux; 41 + platforms = platforms.unix; 33 42 }; 34 43 }