qt: fixate the linux version

When building on Linux, the Qt build process includes
`CMAKE_SYSTEM_VERSION` in the resulting module description, which
defaults to the kernel version of the build host, breaking
reproducibility.

This change clears the `CMAKE_SYSTEM_VERSION` which is supported
by the build process and leaves out the version, giving us
reproducibility and avoiding increased rebuilds when the Linux
kernel is updated.

This is tracked upstream as QTBUG-136060
This commit is contained in:
Arnout Engelen
2025-04-23 15:38:39 +02:00
parent c11863f1e9
commit fb14fab977
2 changed files with 8 additions and 2 deletions
@@ -263,6 +263,9 @@ stdenv.mkDerivation rec {
"-DQT_FEATURE_system_sqlite=ON"
"-DQT_FEATURE_openssl_linked=ON"
"-DQT_FEATURE_vulkan=ON"
# don't leak OS version into the final output
# https://bugreports.qt.io/browse/QTBUG-136060
"-DCMAKE_SYSTEM_VERSION="
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
"-DQT_FEATURE_sctp=ON"
+5 -2
View File
@@ -39,8 +39,11 @@ stdenv.mkDerivation (
++ (args.propagatedBuildInputs or [ ]);
cmakeFlags =
args.cmakeFlags or [ ]
++ lib.optional stdenv.hostPlatform.isDarwin "-DQT_NO_XCODE_MIN_VERSION_CHECK=ON";
# don't leak OS version into the final output
# https://bugreports.qt.io/browse/QTBUG-136060
[ "-DCMAKE_SYSTEM_VERSION=" ]
++ lib.optional stdenv.hostPlatform.isDarwin "-DQT_NO_XCODE_MIN_VERSION_CHECK=ON"
++ args.cmakeFlags or [ ];
moveToDev = false;