wlcs: Fix GCC 14 compat

This commit is contained in:
OPNA2608
2024-12-27 13:35:10 +01:00
parent 6bd8592d7c
commit cc38f61d50

View File

@@ -3,6 +3,7 @@
lib,
gitUpdater,
fetchFromGitHub,
fetchpatch,
testers,
cmake,
pkg-config,
@@ -23,6 +24,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-BQPRymkbGu4YvTYXTaTMuyP5fHpqMWI4xPwjDRHZNEQ=";
};
patches = [
# Remove when version > 1.7.0
(fetchpatch {
name = "0001-wlcs-Fix-GCC14-compat.patch";
url = "https://github.com/canonical/wlcs/commit/5c812e560052e2cbff4c6d26439935020ddee52f.patch";
hash = "sha256-8YrVKhgpTYZi8n4dZ4pRWJoAcZtr9eaFMv0NNV7/kWU=";
})
];
strictDeps = true;
nativeBuildInputs = [
@@ -38,6 +48,9 @@ stdenv.mkDerivation (finalAttrs: {
wayland-scanner # needed by cmake
];
# GCC14-exclusive maybe-uninitialized error at higher optimisation levels that looks weird
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=maybe-uninitialized";
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater {