From be2f39c850f13de05f4cf64c76eb641215bba538 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:50:57 +0300 Subject: [PATCH 01/26] gnome-desktop: fix cross --- pkgs/development/libraries/gnome-desktop/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gnome-desktop/default.nix b/pkgs/development/libraries/gnome-desktop/default.nix index 157d7fa84040a..8d0d7fc1a4816 100644 --- a/pkgs/development/libraries/gnome-desktop/default.nix +++ b/pkgs/development/libraries/gnome-desktop/default.nix @@ -68,6 +68,7 @@ stdenv.mkDerivation rec { bubblewrap wayland libseccomp + gobject-introspection systemd ]; From 723f2e15a23a25b705c22bcfb053842acf1fd535 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:03 +0300 Subject: [PATCH 02/26] graphene: build gir when cross --- pkgs/development/libraries/graphene/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index b883c549da54c..a3424505f96b6 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -5,6 +5,7 @@ , nix-update-script , pkg-config , meson +, mesonEmulatorHook , ninja , python3 , mutest @@ -21,8 +22,7 @@ stdenv.mkDerivation rec { pname = "graphene"; version = "1.10.8"; - outputs = [ "out" ] - ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ]; + outputs = [ "out" "dev" "devdoc" "installedTests" ]; src = fetchFromGitHub { owner = "ebassi"; @@ -59,9 +59,12 @@ stdenv.mkDerivation rec { gobject-introspection python3 makeWrapper + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib ]; @@ -70,8 +73,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" - "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" + "-Dgtk_doc=true" + "-Dintrospection=enabled" "-Dinstalled_test_datadir=${placeholder "installedTests"}/share" "-Dinstalled_test_bindir=${placeholder "installedTests"}/libexec" ]; @@ -79,8 +82,9 @@ stdenv.mkDerivation rec { doCheck = true; postPatch = '' + substituteInPlace tests/meson.build \ + --replace 'and not meson.is_cross_build()' "" patchShebangs tests/gen-installed-test.py - '' + lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py ''; From 47adff7a7dcea383f963318d73ef7a23b6e3044a Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:21 +0300 Subject: [PATCH 03/26] gsettings-desktop-schemas: build gir when cross --- .../libraries/gsettings-desktop-schemas/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix index acc143cd5566c..f6067a3c734aa 100644 --- a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix +++ b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix @@ -29,10 +29,7 @@ stdenv.mkDerivation rec { python3 gobject-introspection ]; - - mesonFlags = [ - "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" - ]; + buildInputs = [ gobject-introspection ]; postPatch = '' chmod +x build-aux/meson/post-install.py From 705d82636535e3098bc7f766126f585bf4f0bf25 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:38 +0300 Subject: [PATCH 04/26] gtk4: fix cross --- pkgs/development/libraries/gtk/4.x.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index fc3e39b022611..02ea3ef9789eb 100644 --- a/pkgs/development/libraries/gtk/4.x.nix +++ b/pkgs/development/libraries/gtk/4.x.nix @@ -42,6 +42,7 @@ , vulkan-headers , wayland , wayland-protocols +, wayland-scanner , xineramaSupport ? stdenv.isLinux , cupsSupport ? stdenv.isLinux , cups @@ -77,6 +78,10 @@ stdenv.mkDerivation rec { sha256 = "e7/k0TVp98KX7UmDSscmPjGLe/EC0ycctGbVlx9ZrnA="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ gettext gobject-introspection @@ -88,9 +93,11 @@ stdenv.mkDerivation rec { sassc gi-docgen libxml2 # for xmllint + wayland-scanner ] ++ setupHooks; buildInputs = [ + gobject-introspection libxkbcommon libpng libtiff @@ -183,6 +190,14 @@ stdenv.mkDerivation rec { chmod +x ''${files[@]} patchShebangs ''${files[@]} + + '' + + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # it should be a build-time dep for build + # TODO: send upstream + '' + substituteInPlace meson.build \ + --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" ''; preInstall = '' From 965c1b27634f211e4cf550a5a8bb8cee2356b0cf Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:15:13 +0300 Subject: [PATCH 05/26] geocode-glib: fix cross --- pkgs/development/libraries/geocode-glib/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/geocode-glib/default.nix b/pkgs/development/libraries/geocode-glib/default.nix index b55b5c19228aa..9409d0772671d 100644 --- a/pkgs/development/libraries/geocode-glib/default.nix +++ b/pkgs/development/libraries/geocode-glib/default.nix @@ -3,6 +3,7 @@ , fetchurl , fetchpatch , meson +, mesonEmulatorHook , ninja , pkg-config , gettext @@ -53,9 +54,12 @@ stdenv.mkDerivation rec { gtk-doc docbook-xsl-nons gobject-introspection + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib libsoup json-glib From b846e177d6329146700ae334c529ec52b08af306 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:19:49 +0300 Subject: [PATCH 06/26] gexiv2: fix cross --- pkgs/development/libraries/gexiv2/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gexiv2/default.nix b/pkgs/development/libraries/gexiv2/default.nix index 0cf505660040f..3ca12a719e761 100644 --- a/pkgs/development/libraries/gexiv2/default.nix +++ b/pkgs/development/libraries/gexiv2/default.nix @@ -2,6 +2,7 @@ , lib , fetchurl , meson +, mesonEmulatorHook , ninja , pkg-config , exiv2 @@ -35,13 +36,14 @@ stdenv.mkDerivation rec { gtk-doc docbook-xsl-nons docbook_xml_dtd_43 + (python3.pythonForBuild.withPackages (ps: [ ps.pygobject3 ])) + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib - # Python binding overrides - python3 - python3.pkgs.pygobject3 ]; propagatedBuildInputs = [ From 3630a6e1a8058d18aa9f85149702f43ed87828da Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:25:42 +0300 Subject: [PATCH 07/26] gnome.gnome-autoar: fix cross --- pkgs/desktops/gnome/misc/gnome-autoar/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/desktops/gnome/misc/gnome-autoar/default.nix b/pkgs/desktops/gnome/misc/gnome-autoar/default.nix index 683b5c22626f7..e773f4f6be31c 100644 --- a/pkgs/desktops/gnome/misc/gnome-autoar/default.nix +++ b/pkgs/desktops/gnome/misc/gnome-autoar/default.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection gtk3 ]; From c43e85e56def91017ace79b0e15eb8f45f7c1172 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:27:23 +0300 Subject: [PATCH 08/26] gom: fix cross --- pkgs/development/libraries/gom/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gom/default.nix b/pkgs/development/libraries/gom/default.nix index d11ecc6a29a57..02184a1dc9fd9 100644 --- a/pkgs/development/libraries/gom/default.nix +++ b/pkgs/development/libraries/gom/default.nix @@ -34,6 +34,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection gdk-pixbuf glib sqlite From d8fee87bea2f2d5bff3d9ee58fabc0997535ebee Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:31:15 +0300 Subject: [PATCH 09/26] gtk-vnc fix cross --- pkgs/tools/admin/gtk-vnc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/admin/gtk-vnc/default.nix b/pkgs/tools/admin/gtk-vnc/default.nix index f4c4b0facde11..b9a5813831411 100644 --- a/pkgs/tools/admin/gtk-vnc/default.nix +++ b/pkgs/tools/admin/gtk-vnc/default.nix @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection gnutls cairo gdk-pixbuf From 7579612b4d6e7ced9d7432691fe7cd5b8d41d976 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:35:03 +0300 Subject: [PATCH 10/26] gtksourceview{4,5}: fix cross --- pkgs/development/libraries/gtksourceview/4.x.nix | 1 + pkgs/development/libraries/gtksourceview/5.x.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/libraries/gtksourceview/4.x.nix b/pkgs/development/libraries/gtksourceview/4.x.nix index 74acd6f743d61..76f121e43fa98 100644 --- a/pkgs/development/libraries/gtksourceview/4.x.nix +++ b/pkgs/development/libraries/gtksourceview/4.x.nix @@ -50,6 +50,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection atk cairo glib diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index 307fb15e98d87..3aca59aa15a75 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -51,6 +51,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection glib pcre2 pango From 96cdbd0e4a4c49c65a2275500a3de17845c429d5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 22:41:27 +0300 Subject: [PATCH 11/26] libaccounts-glib: fix cross --- pkgs/development/libraries/libaccounts-glib/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libaccounts-glib/default.nix b/pkgs/development/libraries/libaccounts-glib/default.nix index 8dfc222f36ac8..390ad639879ba 100644 --- a/pkgs/development/libraries/libaccounts-glib/default.nix +++ b/pkgs/development/libraries/libaccounts-glib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitLab, meson, ninja, glib, check, python3, vala, gtk-doc, glibcLocales +{ lib, stdenv, fetchFromGitLab, meson, mesonEmulatorHook, ninja, glib, check, python3, vala, gtk-doc, glibcLocales , libxml2, libxslt, pkg-config, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }: stdenv.mkDerivation rec { @@ -18,7 +18,6 @@ stdenv.mkDerivation rec { patches = [ ./py-override.patch ]; nativeBuildInputs = [ - check docbook_xml_dtd_43 docbook_xsl glibcLocales @@ -28,9 +27,13 @@ stdenv.mkDerivation rec { ninja pkg-config vala + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + check + gobject-introspection glib libxml2 libxslt From 2b6d3058b4162931eaa566ac5d2dacccfec9398a Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 03:00:43 +0300 Subject: [PATCH 12/26] libadwaita: fix cross --- pkgs/development/libraries/libadwaita/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix index 54bf206015608..75a68637a33c7 100644 --- a/pkgs/development/libraries/libadwaita/default.nix +++ b/pkgs/development/libraries/libadwaita/default.nix @@ -36,6 +36,11 @@ stdenv.mkDerivation rec { hash = "sha256-Mjv4Z9YaIT9atD8ekepBAA1ZV30kWnMnV8+kOuGULnw="; }; + depsBuildBuild = [ + pkg-config + ]; + + nativeBuildInputs = [ docbook-xsl-nons gi-docgen @@ -46,6 +51,7 @@ stdenv.mkDerivation rec { pkg-config sassc vala + gobject-introspection ]; mesonFlags = [ From 3c96b211730c1c02c1968cd657cde78b533db940 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 03:51:44 +0300 Subject: [PATCH 13/26] gjs: fix cross --- pkgs/development/libraries/gjs/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index 9d621e584860d..1e0009828873a 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -2,6 +2,7 @@ , lib , stdenv , meson +, mesonEmulatorHook , ninja , pkg-config , gnome @@ -55,6 +56,10 @@ in stdenv.mkDerivation rec { makeWrapper which # for locale detection libxml2 # for xml-stripblanks + dbus # for dbus-run-session + gobject-introspection + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -63,7 +68,6 @@ in stdenv.mkDerivation rec { readline libsysprof-capture spidermonkey_91 - dbus # for dbus-run-session ]; checkInputs = [ From e289bf05776e433a400fa59fcb99126be1f292b4 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:01:54 +0300 Subject: [PATCH 14/26] libdazzle: fix cross --- pkgs/development/libraries/libdazzle/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix index 7f4c53071d0ca..f001ec4f6db15 100644 --- a/pkgs/development/libraries/libdazzle/default.nix +++ b/pkgs/development/libraries/libdazzle/default.nix @@ -3,6 +3,7 @@ , fetchurl , ninja , meson +, mesonEmulatorHook , pkg-config , vala , gobject-introspection @@ -42,9 +43,12 @@ stdenv.mkDerivation rec { dbus xvfb-run glib + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib gtk3 ]; From 46d5fdec6de2937c5735c712eecdad32d30c09ec Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:04:49 +0300 Subject: [PATCH 15/26] gnome.gnome-font-viewer: fix cross --- pkgs/desktops/gnome/core/gnome-font-viewer/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix index 397f0b9838f1f..ae211f6acc17c 100644 --- a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix +++ b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix @@ -33,11 +33,11 @@ stdenv.mkDerivation rec { gettext wrapGAppsHook4 libxml2 + glib ]; buildInputs = [ gtk4 - glib gnome-desktop harfbuzz libadwaita From 069698c4291a57186baacf8e724119c98e540a63 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:23:08 +0300 Subject: [PATCH 16/26] gnome.gnome-bluetooth: fix cross --- pkgs/desktops/gnome/core/gnome-bluetooth/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix index 678895ffbb501..322bf0f3be933 100644 --- a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix +++ b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix @@ -3,6 +3,7 @@ , fetchurl , gnome , meson +, mesonEmulatorHook , ninja , pkg-config , gtk4 @@ -49,9 +50,12 @@ stdenv.mkDerivation rec { docbook-xsl-nons docbook_xml_dtd_43 python3 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib gtk4 libadwaita From 948d2f4c8fc4dab147b59a2dbdefc97340000324 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:29:21 +0300 Subject: [PATCH 17/26] bolt: fix cross --- pkgs/os-specific/linux/bolt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/bolt/default.nix b/pkgs/os-specific/linux/bolt/default.nix index d424f89fdfb39..cfd58f8ff7253 100644 --- a/pkgs/os-specific/linux/bolt/default.nix +++ b/pkgs/os-specific/linux/bolt/default.nix @@ -53,10 +53,10 @@ stdenv.mkDerivation rec { meson ninja pkg-config + glib ] ++ lib.optional (!doCheck) python3; buildInputs = [ - glib polkit systemd ]; @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { dbus gobject-introspection umockdev - (python3.withPackages + (python3.pythonForBuild.withPackages (p: [ p.pygobject3 p.dbus-python p.python-dbusmock ])) ]; From 455ce7188fc044ce4d3aefc4c08d68c077d6723d Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:40:16 +0300 Subject: [PATCH 18/26] python310Packages.gst-python: fix cross --- .../python-modules/gst-python/default.nix | 15 +++++++++++---- pkgs/top-level/python-packages.nix | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index e14223c1fd6db..6477e9ff19722 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -8,7 +8,7 @@ , python , pygobject3 , gobject-introspection -, gst-plugins-base +, gst_all_1 , isPy3k }: @@ -28,22 +28,29 @@ buildPythonPackage rec { # Python 2.x is not supported. disabled = !isPy3k; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja pkg-config - python gobject-introspection - gst-plugins-base + gst_all_1.gst-plugins-base ]; propagatedBuildInputs = [ - gst-plugins-base + gst_all_1.gst-plugins-base pygobject3 ]; mesonFlags = [ "-Dpygi-overrides-dir=${placeholder "out"}/${python.sitePackages}/gi/overrides" + # This is only used for figuring out what version of Python is in + # use, and related stuff like figuring out what the install prefix + # should be, but it does need to be able to execute Python code. + "-Dpython=${python.pythonForBuild.interpreter}" ]; doCheck = true; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 47a70f6587c66..cdb74577d92a2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3879,8 +3879,8 @@ in { }; gst-python = callPackage ../development/python-modules/gst-python { - inherit (pkgs) meson; - inherit (pkgs.gst_all_1) gst-plugins-base; + # inherit (pkgs) meson won't work because it won't be spliced + inherit (pkgs.buildPackages) meson; }; gtfs-realtime-bindings = callPackage ../development/python-modules/gtfs-realtime-bindings { }; From c3a7dfe3b1fc6dd1aad680c3c0d2bfd93d72e913 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:52:59 +0300 Subject: [PATCH 19/26] wireplumber: fix cross --- pkgs/development/libraries/pipewire/wireplumber.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix index 8769587605eac..46e9315a082ab 100644 --- a/pkgs/development/libraries/pipewire/wireplumber.nix +++ b/pkgs/development/libraries/pipewire/wireplumber.nix @@ -20,7 +20,7 @@ , pipewire , # options enableDocs ? true -, enableGI ? stdenv.hostPlatform == stdenv.buildPlatform +, enableGI ? true }: let mesonEnableFeature = b: if b then "enabled" else "disabled"; @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { gobject-introspection ] ++ lib.optionals (enableDocs || enableGI) [ doxygen - (python3.withPackages (ps: with ps; + (python3.pythonForBuild.withPackages (ps: with ps; lib.optionals enableDocs [ sphinx sphinx-rtd-theme breathe ] ++ lib.optionals enableGI [ lxml ] )) @@ -69,6 +69,8 @@ stdenv.mkDerivation rec { systemd lua5_4 pipewire + ] ++ lib.optionals enableGI [ + gobject-introspection ]; mesonFlags = [ From 3d520c3c51fc5907887d6f2b01c4bc4003e4c691 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 04:59:05 +0300 Subject: [PATCH 20/26] gcr: fix cross --- pkgs/development/libraries/gcr/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix index 6c1c3de08a2ee..fb5bc68108e33 100644 --- a/pkgs/development/libraries/gcr/default.nix +++ b/pkgs/development/libraries/gcr/default.nix @@ -56,15 +56,16 @@ stdenv.mkDerivation rec { wrapGAppsHook vala shared-mime-info + gnupg + openssh ]; buildInputs = [ - gnupg + gobject-introspection libgcrypt libtasn1 pango libsecret - openssh systemd ]; From 78b6ea112dec35dfee41e7a9b5cd053280e72022 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:14:35 +0300 Subject: [PATCH 21/26] TODO! gspell: partial cross fix currently fails with ``` gspell-aarch64-unknown-linux-gnu> GISCAN Gspell-1.gir gspell-aarch64-unknown-linux-gnu> /build/gspell-1.11.1/gspell/tmp-introspectw7ylnm6h/.libs/Gspell-1: error while loading shared libraries: libgspell-1.so.2: cannot open shared object file: No such file or directory gspell-aarch64-unknown-linux-gnu> Command '['/nix/store/1gkf97ssiw7j5vqg89k18f4x306k63rr-qemu-7.0.0/bin/qemu-aarch64', '/build/gspell-1.11.1/gspell/tmp-introspectw7ylnm6h/.libs/Gspell-1', '--introspect-dump=/build/gspell-1.11.1/gspell/tmp-introspectw7ylnm6h/functions.txt,/build/gspel l-1.11.1/gspell/tmp-introspectw7ylnm6h/dump.xml']' returned non-zero exit status 127. gspell-aarch64-unknown-linux-gnu> make[4]: *** [/nix/store/dg5dffwl678cbxr3q2cqbqvnig31dhlc-gobject-introspection-aarch64-unknown-linux-gnu-1.72.0-dev/share/gobject-introspection-1.0/Makefile.introspection:156: Gspell-1.gir] Error 1 ``` many other packages which don't use meson fail with a error like that too. might be because of `./pkgs/development/libraries/gobject-introspection/absolute_gir_path.patch` --- pkgs/development/libraries/gspell/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gspell/default.nix b/pkgs/development/libraries/gspell/default.nix index d4bd149e64e35..8003729a740ff 100644 --- a/pkgs/development/libraries/gspell/default.nix +++ b/pkgs/development/libraries/gspell/default.nix @@ -1,4 +1,5 @@ { lib, stdenv +, buildPackages , fetchurl , pkg-config , libxml2 @@ -38,10 +39,11 @@ stdenv.mkDerivation rec { libxml2 autoreconfHook gtk-doc + glib ]; buildInputs = [ - glib + gobject-introspection gtk3 icu ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ @@ -53,6 +55,11 @@ stdenv.mkDerivation rec { enchant2 ]; + configureFlags = [ + "GLIB_COMPILE_RESOURCES=${lib.getDev buildPackages.glib}/bin/glib-compile-resources" + "GLIB_MKENUMS=${lib.getDev buildPackages.glib}/bin/glib-mkenums" + ]; + passthru = { updateScript = gnome.updateScript { packageName = pname; From 18340d8ca2ef2388c2055499eeb4457e1af78931 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:23:59 +0300 Subject: [PATCH 22/26] libgsf: fix cross --- pkgs/development/libraries/libgsf/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix index 30324b04d8505..6897ed5a09733 100644 --- a/pkgs/development/libraries/libgsf/default.nix +++ b/pkgs/development/libraries/libgsf/default.nix @@ -55,6 +55,14 @@ stdenv.mkDerivation rec { patchShebangs ./tests/ ''; + # checking pkg-config is at least version 0.9.0... ./configure: line 15213: no: command not found + # configure: error: in `/build/libgsf-1.14.50': + # configure: error: The pkg-config script could not be found or is too old. Make sure it + # is in your PATH or set the PKG_CONFIG environment variable to the full + preConfigure = '' + export PKG_CONFIG="$(command -v "$PKG_CONFIG")" + ''; + passthru = { updateScript = gnome.updateScript { packageName = pname; From 8f3adde9a30eeee27093bd0570d8b74463a24a39 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:27:29 +0300 Subject: [PATCH 23/26] gusb: fix cross --- pkgs/development/libraries/gusb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gusb/default.nix b/pkgs/development/libraries/gusb/default.nix index e3dac6c4ec70d..9fabff4650f83 100644 --- a/pkgs/development/libraries/gusb/default.nix +++ b/pkgs/development/libraries/gusb/default.nix @@ -4,7 +4,7 @@ }: let - pythonEnv = python3.withPackages(ps: with ps; [ + pythonEnv = python3.pythonForBuild.withPackages(ps: with ps; [ setuptools ]); in @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { gtk-doc docbook_xsl docbook_xml_dtd_412 docbook_xml_dtd_44 gobject-introspection vala ]; - buildInputs = [ systemd glib ]; + buildInputs = [ systemd glib gobject-introspection ]; propagatedBuildInputs = [ libusb1 ]; From 5c56e06302d9f195c2422d41567ffb82b671d01f Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:28:58 +0300 Subject: [PATCH 24/26] gupnp-dlna: fix cross --- pkgs/development/libraries/gupnp-dlna/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gupnp-dlna/default.nix b/pkgs/development/libraries/gupnp-dlna/default.nix index bd8e313cde2d8..32f9cf569bba3 100644 --- a/pkgs/development/libraries/gupnp-dlna/default.nix +++ b/pkgs/development/libraries/gupnp-dlna/default.nix @@ -37,6 +37,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ + gobject-introspection libxml2 gst_all_1.gst-plugins-base ]; From 47f317dd4427d3123fd00b6d00f1262dec8ed104 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:31:06 +0300 Subject: [PATCH 25/26] grilo: fix cross --- pkgs/development/libraries/grilo/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/grilo/default.nix b/pkgs/development/libraries/grilo/default.nix index 16897c6f04468..c2474c0fdb203 100644 --- a/pkgs/development/libraries/grilo/default.nix +++ b/pkgs/development/libraries/grilo/default.nix @@ -2,6 +2,7 @@ , lib , fetchurl , meson +, mesonEmulatorHook , ninja , pkg-config , gettext @@ -47,9 +48,12 @@ stdenv.mkDerivation rec { gtk-doc docbook-xsl-nons docbook_xml_dtd_43 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ + gobject-introspection glib liboauth gtk3 From b1feb6f096a383d4732e01283ad46f4f4538422a Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 31 Jul 2022 05:36:25 +0300 Subject: [PATCH 26/26] TODOS --- pkgs/applications/networking/remote/freerdp/default.nix | 3 ++- pkgs/development/libraries/cogl/default.nix | 2 +- pkgs/development/libraries/gmime/3.nix | 2 ++ pkgs/development/libraries/gnome-menus/default.nix | 2 +- pkgs/development/libraries/libdbusmenu/default.nix | 2 +- pkgs/development/libraries/libgnomekbd/default.nix | 1 + pkgs/development/libraries/libphonenumber/default.nix | 2 ++ 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix index 99a81fd1a809e..f45a97eebbf7c 100644 --- a/pkgs/applications/networking/remote/freerdp/default.nix +++ b/pkgs/applications/networking/remote/freerdp/default.nix @@ -22,6 +22,7 @@ , libxkbcommon , libxkbfile , wayland +, wayland-scanner , gstreamer , gst-plugins-base , gst-plugins-good @@ -115,7 +116,7 @@ stdenv.mkDerivation rec { zlib ] ++ lib.optional stdenv.isLinux systemd; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ cmake pkg-config wayland-scanner ]; doCheck = true; diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index e58a500cf8384..8790b86506b65 100644 --- a/pkgs/development/libraries/cogl/default.nix +++ b/pkgs/development/libraries/cogl/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config libintl automake autoconf ]; + nativeBuildInputs = [ pkg-config libintl automake autoconf gobject-introspection ]; configureFlags = [ "--enable-introspection" diff --git a/pkgs/development/libraries/gmime/3.nix b/pkgs/development/libraries/gmime/3.nix index 4ec99d2e18f3a..cf34d87747799 100644 --- a/pkgs/development/libraries/gmime/3.nix +++ b/pkgs/development/libraries/gmime/3.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-introspection=yes" "--enable-vala=yes" + "--with-libiconv" + #"ac_cv_have_iconv_detect_h=yes" ]; postPatch = '' diff --git a/pkgs/development/libraries/gnome-menus/default.nix b/pkgs/development/libraries/gnome-menus/default.nix index 0b3d6689cb0b9..9bbaf068fa8e1 100644 --- a/pkgs/development/libraries/gnome-menus/default.nix +++ b/pkgs/development/libraries/gnome-menus/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0" ]; - nativeBuildInputs = [ pkg-config gettext ]; + nativeBuildInputs = [ pkg-config gettext gobject-introspection ]; buildInputs = [ glib gobject-introspection ]; passthru = { diff --git a/pkgs/development/libraries/libdbusmenu/default.nix b/pkgs/development/libraries/libdbusmenu/default.nix index 0b5531d70c543..c2ff8c2aa5118 100644 --- a/pkgs/development/libraries/libdbusmenu/default.nix +++ b/pkgs/development/libraries/libdbusmenu/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ vala pkg-config intltool gobject-introspection ]; buildInputs = [ - glib dbus-glib json-glib + glib dbus-glib json-glib gobject-introspection ] ++ optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3); postPatch = '' diff --git a/pkgs/development/libraries/libgnomekbd/default.nix b/pkgs/development/libraries/libgnomekbd/default.nix index 957c213425249..0d4f2693863c8 100644 --- a/pkgs/development/libraries/libgnomekbd/default.nix +++ b/pkgs/development/libraries/libgnomekbd/default.nix @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + glib file intltool pkg-config diff --git a/pkgs/development/libraries/libphonenumber/default.nix b/pkgs/development/libraries/libphonenumber/default.nix index b19eee6ccf88b..e4aee0db8bfa5 100644 --- a/pkgs/development/libraries/libphonenumber/default.nix +++ b/pkgs/development/libraries/libphonenumber/default.nix @@ -15,9 +15,11 @@ stdenv.mkDerivation rec { cmake gtest pkg-config + protobuf ]; buildInputs = [ + gtest boost protobuf icu