mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 12:44:20 +00:00
Revert "qt5.qtbase: fix cross"
This commit is contained in:
parent
39ab45da6e
commit
6e8985702c
@ -207,8 +207,7 @@ let
|
|||||||
import ../qtModule.nix
|
import ../qtModule.nix
|
||||||
{
|
{
|
||||||
inherit perl;
|
inherit perl;
|
||||||
inherit lib stdenv;
|
inherit lib;
|
||||||
inherit buildPackages;
|
|
||||||
# Use a variant of mkDerivation that does not include wrapQtApplications
|
# Use a variant of mkDerivation that does not include wrapQtApplications
|
||||||
# to avoid cyclic dependencies between Qt modules.
|
# to avoid cyclic dependencies between Qt modules.
|
||||||
mkDerivation =
|
mkDerivation =
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
if [[ -n "${__nix_qtbase-}" ]]; then
|
if [[ -n "${__nix_qtbase-}" ]]; then
|
||||||
if [ -z "${dontWorryAboutQtMismatch-}" ]; then
|
|
||||||
# Throw an error if a different version of Qt was already set up.
|
# Throw an error if a different version of Qt was already set up.
|
||||||
if [[ "$__nix_qtbase" != "@dev@" ]]; then
|
if [[ "$__nix_qtbase" != "@dev@" ]]; then
|
||||||
echo >&2 "Error: detected mismatched Qt dependencies:"
|
echo >&2 "Error: detected mismatched Qt dependencies:"
|
||||||
@ -7,7 +6,6 @@ if [[ -n "${__nix_qtbase-}" ]]; then
|
|||||||
echo >&2 " $__nix_qtbase"
|
echo >&2 " $__nix_qtbase"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
else # Only set up Qt once.
|
else # Only set up Qt once.
|
||||||
__nix_qtbase="@dev@"
|
__nix_qtbase="@dev@"
|
||||||
|
|
||||||
|
@ -28,15 +28,10 @@
|
|||||||
, developerBuild ? false
|
, developerBuild ? false
|
||||||
, decryptSslTraffic ? false
|
, decryptSslTraffic ? false
|
||||||
, testers
|
, testers
|
||||||
, buildPackages
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
debugSymbols = debug || developerBuild;
|
debugSymbols = debug || developerBuild;
|
||||||
qtPlatformCross = plat: with plat;
|
|
||||||
if isLinux
|
|
||||||
then "linux-generic-g++"
|
|
||||||
else throw "Please add a qtPlatformCross entry for ${plat.config}";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
@ -87,11 +82,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ]
|
nativeBuildInputs = [ bison flex gperf lndir perl pkg-config which ]
|
||||||
++ lib.optionals stdenv.isDarwin [ xcbuild ];
|
++ lib.optionals stdenv.isDarwin [ xcbuild ];
|
||||||
|
|
||||||
# `qtbase` expects to find `cc` (with no prefix) in the
|
|
||||||
# `$PATH`, so the following is needed even if
|
|
||||||
# `stdenv.buildPlatform.canExecute stdenv.hostPlatform`
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
||||||
|
|
||||||
propagatedNativeBuildInputs = [ lndir ];
|
propagatedNativeBuildInputs = [ lndir ];
|
||||||
|
|
||||||
# libQt5Core links calls CoreFoundation APIs that call into the system ICU. Binaries linked
|
# libQt5Core links calls CoreFoundation APIs that call into the system ICU. Binaries linked
|
||||||
@ -171,11 +161,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
|
export MAKEFLAGS+=" -j$NIX_BUILD_CORES"
|
||||||
|
|
||||||
./bin/syncqt.pl -version $version
|
./bin/syncqt.pl -version $version
|
||||||
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
|
||||||
# QT's configure script will refuse to use pkg-config unless these two environment variables are set
|
|
||||||
export PKG_CONFIG_SYSROOT_DIR=/
|
|
||||||
export PKG_CONFIG_LIBDIR=${lib.getLib pkg-config}/lib
|
|
||||||
echo 'QMAKE_PKG_CONFIG=''$''${CROSS_COMPILE}pkg-config' >> mkspecs/devices/${qtPlatformCross stdenv.hostPlatform}/qmake.conf
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
@ -223,8 +208,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
# To prevent these failures, we need to override PostgreSQL detection.
|
# To prevent these failures, we need to override PostgreSQL detection.
|
||||||
PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
|
PSQL_LIBS = lib.optionalString (postgresql != null) "-L${postgresql.lib}/lib -lpq";
|
||||||
|
|
||||||
# do not pass --host and --build to configureFlags as QT's configure script doesn't understand them
|
|
||||||
configurePlatforms = [ ];
|
|
||||||
# TODO Remove obsolete and useless flags once the build will be totally mastered
|
# TODO Remove obsolete and useless flags once the build will be totally mastered
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"-plugindir $(out)/$(qtPluginPrefix)"
|
"-plugindir $(out)/$(qtPluginPrefix)"
|
||||||
@ -251,9 +234,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
"-L" "${icu.out}/lib"
|
"-L" "${icu.out}/lib"
|
||||||
"-I" "${icu.dev}/include"
|
"-I" "${icu.dev}/include"
|
||||||
"-pch"
|
"-pch"
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-device ${qtPlatformCross stdenv.hostPlatform}"
|
|
||||||
"-device-option CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
||||||
]
|
]
|
||||||
++ lib.optional debugSymbols "-debug"
|
++ lib.optional debugSymbols "-debug"
|
||||||
++ lib.optionals developerBuild [
|
++ lib.optionals developerBuild [
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{ lib
|
{ lib, mkDerivation, perl }:
|
||||||
, stdenv
|
|
||||||
, mkDerivation, perl
|
|
||||||
, buildPackages
|
|
||||||
}:
|
|
||||||
|
|
||||||
let inherit (lib) licenses maintainers platforms; in
|
let inherit (lib) licenses maintainers platforms; in
|
||||||
|
|
||||||
@ -21,8 +17,7 @@ mkDerivation (args // {
|
|||||||
patches = (args.patches or []) ++ (patches.${pname} or []);
|
patches = (args.patches or []) ++ (patches.${pname} or []);
|
||||||
|
|
||||||
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
|
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
|
||||||
propagatedBuildInputs = (args.qtInputs or []) ++ (args.propagatedBuildInputs or []);
|
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
||||||
|
|
||||||
outputs = args.outputs or [ "out" "dev" ];
|
outputs = args.outputs or [ "out" "dev" ];
|
||||||
setOutputFlags = args.setOutputFlags or false;
|
setOutputFlags = args.setOutputFlags or false;
|
||||||
@ -79,7 +74,4 @@ mkDerivation (args // {
|
|||||||
maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
|
maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
} // (args.meta or {});
|
} // (args.meta or {});
|
||||||
|
|
||||||
} // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
|
|
||||||
dontWorryAboutQtMismatch = true;
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user