Unverified Commit 652f69f9 authored by Jonas Heinrich's avatar Jonas Heinrich Committed by GitHub
Browse files

Merge pull request #211786 from OPNA2608/update/mir

wlcs,mir: bump
parents 1d400a8f ccb23e07
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
@@ -12,27 +12,22 @@

stdenv.mkDerivation rec {
  pname = "wlcs";
  version = "1.4.0";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "MirServer";
    repo = "wlcs";
    rev = "v${version}";
    hash = "sha256-ep5BHa9PgfB50gxJySaw0YAc1upBbncOiX9PCqHLbpE=";
    hash = "sha256-QxmWxu+w77/WE5pGXMWXm+NP95QmYo2O8ltZYrgCIWw=";
  };

  patches = [
    # Fixes pkg-config paths
    # Remove when https://github.com/MirServer/wlcs/pull/258 merged & in a release
    # Improves pkg-config paths even more
    # Remove when https://github.com/MirServer/wlcs/pull/260 merged & in a release
    (fetchpatch {
      name = "0001-wlcs-pkgsconfig-use-FULL-install-vars.patch";
      url = "https://github.com/MirServer/wlcs/pull/258/commits/9002cb7323d94aba7fc1ce5927f445e9beb30d70.patch";
      hash = "sha256-+uhFRKhG59w99oES4RA+L5hHyJ5pf4ij97pTokERPys=";
    })
    (fetchpatch {
      name = "0002-wlcs-CMAKE_INSTALL_INCLUDEDIR-for-headers.patch";
      url = "https://github.com/MirServer/wlcs/pull/258/commits/71263172c9ba57be9c05f1e07dd40d1f378ca6d0.patch";
      hash = "sha256-nV/72W9DW3AvNGhUZ+tzmQZow3BkxEH3D6QFBZIGjj8=";
      name = "0001-wlcs-pkgsconfig-Use-better-path-concatenations.patch";
      url = "https://github.com/MirServer/wlcs/pull/260/commits/20f28d82fa4dfa6a6e27212dbd6b0f2e8a833c69.patch";
      hash = "sha256-m8zPD27JbX/vN2YQgNhcRsh/O+qLfvoeky5E5ZEeD1I=";
    })
  ];

@@ -72,6 +67,6 @@ stdenv.mkDerivation rec {
    changelog = "https://github.com/MirServer/wlcs/releases/tag/v${version}";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ OPNA2608 ];
    inherit (wayland.meta) platforms;
    platforms = platforms.linux;
  };
}
+22 −37
Original line number Diff line number Diff line
@@ -49,38 +49,30 @@ in

