From 3c0a99ed60bc2337886c9619733a9e0187a76076 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 20 Jan 2025 21:39:55 +0100 Subject: [PATCH] mir,mir_2_15: Drop glog dependency glog pkg-config file disappeared after https://github.com/NixOS/nixpkgs/pull/364543. - mir doesn't depend on it anymore - mir_2_15 did, and re-enabling the pkg-config file for the new glog version errored out Upstream decided to just drop glog as a dependency, so follow suit. --- pkgs/servers/mir/common.nix | 2 -- pkgs/servers/mir/default.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/mir/common.nix b/pkgs/servers/mir/common.nix index d9a56369f30fc..ccc1150db5b73 100644 --- a/pkgs/servers/mir/common.nix +++ b/pkgs/servers/mir/common.nix @@ -12,7 +12,6 @@ freetype, glib, glm, - glog, libapparmor, libdrm, libepoxy, @@ -112,7 +111,6 @@ stdenv.mkDerivation (finalAttrs: { freetype glib glm - glog libdrm libepoxy libevdev diff --git a/pkgs/servers/mir/default.nix b/pkgs/servers/mir/default.nix index 57bc70f1a7a40..d040ebeb85259 100644 --- a/pkgs/servers/mir/default.nix +++ b/pkgs/servers/mir/default.nix @@ -29,6 +29,14 @@ in hash = "sha256-k+51piPQandbHdm+ioqpBrb+C7Aqi2kugchAehZ1aiU="; }) + # Always depend on epoxy + # Remove when version > 2.15.0 + (fetchpatch { + name = "0003-mir-cmake-always-require-epoxy.patch"; + url = "https://github.com/canonical/mir/commit/171c42ac3929f946a70505ee42be0ce8220f245a.patch"; + hash = "sha256-QuVZBcHSn/DK+xbjM36Y89+w22vk7NRV4MkbjgvS28A="; + }) + # 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 @@ -44,6 +52,33 @@ in # Partially done in https://github.com/canonical/mir/pull/3192, though one of the calloc was fixed earlier # when some code was moved into that file ./1003-mir-2_15-calloc-args-in-right-order.patch + + # Drop gflags & glog dependencies + # Remove when version > 2.16.4 + (fetchpatch { + name = "0101-Drop-unused-dependency-on-gflags.patch"; + url = "https://github.com/canonical/mir/commit/15a40638e5e9c4b6a11b7fa446ad31e190f485e7.patch"; + includes = [ + "CMakeLists.txt" + "examples/mir_demo_server/CMakeLists.txt" + "examples/mir_demo_server/glog_logger.cpp" + ]; + hash = "sha256-qIsWCOs6Ap0jJ2cpgdO+xJHmSqC6zP+J3ALAfmlA6Vc="; + }) + (fetchpatch { + name = "0102-Drop-the-glog-example.patch"; + url = "https://github.com/canonical/mir/commit/8407da28ddb9a535df2775f224bf5143e8770d52.patch"; + includes = [ + "CMakeLists.txt" + "examples/mir_demo_server/CMakeLists.txt" + "examples/mir_demo_server/glog_logger.cpp" + "examples/mir_demo_server/glog_logger.h" + "examples/mir_demo_server/server_example.cpp" + "examples/mir_demo_server/server_example_log_options.cpp" + "examples/mir_demo_server/server_example_log_options.h" + ]; + hash = "sha256-jVhVR7wZZZGRS40z+HPNoGBLHulvE1nHRKgYhQ6/g9M="; + }) ]; }; }