biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / misc / sysbench / default.nix
blob6bba1ebfd6118818277e4f0f0e90b3daff0ada79
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , autoreconfHook
5 , pkg-config
6 , libmysqlclient
7 , libaio
8 , libck
9 , luajit
10 # For testing:
11 , testers
12 , sysbench
15 stdenv.mkDerivation rec {
16   pname = "sysbench";
17   version = "1.0.20";
19   nativeBuildInputs = [ autoreconfHook pkg-config ];
20   buildInputs = [ libmysqlclient luajit libck ] ++ lib.optionals stdenv.isLinux [ libaio ];
21   depsBuildBuild = [ pkg-config ];
23   src = fetchFromGitHub {
24     owner = "akopytov";
25     repo = pname;
26     rev = version;
27     sha256 = "1sanvl2a52ff4shj62nw395zzgdgywplqvwip74ky8q7s6qjf5qy";
28   };
30   enableParallelBuilding = true;
32   configureFlags = [
33     # The bundled version does not build on aarch64-darwin:
34     # https://github.com/akopytov/sysbench/issues/416
35     "--with-system-luajit"
36     "--with-system-ck"
37     "--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql"
38     "--with-mysql-libs=${libmysqlclient}/lib/mysql"
39   ];
41   passthru.tests = {
42     versionTest = testers.testVersion {
43       package = sysbench;
44     };
45   };
47   meta = {
48     description = "Modular, cross-platform and multi-threaded benchmark tool";
49     mainProgram = "sysbench";
50     longDescription = ''
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
54       server.
55     '';
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;
61   };