mir: 2.21.1 -> 2.22.0 (#437542)

This commit is contained in:
Cosima Neidahl
2025-08-29 09:06:49 +02:00
committed by GitHub
4 changed files with 54 additions and 36 deletions
+9 -6
View File
@@ -2,7 +2,7 @@
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
unstableGitUpdater,
nixosTests,
boost,
cmake,
@@ -31,20 +31,19 @@
stdenv.mkDerivation (finalAttrs: {
pname = "miracle-wm";
version = "0.6.2";
version = "0.6.2-unstable-2025-08-27";
src = fetchFromGitHub {
owner = "miracle-wm-org";
repo = "miracle-wm";
tag = "v${finalAttrs.version}";
hash = "sha256-zUqW21gZC7J/E0cld11N6OyclpgKCh4F7m/soBi3N1E=";
rev = "0a55a023adf511b042f922aeba666744805be988";
hash = "sha256-yf7knY1tNFeCwePsfTAMAxIma+ZeZUvqpMJe7ABahEw=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'DESTINATION /usr/lib' 'DESTINATION ''${CMAKE_INSTALL_LIBDIR}' \
--replace-fail '-march=native' '# -march=native' \
--replace-fail '-flto' '# -flto'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
substituteInPlace CMakeLists.txt \
@@ -89,7 +88,9 @@ stdenv.mkDerivation (finalAttrs: {
checkInputs = [ gtest ];
cmakeFlags = [
(lib.cmakeBool "ENABLE_LTO" true)
(lib.cmakeBool "SYSTEMD_INTEGRATION" true)
(lib.cmakeBool "END_TO_END_TESTS" finalAttrs.finalPackage.doCheck)
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
@@ -97,6 +98,8 @@ stdenv.mkDerivation (finalAttrs: {
checkPhase = ''
runHook preCheck
export XDG_RUNTIME_DIR=$TMP
./tests/miracle-wm-tests
runHook postCheck
@@ -115,7 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
updateScript = unstableGitUpdater { tagPrefix = "v"; };
providedSessions = [ "miracle-wm" ];
tests.vm = nixosTests.miracle-wm;
};
+2 -12
View File
@@ -3,7 +3,6 @@
lib,
gitUpdater,
fetchFromGitHub,
fetchpatch,
testers,
cmake,
pkg-config,
@@ -15,24 +14,15 @@
stdenv.mkDerivation (finalAttrs: {
pname = "wlcs";
version = "1.7.0";
version = "1.8.1";
src = fetchFromGitHub {
owner = "MirServer";
repo = "wlcs";
rev = "v${finalAttrs.version}";
hash = "sha256-BQPRymkbGu4YvTYXTaTMuyP5fHpqMWI4xPwjDRHZNEQ=";
hash = "sha256-W4/a7neFcaqdPIAWDk5TcIuIWZ76rC7xCk3beJVqE/E=";
};
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 = [
+23 -9
View File
@@ -13,6 +13,7 @@
glib,
glm,
libapparmor,
libdisplay-info,
libdrm,
libepoxy,
libevdev,
@@ -25,6 +26,7 @@
yaml-cpp,
lttng-ust,
libgbm,
mesa,
nettle,
pixman,
udev,
@@ -136,11 +138,17 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals (lib.strings.versionAtLeast version "2.21.0") [
pixman
]
++ lib.optionals (lib.strings.versionAtLeast version "2.22.0") [
libdisplay-info
];
nativeCheckInputs = [
dbus
gobject-introspection
]
++ lib.optionals (lib.strings.versionAtLeast version "2.22.0") [
mesa.llvmpipeHook
];
checkInputs = [
@@ -153,9 +161,10 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "BUILD_DOXYGEN" false)
(lib.cmakeFeature "MIR_PLATFORM" (
lib.strings.concatStringsSep ";" [
"atomic-kms"
"gbm-kms"
"x11"
"eglstream-kms"
"x11"
"wayland"
]
))
@@ -164,10 +173,12 @@ stdenv.mkDerivation (finalAttrs: {
# https://github.com/canonical/mir/pull/1947#issuecomment-811810872
(lib.cmakeBool "MIR_SIGBUS_HANDLER_ENVIRONMENT_BROKEN" true)
(lib.cmakeFeature "MIR_EXCLUDE_TESTS" (
lib.strings.concatStringsSep ";" [
# https://github.com/canonical/mir/issues/3716#issuecomment-2580698552
"UdevWrapperTest.UdevMonitorDoesNotTriggerBeforeEnabling"
]
lib.strings.concatStringsSep ";" (
lib.optionals (lib.strings.versionOlder version "2.22.0") [
# https://github.com/canonical/mir/issues/3716#issuecomment-2580698552
"UdevWrapperTest.UdevMonitorDoesNotTriggerBeforeEnabling"
]
)
))
# These get built but don't get executed by default, yet they get installed when tests are enabled
(lib.cmakeBool "MIR_BUILD_PERFORMANCE_TESTS" false)
@@ -176,16 +187,19 @@ stdenv.mkDerivation (finalAttrs: {
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106799
(lib.cmakeBool "MIR_USE_PRECOMPILED_HEADERS" false)
(lib.cmakeFeature "MIR_COMPILER_QUIRKS" (
lib.strings.concatStringsSep ";" [
# https://github.com/canonical/mir/issues/3017 actually affects x86_64 as well
"test_touchspot_controller.cpp:array-bounds"
]
lib.strings.concatStringsSep ";" (
lib.optionals (lib.strings.versionOlder version "2.22.0") [
# https://github.com/canonical/mir/issues/3017 actually affects x86_64 as well
"test_touchspot_controller.cpp:array-bounds"
]
)
))
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
preCheck = ''
export HOME=$TMP # shader cache
export XDG_RUNTIME_DIR=$TMP
'';
+20 -9
View File
@@ -5,15 +5,8 @@ let
in
{
mir = common {
version = "2.21.1";
hash = "sha256-FDZ40LiuvMuyWQQGjgOHTm+J3i7yczKMzL3dZ1jsz/E=";
patches = [
(fetchpatch {
name = "0001-Fix-gtest-nodiscard-error.patch";
url = "https://github.com/canonical/mir/commit/60dab2b197deb159087e44865e7314ad2865b79d.patch";
hash = "sha256-fB49E+Wjm2zJnie9Ws+tP0d6lxcG3V/C/UDfy/4iuFU=";
})
];
version = "2.22.0";
hash = "sha256-46FxyS4Anm1id63GUUCzn9ubTQIvs1+HrXKgZki6fQw=";
};
mir_2_15 = common {
@@ -44,6 +37,24 @@ in
hash = "sha256-QuVZBcHSn/DK+xbjM36Y89+w22vk7NRV4MkbjgvS28A=";
})
# Exclude known-flaky tests
# Remove when version > 2.15.0
(fetchpatch {
name = "0004-mir-exclude-tests-surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones-1.patch";
url = "https://github.com/canonical/mir/commit/967d872daab50d845adce389c0672edfd18b90c9.patch";
hash = "sha256-XfTWQj+fmPpC1hIqt7ELGU6Yq2wJSO+FQ8bsikI5h0I=";
})
(fetchpatch {
name = "0005-mir-exclude-tests-surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones-2.patch";
url = "https://github.com/canonical/mir/commit/932d8744852bca9830668018474890bce0c5f6d6.patch";
hash = "sha256-+udEt6pF5VLSBtRgo9r1YdVsinARWLAL4AeEG01DV68=";
})
(fetchpatch {
name = "0006-mir-exclude-tests-surfaces_with_exclusive_zone_set_to_negative_one_do_not_respect_other_exclusive_zones-3.patch";
url = "https://github.com/canonical/mir/commit/fbad5e50be02992f6cf1f41f928950532f3f62c5.patch";
hash = "sha256-J0YEhXf8sAWEHHxU7QKSJjOoHiXsYqotBfgGm79X6GA=";
})
# Fix ignored return value of std::lock_guard
# Remove when version > 2.15.0
# Was changed as part of the big platform API change, no individual upstream commit with this fix