diff --git a/pkgs/by-name/mi/miracle-wm/package.nix b/pkgs/by-name/mi/miracle-wm/package.nix index 27cc4ecd5902e..2a6ff5f5c53ef 100644 --- a/pkgs/by-name/mi/miracle-wm/package.nix +++ b/pkgs/by-name/mi/miracle-wm/package.nix @@ -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 = [ diff --git a/pkgs/servers/mir/common.nix b/pkgs/servers/mir/common.nix index 37a428361018f..4041ae7cf087e 100644 --- a/pkgs/servers/mir/common.nix +++ b/pkgs/servers/mir/common.nix @@ -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 - - # 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 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" - ''; + 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 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" + ''; 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" + ]; }; }) diff --git a/pkgs/servers/mir/default.nix b/pkgs/servers/mir/default.nix index eee124bde90f9..bbf250bf7a565 100644 --- a/pkgs/servers/mir/default.nix +++ b/pkgs/servers/mir/default.nix @@ -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 {