Unverified Commit 96d1259a authored by Pierre Bourdon's avatar Pierre Bourdon Committed by GitHub
Browse files

Merge pull request #275488 from avnik/avnik/libck-sysbench-cross

libck and sysbench cross-compilation fix
parents 08a73ec4 4af13554
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-HUC+8Vd0koAmumRZ8gS5u6LVa7fUfkIYRaxVv6/7Hgg=";
  };

  postPatch = ''
    substituteInPlace \
      configure \
        --replace \
          'COMPILER=`./.1 2> /dev/null`' \
          "COMPILER=gcc"
  '';

  configureFlags = ["--platform=${stdenv.hostPlatform.parsed.cpu.name}}"];

  dontDisableStatic = true;

  meta = with lib; {
+6 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
, pkg-config
, libmysqlclient
, libaio
, libck
, luajit
# For testing:
, testers
@@ -16,7 +17,8 @@ stdenv.mkDerivation rec {
  version = "1.0.20";

  nativeBuildInputs = [ autoreconfHook pkg-config ];
  buildInputs = [ libmysqlclient luajit ] ++ lib.optionals stdenv.isLinux [ libaio ];
  buildInputs = [ libmysqlclient luajit libck ] ++ lib.optionals stdenv.isLinux [ libaio ];
  depsBuildBuild = [ pkg-config ];

  src = fetchFromGitHub {
    owner = "akopytov";
@@ -31,6 +33,9 @@ stdenv.mkDerivation rec {
    # The bundled version does not build on aarch64-darwin:
    # https://github.com/akopytov/sysbench/issues/416
    "--with-system-luajit"
    "--with-system-ck"
    "--with-mysql-includes=${lib.getDev libmysqlclient}/include/mysql"
    "--with-mysql-libs=${libmysqlclient}/lib/mysql"
  ];

  passthru.tests = {