diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2024-03-06 12:21:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 12:21:52 +0100 |
commit | a03387a1edd4b72e74912b47c97e2b5ac23642b3 (patch) | |
tree | 916730d0d348a9aa86d1dde3f53a49c0374abd76 | |
parent | 5b44915269e6ebab5eafcbfc273e6cbdcecd2827 (diff) | |
parent | bbaca2d369cf3a38492b8dfe4aaa541b957eee2d (diff) |
Merge pull request #277942 from NixOS/backport-275488-to-release-23.11
[Backport release-23.11] libck and sysbench cross-compilation fix
-rw-r--r-- | pkgs/development/libraries/libck/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/tools/misc/sysbench/default.nix | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libck/default.nix b/pkgs/development/libraries/libck/default.nix index 35a5541bc368b..cc53d4957eb41 100644 --- a/pkgs/development/libraries/libck/default.nix +++ b/pkgs/development/libraries/libck/default.nix @@ -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; { diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix index 1e15c6ab0f2f0..85d289e49b7ae 100644 --- a/pkgs/development/tools/misc/sysbench/default.nix +++ b/pkgs/development/tools/misc/sysbench/default.nix @@ -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 = { |