15 stdenv.mkDerivation rec {
19 nativeBuildInputs = [ autoreconfHook pkg-config ];
20 buildInputs = [ libmysqlclient luajit libck ] ++ lib.optionals stdenv.isLinux [ libaio ];
21 depsBuildBuild = [ pkg-config ];
23 src = fetchFromGitHub {
27 sha256 = "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy";
30 enableParallelBuilding = true;
33 # The bundled version does not build on aarch64-darwin:
34 # https://github.com/akopytov/sysbench/issues/416
35 "--with-system-luajit"
37 "--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql"
38 "--with-mysql-libs=${libmysqlclient}/lib/mysql"
42 versionTest = testers.testVersion {
48 description = "Modular, cross-platform and multi-threaded benchmark tool";
49 mainProgram = "sysbench";
51 sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT.
52 It is most frequently used for database benchmarks, but can also be used
53 to create arbitrarily complex workloads that do not involve a database
56 homepage = "https://github.com/akopytov/sysbench";
57 downloadPage = "https://github.com/akopytov/sysbench/releases/tag/${version}";
58 changelog = "https://github.com/akopytov/sysbench/blob/${version}/ChangeLog";
59 license = lib.licenses.gpl2;
60 platforms = lib.platforms.unix;