diff --git a/pkgs/development/libraries/x265/default.nix b/pkgs/development/libraries/x265/default.nix index 9f3f97b1bc57..8e16ca72e003 100644 --- a/pkgs/development/libraries/x265/default.nix +++ b/pkgs/development/libraries/x265/default.nix @@ -79,6 +79,9 @@ stdenv.mkDerivation rec { "-DEXPORT_C_API=OFF" ] ++ lib.optionals stdenv.hostPlatform.isPower [ "-DENABLE_ALTIVEC=OFF" # https://bitbucket.org/multicoreware/x265_git/issues/320/fail-to-build-on-power8-le + ] ++ lib.optionals isCross [ + (mkFlag stdenv.hostPlatform.isAarch32 "CROSS_COMPILE_ARM") + (mkFlag stdenv.hostPlatform.isAarch64 "CROSS_COMPILE_ARM64") ]; preConfigure = lib.optionalString multibitdepthSupport '' @@ -99,11 +102,6 @@ stdenv.mkDerivation rec { ${mkFlag cliSupport "ENABLE_CLI"} ${mkFlag unittestsSupport "ENABLE_TESTS"} ) - '' + lib.optionalString isCross '' - cmakeFlagsArray+=( - ${mkFlag (stdenv.hostPlatform.isAarch32) "CROSS_COMPILE_ARM"} - ${mkFlag (stdenv.hostPlatform.isAarch64) "CROSS_COMPILE_ARM64"} - ) ''; # Builds 10bits and 12bits static libs on the side if multi bit-depth is wanted