tdlib: fix cross-compilation (#374150)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
writeShellApplication,
|
||||
common-updater-scripts,
|
||||
jq,
|
||||
buildPackages,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -49,12 +50,28 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gperf
|
||||
openssl
|
||||
readline
|
||||
zlib
|
||||
];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gperf
|
||||
];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
cmake -B native-build \
|
||||
-DCMAKE_C_COMPILER=$CC_FOR_BUILD \
|
||||
-DCMAKE_CXX_COMPILER=$CXX_FOR_BUILD \
|
||||
-DCMAKE_AR=$(command -v $AR_FOR_BUILD) \
|
||||
-DCMAKE_RANLIB=$(command -v $RANLIB_FOR_BUILD) \
|
||||
-DCMAKE_STRIP=$(command -v $STRIP_FOR_BUILD) \
|
||||
-DTD_GENERATE_SOURCE_FILES=ON .
|
||||
cmake --build native-build -j $NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
# https://github.com/tdlib/td/issues/1974
|
||||
postPatch =
|
||||
|
||||
Reference in New Issue
Block a user