diff options
author | Rahul Butani <rrbutani@users.noreply.github.com> | 2022-08-19 07:39:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 14:39:45 +0200 |
commit | 9fd235b40a992d33c3e30956485a7a893ed093bc (patch) | |
tree | 6a77c316e8f60a52bcfa6f4b08cf8c310cd22b9d /pkgs/development/tools/misc | |
parent | a5de5659214923d379fdd48542283444f337e178 (diff) |
sysbench: add macOS support (#185750)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/sysbench/default.nix | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix index 2cf8c91d3bf9d..1e15c6ab0f2f0 100644 --- a/pkgs/development/tools/misc/sysbench/default.nix +++ b/pkgs/development/tools/misc/sysbench/default.nix @@ -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; }; } |