sysbench: add macOS support (#185750)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
a5de565921
commit
9fd235b40a
@ -1,5 +1,14 @@
|
||||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
|
||||
, libmysqlclient, libaio
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, libmysqlclient
|
||||
, libaio
|
||||
, luajit
|
||||
# For testing:
|
||||
, testers
|
||||
, sysbench
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -7,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
version = "1.0.20";
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libmysqlclient libaio ];
|
||||
buildInputs = [ libmysqlclient luajit ] ++ lib.optionals stdenv.isLinux [ libaio ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "akopytov";
|
||||
@ -18,10 +27,30 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
# The bundled version does not build on aarch64-darwin:
|
||||
# https://github.com/akopytov/sysbench/issues/416
|
||||
"--with-system-luajit"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
versionTest = testers.testVersion {
|
||||
package = sysbench;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modular, cross-platform and multi-threaded benchmark tool";
|
||||
longDescription = ''
|
||||
sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT.
|
||||
It is most frequently used for database benchmarks, but can also be used
|
||||
to create arbitrarily complex workloads that do not involve a database
|
||||
server.
|
||||
'';
|
||||
homepage = "https://github.com/akopytov/sysbench";
|
||||
downloadPage = "https://github.com/akopytov/sysbench/releases/tag/${version}";
|
||||
changelog = "https://github.com/akopytov/sysbench/blob/${version}/ChangeLog";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user