From 752c0627366d703c9f1a938990cc1ac4d0b5e668 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:42:48 +0200 Subject: [PATCH 1/2] vte: fix build on darwin --- pkgs/development/libraries/vte/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/vte/default.nix b/pkgs/development/libraries/vte/default.nix index 8734308af9301..342bb32e56096 100644 --- a/pkgs/development/libraries/vte/default.nix +++ b/pkgs/development/libraries/vte/default.nix @@ -78,6 +78,9 @@ stdenv.mkDerivation rec { mesonFlags = lib.optionals (!systemdSupport) [ "-D_systemd=false" + ] ++ lib.optionals stdenv.isDarwin [ + # -Bsymbolic-functions is not supported on darwin + "-D_b_symbolic_functions=false" ]; postPatch = '' @@ -98,7 +101,6 @@ stdenv.mkDerivation rec { }; meta = with lib; { - broken = stdenv.isDarwin; homepage = "https://www.gnome.org/"; description = "A library implementing a terminal emulator widget for GTK"; longDescription = '' From e76a011eea0583f89625ac8d1832b1da11b12fb6 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:48:13 +0200 Subject: [PATCH 2/2] gnome-console: add darwin support --- .../gnome-console/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/terminal-emulators/gnome-console/default.nix b/pkgs/applications/terminal-emulators/gnome-console/default.nix index 691a2d10c67cf..790aa17259237 100644 --- a/pkgs/applications/terminal-emulators/gnome-console/default.nix +++ b/pkgs/applications/terminal-emulators/gnome-console/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , gettext , gnome , libgtop @@ -29,14 +30,23 @@ stdenv.mkDerivation rec { sha256 = "fSbmwYdExXWnhykyY/YM7/YwEHCY6eWKd2WwCsdDcEk="; }; + patches = [ + (fetchpatch { + name = "fix-clang-build-issues.patch"; + url = "https://gitlab.gnome.org/GNOME/console/-/commit/0e29a417d52e27da62f5cac461400be6a764dc65.patch"; + sha256 = "sha256-5ORNZOxjC5dMk9VKaBcJu5OV1SEZo9SNUbN4Ob5hVJs="; + }) + ]; + buildInputs = [ gettext libgtop - gnome.nautilus gtk3 libhandy pcre2 vte + ] ++ lib.optionals stdenv.isLinux [ + gnome.nautilus ]; nativeBuildInputs = [ @@ -51,6 +61,10 @@ stdenv.mkDerivation rec { wrapGAppsHook ]; + mesonFlags = lib.optionals (!stdenv.isLinux) [ + "-Dnautilus=disabled" + ]; + passthru = { updateScript = gnome.updateScript { packageName = pname; @@ -64,6 +78,6 @@ stdenv.mkDerivation rec { homepage = "https://gitlab.gnome.org/GNOME/console"; license = licenses.gpl3Plus; maintainers = teams.gnome.members ++ (with maintainers; [ zhaofengli ]); - platforms = platforms.linux; + platforms = platforms.unix; }; }