stdenv.mkDerivation rec {
  pname = "mir";
  version = "2.11.0";
  version = "2.12.0";

  src = fetchFromGitHub {
    owner = "MirServer";
    repo = "mir";
    rev = "v${version}";
    hash = "sha256-103PJZEoSgtSbDGCanD2/XdpX6DXXx678GmghdZI7H4=";
    hash = "sha256-HQmcYnmzeJCsgMoM/y70PCF+3umZh0xJS5S0wFODlmo=";
  };

  patches = [
    # These four patches fix various path concatenation problems and missing GNUInstallDirs variable uses that affect
    # Fixes various path concatenation problems and missing GNUInstallDirs variable uses that affect
    # install locations and generated pkg-config files
    # Remove when MirServer/mir/pull/2786 merged & a version > 2.11.0 has the fixes
    # Remove when a version > 2.12.0 has the fixes
    (fetchpatch {
      name = "0001-mir-Better-pkg-config-path-concatenations.patch";
      url = "https://github.com/MirServer/mir/pull/2786/commits/a322be08002ae7b2682d3ca7037c314ce900d3c7.patch";
      hash = "sha256-6nScVan3eefXZb+0T9TvCjRQt+rCMj27sukpdGMVJzY=";
      name = "0001-mir-Better-install-path-concatenations-and-more-GNUInstallDirs-variables.patch";
      url = "https://github.com/MirServer/mir/commit/58c4ca628748278b1eb7a3721ad9a0c3590e28f2.patch";
      hash = "sha256-+FNVlApaVzA94cy4awulLwTtggD07xACbvjII/RxyRM=";
    })
    # Fixes doc building
    # Remove when a version > 2.12.0 has the fix
    (fetchpatch {
      name = "0002-mir-Improve-mirtest-pkg-config.patch";
      url = "https://github.com/MirServer/mir/pull/2786/commits/7a739fde27f5f5eff0ec33f766a807c3ff462663.patch";
      hash = "sha256-C2cDN4R0C4654Km27PJwKrNiFi/d0iz9/rcABS6eRVI=";
    })
    (fetchpatch {
      name = "0003-mir-Fix-GNUInstallDirs-variable-concatenations-in-CMake.patch";
      url = "https://github.com/MirServer/mir/pull/2786/commits/543e1ec0162f95611b282d33a2e81a642dc75374.patch";
      hash = "sha256-nxgj8tTfSqjRxqi67hAuWM9d604TAwhNjUXwGDAEW6A=";
    })
    (fetchpatch {
      name = "0004-mir-More-GNUInstallDirs-variables-less-FULL.patch";
      url = "https://github.com/MirServer/mir/pull/2786/commits/0cb0a1d5e3ac4aca25ca2ebacdcb984d7ff3a66a.patch";
      hash = "sha256-rnDvr8ul/GgajHYbpale+szNE6VDgENRY6PnBhfGMN8=";
      name = "0002-mir-better-removal-of-existing-docs.patch";
      url = "https://github.com/MirServer/mir/commit/04892531c988201f0219ce140f27d7ff60eeebd5.patch";
      hash = "sha256-LyGgaIoe6mk4IQxBo6Xk5SmIBtTXOXAOA1xAgsdhcLY=";
    })
  ];

@@ -100,16 +92,6 @@ stdenv.mkDerivation rec {
        --replace 'LD_PRELOAD=libumockdev-preload.so.0' 'LD_PRELOAD=${lib.getLib umockdev}/lib/libumockdev-preload.so.0'
    done

    # Patch in which tests we want to skip
    substituteInPlace cmake/MirCommon.cmake \
      --replace 'set(test_exclusion_filter)' 'set(test_exclusion_filter "${lib.strings.concatStringsSep ":" [
        # These all fail in the same way: GDK_BACKEND expected to have "wayland", actually has "wayland,x11".
        # They succeed when run interactively, don't know how to fix them.
        "ExternalClient.empty_override_does_nothing"
        "ExternalClient.strange_override_does_nothing"
        "ExternalClient.another_strange_override_does_nothing"
      ]}")'

    # Fix Xwayland default
    substituteInPlace src/miral/x11_support.cpp \
      --replace '/usr/bin/Xwayland' '${xwayland}/bin/Xwayland'
@@ -124,10 +106,6 @@ stdenv.mkDerivation rec {
    substituteInPlace cmake/Doxygen.cmake \
      --replace '"date"' '"date" "--date=@'"$SOURCE_DATE_EPOCH"'"' \
      --replace "\''${CMAKE_INSTALL_PREFIX}/share/doc/mir-doc" "\''${CMAKE_INSTALL_DOCDIR}"

    # Not installed on Mir HEAD anymore, hence not part of the MirServer/mir/pull/2786 patches
    substituteInPlace examples/miral-kiosk/CMakeLists.txt \
      --replace "\''${CMAKE_INSTALL_PREFIX}/bin" "\''${CMAKE_INSTALL_BINDIR}"
  '';

  strictDeps = true;
@@ -183,8 +161,11 @@ stdenv.mkDerivation rec {
  cmakeFlags = [
    "-DMIR_PLATFORM='gbm-kms;x11;eglstream-kms;wayland'"
    "-DMIR_ENABLE_TESTS=${if doCheck then "ON" else "OFF"}"
    # Eventually renamed to MIR_SIGBUS_HANDLER_ENVIRONMENT_BROKEN
    "-DMIR_BAD_BUFFER_TEST_ENVIRONMENT_BROKEN=ON"
    # BadBufferTest.test_truncated_shm_file *doesn't* throw an error as the test expected, mark as such
    # https://github.com/MirServer/mir/pull/1947#issuecomment-811810872
    "-DMIR_SIGBUS_HANDLER_ENVIRONMENT_BROKEN=ON"
    "-DMIR_EXCLUDE_TESTS=${lib.strings.concatStringsSep ";" [
    ]}"
    # These get built but don't get executed by default, yet they get installed when tests are enabled
    "-DMIR_BUILD_PERFORMANCE_TESTS=OFF"
    "-DMIR_BUILD_PLATFORM_TEST_HARNESS=OFF"
@@ -193,9 +174,13 @@ stdenv.mkDerivation rec {
  inherit doCheck;

  preCheck = ''
    export XDG_RUNTIME_DIR=$TMPDIR
    # Needs to be exactly /tmp so some failing tests don't get run, don't know why they fail yet
    # https://github.com/MirServer/mir/issues/2801
    export XDG_RUNTIME_DIR=/tmp
  '';

  checkTarget = "ptest";

  outputs = [ "out" "dev" "doc" ];

  passthru = {