From 18951ce703172c79e9624277b21d6103b450557f Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 15 Nov 2023 00:26:16 +0200 Subject: [PATCH] vala: look for files in `targetOffset` when vala is in `nativeBuildInputs`, look for files in `buildInputs`. --- pkgs/desktops/gnome/apps/gnome-clocks/default.nix | 2 -- pkgs/desktops/gnome/apps/seahorse/default.nix | 4 ---- pkgs/desktops/gnome/core/baobab/default.nix | 4 ---- pkgs/desktops/gnome/core/gnome-calculator/default.nix | 2 -- pkgs/desktops/gnome/games/gnome-mines/default.nix | 5 ++--- pkgs/development/compilers/vala/setup-hook.sh | 2 +- .../development/libraries/libgnome-games-support/default.nix | 2 -- 7 files changed, 3 insertions(+), 18 deletions(-) diff --git a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix index ab05d40677ec..be7896f6b11a 100644 --- a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix @@ -9,7 +9,6 @@ , itstool , desktop-file-utils , vala -, gobject-introspection , libxml2 , gtk4 , glib @@ -43,7 +42,6 @@ stdenv.mkDerivation rec { wrapGAppsHook4 desktop-file-utils libxml2 - gobject-introspection # for finding vapi files ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/apps/seahorse/default.nix b/pkgs/desktops/gnome/apps/seahorse/default.nix index bbab612b9c8d..1207d7969610 100644 --- a/pkgs/desktops/gnome/apps/seahorse/default.nix +++ b/pkgs/desktops/gnome/apps/seahorse/default.nix @@ -57,10 +57,6 @@ stdenv.mkDerivation rec { gnupg desktop-file-utils gcr - # error: Package `...' not found in specified Vala API directories or GObject-Introspection GIR directories - # TODO: the vala setuphook should look for vala filess in targetOffset instead of hostOffset - libhandy - libsecret ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/core/baobab/default.nix b/pkgs/desktops/gnome/core/baobab/default.nix index e813f5f591ab..b459677a3e36 100644 --- a/pkgs/desktops/gnome/core/baobab/default.nix +++ b/pkgs/desktops/gnome/core/baobab/default.nix @@ -36,10 +36,6 @@ stdenv.mkDerivation rec { pkg-config vala wrapGAppsHook4 - # Prevents “error: Package `libadwaita-1' not found in specified Vala API - # directories or GObject-Introspection GIR directories” with strictDeps, - # even though it should only be a runtime dependency. - libadwaita ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/core/gnome-calculator/default.nix b/pkgs/desktops/gnome/core/gnome-calculator/default.nix index 73863ccfaf33..0ea86b7b4511 100644 --- a/pkgs/desktops/gnome/core/gnome-calculator/default.nix +++ b/pkgs/desktops/gnome/core/gnome-calculator/default.nix @@ -12,7 +12,6 @@ , glib , gtksourceview5 , wrapGAppsHook4 -, gobject-introspection , gnome , mpfr , gmp @@ -40,7 +39,6 @@ stdenv.mkDerivation rec { gettext itstool wrapGAppsHook4 - gobject-introspection # for finding vapi files ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/games/gnome-mines/default.nix b/pkgs/desktops/gnome/games/gnome-mines/default.nix index dd214f38071f..4640c5842493 100644 --- a/pkgs/desktops/gnome/games/gnome-mines/default.nix +++ b/pkgs/desktops/gnome/games/gnome-mines/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, meson, ninja, vala, gobject-introspection, pkg-config, gnome, gtk3, wrapGAppsHook +{ lib, stdenv, fetchurl, meson, ninja, vala, pkg-config, gnome, gtk3, wrapGAppsHook , librsvg, gettext, itstool, python3, libxml2, libgnome-games-support, libgee, desktop-file-utils }: stdenv.mkDerivation rec { @@ -10,9 +10,8 @@ stdenv.mkDerivation rec { sha256 = "NQLps/ccs7LnEcDmAZGH/rzCvKh349RW3KtwD3vjEnI="; }; - # gobject-introspection for finding vapi files nativeBuildInputs = [ - meson ninja vala gobject-introspection pkg-config gettext itstool python3 + meson ninja vala pkg-config gettext itstool python3 libxml2 wrapGAppsHook desktop-file-utils ]; buildInputs = [ gtk3 librsvg gnome.adwaita-icon-theme libgnome-games-support libgee ]; diff --git a/pkgs/development/compilers/vala/setup-hook.sh b/pkgs/development/compilers/vala/setup-hook.sh index 33acdf1daee0..53976e5cd0db 100644 --- a/pkgs/development/compilers/vala/setup-hook.sh +++ b/pkgs/development/compilers/vala/setup-hook.sh @@ -5,7 +5,7 @@ make_vala_find_vapi_files() { fi } -addEnvHooks "$hostOffset" make_vala_find_vapi_files +addEnvHooks "$targetOffset" make_vala_find_vapi_files disable_incompabile_pointer_conversion_warning() { # Work around incompatible function pointer conversion errors with clang 16 diff --git a/pkgs/development/libraries/libgnome-games-support/default.nix b/pkgs/development/libraries/libgnome-games-support/default.nix index edfd21a46968..e63d7f8fe656 100644 --- a/pkgs/development/libraries/libgnome-games-support/default.nix +++ b/pkgs/development/libraries/libgnome-games-support/default.nix @@ -2,7 +2,6 @@ , fetchurl , pkg-config , glib -, gobject-introspection , gtk3 , libgee , gettext @@ -24,7 +23,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gettext - gobject-introspection meson ninja pkg-config