Merge pull request #156303 from NickCao/mariadb-cross

mariadb: fix cross compilation
This commit is contained in:
Guillaume Girol 2022-01-29 21:13:02 +00:00 committed by GitHub
commit 1ca0069b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, nixosTests
{ lib, stdenv, fetchurl, nixosTests, buildPackages
# Native buildInputs components
, bison, boost, cmake, fixDarwinDylibNames, flex, makeWrapper, pkg-config
# Common components
@ -18,7 +18,7 @@ let # in mariadb # spans the whole file
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
mytopEnv = perl.withPackages (p: with p; [ DBDmysql DBI TermReadKey ]);
mytopEnv = buildPackages.perl.withPackages (p: with p; [ DBDmysql DBI TermReadKey ]);
mariadbPackage = packageSettings: (server packageSettings) // {
client = client packageSettings; # MariaDB Client
@ -208,6 +208,10 @@ in stdenv.mkDerivation (common // {
"-DPLUGIN_AUTH_PAM=OFF"
"-DWITHOUT_OQGRAPH=1"
"-DWITHOUT_PLUGIN_S3=1"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
# revisit this if nixpkgs supports any architecture whose stack grows upwards
"-DSTACK_DIRECTION=-1"
"-DCMAKE_CROSSCOMPILING_EMULATOR=${stdenv.hostPlatform.emulator buildPackages}"
];
preConfigure = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''