mir: 2.17.2 -> 2.18.2 (#342624)

This commit is contained in:
Cosima Neidahl 2024-10-02 13:16:18 +02:00 committed by GitHub
commit b7d495d9ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 45 deletions

View File

@ -27,13 +27,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "miracle-wm";
version = "0.3.5";
version = "0.3.6";
src = fetchFromGitHub {
owner = "mattkae";
repo = "miracle-wm";
rev = "v${finalAttrs.version}";
hash = "sha256-2OoMkD4ChNXzqqzdOvzYRL0UYU7Uecm5yTXCvG45jCI=";
hash = "sha256-fK/g6DhcxJMvxujZDZXs1yXRu2FGZQKmhxw7/czAQiY=";
};
patches = [

View File

@ -2,6 +2,7 @@
stdenv,
lib,
fetchFromGitHub,
nixosTests,
testers,
cmake,
pkg-config,
@ -12,6 +13,7 @@
glib,
glm,
glog,
libapparmor,
libdrm,
libepoxy,
libevdev,
@ -58,28 +60,31 @@ stdenv.mkDerivation (finalAttrs: {
inherit patches;
postPatch = ''
# Fix scripts that get run in tests
patchShebangs tools/detect_fd_leaks.bash tests/acceptance-tests/wayland-generator/test_wayland_generator.sh.in
postPatch =
''
# Fix scripts that get run in tests
patchShebangs tools/detect_fd_leaks.bash tests/acceptance-tests/wayland-generator/test_wayland_generator.sh.in
# Fix LD_PRELOADing in tests
substituteInPlace \
cmake/MirCommon.cmake \
tests/umock-acceptance-tests/CMakeLists.txt \
tests/unit-tests/platforms/gbm-kms/kms/CMakeLists.txt \
tests/unit-tests/CMakeLists.txt \
--replace-warn 'LD_PRELOAD=liblttng-ust-fork.so' 'LD_PRELOAD=${lib.getLib lttng-ust}/lib/liblttng-ust-fork.so' \
--replace-warn 'LD_PRELOAD=libumockdev-preload.so.0' 'LD_PRELOAD=${lib.getLib umockdev}/lib/libumockdev-preload.so.0'
# Fix LD_PRELOADing in tests
substituteInPlace \
cmake/MirCommon.cmake \
tests/umock-acceptance-tests/CMakeLists.txt \
tests/unit-tests/platforms/gbm-kms/kms/CMakeLists.txt \
tests/unit-tests/CMakeLists.txt \
--replace-warn 'LD_PRELOAD=liblttng-ust-fork.so' 'LD_PRELOAD=${lib.getLib lttng-ust}/lib/liblttng-ust-fork.so' \
--replace-warn 'LD_PRELOAD=libumockdev-preload.so.0' 'LD_PRELOAD=${lib.getLib umockdev}/lib/libumockdev-preload.so.0'
# Fix Xwayland default
substituteInPlace src/miral/x11_support.cpp \
--replace-fail '/usr/bin/Xwayland' '${lib.getExe xwayland}'
# Fix Xwayland default
substituteInPlace src/miral/x11_support.cpp \
--replace-fail '/usr/bin/Xwayland' '${lib.getExe xwayland}'
''
+ lib.optionalString (lib.strings.versionOlder version "2.18.0") ''
# Fix paths for generating drm-formats
substituteInPlace src/platform/graphics/CMakeLists.txt \
--replace-fail "/usr/include/drm/drm_fourcc.h" "${lib.getDev libdrm}/include/libdrm/drm_fourcc.h" \
--replace-fail "/usr/include/libdrm/drm_fourcc.h" "${lib.getDev libdrm}/include/libdrm/drm_fourcc.h"
'';
# Fix paths for generating drm-formats
substituteInPlace src/platform/graphics/CMakeLists.txt \
--replace-fail "/usr/include/drm/drm_fourcc.h" "${lib.getDev libdrm}/include/libdrm/drm_fourcc.h" \
--replace-fail "/usr/include/libdrm/drm_fourcc.h" "${lib.getDev libdrm}/include/libdrm/drm_fourcc.h"
'';
strictDeps = true;
@ -127,7 +132,7 @@ stdenv.mkDerivation (finalAttrs: {
xorg.libXcursor
xorg.xorgproto
xwayland
];
] ++ lib.optionals (lib.strings.versionAtLeast version "2.18.0") [ libapparmor ];
nativeCheckInputs = [
dbus
@ -181,7 +186,9 @@ stdenv.mkDerivation (finalAttrs: {
];
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
tests = {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
} // lib.optionalAttrs (!pinned) { inherit (nixosTests) miriway miracle-wm; };
providedSessions = lib.optionals (lib.strings.versionOlder version "2.16.0") [
# More of an example than a fully functioning shell, some notes for the adventurous:
# - ~/.config/miral-shell.config is one possible user config location,
@ -192,9 +199,7 @@ stdenv.mkDerivation (finalAttrs: {
# does not know about preferred terminal
"mir-shell"
];
} // lib.optionalAttrs (!pinned) {
updateScript = ./update.sh;
};
} // lib.optionalAttrs (!pinned) { updateScript = ./update.sh; };
meta = {
description = "Display server and Wayland compositor developed by Canonical";
@ -206,22 +211,23 @@ stdenv.mkDerivation (finalAttrs: {
OPNA2608
];
platforms = lib.platforms.linux;
pkgConfigModules = [
"miral"
"mircommon"
"mircore"
"miroil"
"mirplatform"
"mir-renderer-gl-dev"
"mirrenderer"
"mirserver"
"mirtest"
"mirwayland"
] ++ lib.optionals (lib.strings.versionOlder version "2.17.0") [
"mircookie"
] ++ lib.optionals (lib.strings.versionAtLeast version "2.17.0") [
"mircommon-internal"
"mirserver-internal"
];
pkgConfigModules =
[
"miral"
"mircommon"
"mircore"
"miroil"
"mirplatform"
"mir-renderer-gl-dev"
"mirrenderer"
"mirserver"
"mirtest"
"mirwayland"
]
++ lib.optionals (lib.strings.versionOlder version "2.17.0") [ "mircookie" ]
++ lib.optionals (lib.strings.versionAtLeast version "2.17.0") [
"mircommon-internal"
"mirserver-internal"
];
};
})

View File

@ -5,8 +5,8 @@ let
in
{
mir = common {
version = "2.17.2";
hash = "sha256-OwOGt3X7+UchksyPf/sodit2PHpSlpP2S3gkCPcdzfE=";
version = "2.18.2";
hash = "sha256-Yko5ws8dUazPziXzM77Zg4p1taC0mbjAcpOKJR0dJ5M=";
};
mir_2_15 = common {