From 237da4a2c046b26f20614ae62b2b24fbfa759358 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:38 +0300 Subject: [PATCH 1/7] gtk4: fix cross --- pkgs/development/libraries/gtk/4.x.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/libraries/gtk/4.x.nix b/pkgs/development/libraries/gtk/4.x.nix index fc3e39b02261..07472e736e5d 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,6 +93,7 @@ stdenv.mkDerivation rec { sassc gi-docgen libxml2 # for xmllint + wayland-scanner ] ++ setupHooks; buildInputs = [ @@ -183,6 +189,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 322e4d8fa39af8fdd3f085313a4f2bec7b2bd6c0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:03 +0300 Subject: [PATCH 2/7] graphene: build gir when cross --- pkgs/development/libraries/graphene/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index b883c549da54..baf42430c299 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,8 @@ stdenv.mkDerivation rec { pname = "graphene"; version = "1.10.8"; - outputs = [ "out" ] - ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" "installedTests" ]; + outputs = [ "out" "dev" "devdoc" ] + ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "installedTests" ]; src = fetchFromGitHub { owner = "ebassi"; @@ -59,6 +60,8 @@ stdenv.mkDerivation rec { gobject-introspection python3 makeWrapper + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -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" ]; @@ -80,7 +83,6 @@ stdenv.mkDerivation rec { postPatch = '' 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 24723644acd2d50aa30cd4d6829cc2d8949d5824 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 30 Jul 2022 21:51:21 +0300 Subject: [PATCH 3/7] gsettings-desktop-schemas: build gir when cross --- .../libraries/gsettings-desktop-schemas/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix index acc143cd5566..8a26742ce23e 100644 --- a/pkgs/development/libraries/gsettings-desktop-schemas/default.nix +++ b/pkgs/development/libraries/gsettings-desktop-schemas/default.nix @@ -30,10 +30,6 @@ stdenv.mkDerivation rec { gobject-introspection ]; - mesonFlags = [ - "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" - ]; - postPatch = '' chmod +x build-aux/meson/post-install.py patchShebangs build-aux/meson/post-install.py From a32cd711efe2b934b7a32b175f15ecba9962ba9b Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 7 Aug 2022 01:45:53 +0300 Subject: [PATCH 4/7] gnome-tour: work towards fixing cross doesn't work yet ``` gnome-tour-aarch64-unknown-linux-gnu> error: linking with `/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc` failed: exit status: 1 gnome-tour-aarch64-unknown-linux-gnu> | gnome-tour-aarch64-unknown-linux-gnu> = note: "/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc" "-m64" "/build/rustcd8pO0A/symbols.o" "/build/gnome-tour-42.0/build/src/release/deps/gnome_to ... gnome-tour-aarch64-unknown-linux-gnu> /nix/store/vhf2cr6immz4qdxd83y025fnxim8mmfg-binutils-2.38/bin/ld: skipping incompatible /nix/store/c84gzzifyh10w9m612wxcas04r7fq4h0-glib-aarch64-unknown-linux-gnu-2. 72.3/lib/libglib-2.0.so when searching for -lglib-2.0 gnome-tour-aarch64-unknown-linux-gnu> /nix/store/vhf2cr6immz4qdxd83y025fnxim8mmfg-binutils-2.38/bin/ld: cannot find -lglib-2.0: No such file or directory ... gnome-tour-aarch64-unknown-linux-gnu> collect2: error: ld returned 1 exit status ... gnome-tour-aarch64-unknown-linux-gnu> FAILED: src/gnome-tour gnome-tour-aarch64-unknown-linux-gnu> /nix/store/m5n32vy7rbfrqcxigw1p6wyx3cj7smg9-coreutils-9.1/bin/env CARGO_HOME=/build/gnome-tour-42.0/build/cargo-home /nix/store/76l9r44x1sv323c90j6vi401n4fvims2-cargo-1.62.1/b in/cargo build --manifest-path /build/gnome-tour-42.0/Cargo.toml --target-dir /build/gnome-tour-42.0/build/src --release && cp src/release/gnome-tour src/gnome-tour gnome-tour-aarch64-unknown-linux-gnu> ninja: build stopped: subcommand failed. ``` --- pkgs/desktops/gnome/core/gnome-tour/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/desktops/gnome/core/gnome-tour/default.nix b/pkgs/desktops/gnome/core/gnome-tour/default.nix index cbb33c2b2308..a26dcfa0a7b0 100644 --- a/pkgs/desktops/gnome/core/gnome-tour/default.nix +++ b/pkgs/desktops/gnome/core/gnome-tour/default.nix @@ -17,6 +17,8 @@ , libadwaita , librsvg , rustc +, rust +, writeText , cargo }: @@ -31,6 +33,10 @@ stdenv.mkDerivation rec { cargoVendorDir = "vendor"; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ appstream-glib cargo @@ -54,6 +60,16 @@ stdenv.mkDerivation rec { librsvg ]; + mesonFlags = + let + # ERROR: 'rust' compiler binary not defined in cross or native file + crossFile = writeText "cross-file.conf" '' + [binaries] + rust = [ 'rustc', '--target', '${rust.toRustTargetSpec stdenv.hostPlatform}' ] + ''; + in + lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-file=${crossFile}" ]; + passthru = { updateScript = gnome.updateScript { packageName = pname; From da9a9a440415b236f22f57ba67a24ab3fb53f595 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 7 Aug 2022 01:48:42 +0300 Subject: [PATCH 5/7] treewide: cross fixes --- .../networking/browsers/netsurf/libnsgif.nix | 5 ++++- .../gnome/apps/gnome-characters/default.nix | 8 ++++++++ .../gnome/apps/gnome-clocks/default.nix | 3 +++ .../gnome/apps/gnome-logs/default.nix | 15 +++++++++++++++ .../gnome/apps/gnome-weather/default.nix | 3 ++- pkgs/desktops/gnome/apps/seahorse/default.nix | 9 +++++++-- pkgs/desktops/gnome/core/gdm/default.nix | 2 +- .../gnome/core/gnome-bluetooth/default.nix | 3 +++ .../gnome/core/gnome-font-viewer/default.nix | 1 + .../core/gnome-shell-extensions/default.nix | 2 +- .../core/gnome-system-monitor/default.nix | 1 + .../gnome/core/gnome-themes-extra/default.nix | 2 +- .../development/libraries/clutter/default.nix | 2 +- pkgs/development/libraries/cogl/default.nix | 4 +++- pkgs/development/libraries/gcr/default.nix | 3 ++- .../libraries/geocode-glib/default.nix | 3 +++ pkgs/development/libraries/gexiv2/default.nix | 7 ++++--- pkgs/development/libraries/gjs/default.nix | 7 +++++-- .../libraries/gnome-menus/default.nix | 4 ++-- pkgs/development/libraries/grilo/default.nix | 3 +++ pkgs/development/libraries/gspell/default.nix | 8 +++++++- pkgs/development/libraries/gtkmm/3.x.nix | 11 +++++++++-- pkgs/development/libraries/gusb/default.nix | 2 +- .../libraries/libaccounts-glib/default.nix | 10 +++++++++- .../libraries/libadwaita/default.nix | 6 +++++- .../libraries/libdazzle/default.nix | 3 +++ pkgs/development/libraries/libgsf/default.nix | 8 ++++++++ .../libraries/libgweather/default.nix | 19 +++++++++++++++++-- .../libraries/libhandy/default.nix | 8 +++++--- .../libraries/liblouis/default.nix | 4 +++- .../libraries/libmediaart/default.nix | 8 ++++++-- .../development/libraries/libpeas/default.nix | 4 ++++ .../libraries/libportal/default.nix | 4 ++++ .../libraries/pipewire/wireplumber.nix | 4 ++-- .../python-modules/gst-python/default.nix | 13 +++++++++---- .../tools/profiling/sysprof/default.nix | 2 +- pkgs/os-specific/linux/bolt/default.nix | 8 ++++++-- .../linux/power-profiles-daemon/default.nix | 19 ++++++++++--------- .../networkmanager/libnma/default.nix | 5 ++++- .../package-management/packagekit/default.nix | 3 ++- pkgs/top-level/python-packages.nix | 4 ++-- 41 files changed, 187 insertions(+), 53 deletions(-) diff --git a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix index 582bcc84e4f1..2e1cb37a6468 100644 --- a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix +++ b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config +{ lib, stdenv, fetchurl, pkg-config, buildPackages , buildsystem }: @@ -12,12 +12,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-nq6lNM1wtTxar0UxeulXcBaFprSojb407Sb0+q6Hmks="; }; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ buildsystem ]; makeFlags = [ "PREFIX=$(out)" "NSSHARED=${buildsystem}/share/netsurf-buildsystem" + "BUILD_CC=$(CC_FOR_BUILD)" ]; meta = with lib; { diff --git a/pkgs/desktops/gnome/apps/gnome-characters/default.nix b/pkgs/desktops/gnome/apps/gnome-characters/default.nix index b43e0cdecadf..b4e9eee9712f 100644 --- a/pkgs/desktops/gnome/apps/gnome-characters/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-characters/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , meson , ninja , pkg-config @@ -29,6 +30,13 @@ stdenv.mkDerivation rec { sha256 = "XaD/uBb4prRPMDdEyoJ6NAgBGMHJONjXmvF7f+Z5gPg="; }; + patches = [ + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-characters/-/commit/3e28a6ad668e2239b14f2e05bc477ec1bfb210ba.patch"; + sha256 = "sha256-2N4eewknhOXBABs6BPA5/YuqZMT8dyXW857iamrrtuA="; + }) + ]; + nativeBuildInputs = [ gettext gobject-introspection diff --git a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix index 3c57c6272e84..2700f769b083 100644 --- a/pkgs/desktops/gnome/apps/gnome-clocks/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-clocks/default.nix @@ -45,6 +45,9 @@ stdenv.mkDerivation rec { desktop-file-utils libxml2 gobject-introspection # for finding vapi files + # 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 + gsound ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/apps/gnome-logs/default.nix b/pkgs/desktops/gnome/apps/gnome-logs/default.nix index 16d487867b8f..105194123d00 100644 --- a/pkgs/desktops/gnome/apps/gnome-logs/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-logs/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , meson , ninja , pkg-config @@ -29,6 +30,19 @@ stdenv.mkDerivation rec { sha256 = "TV5FFp1r9DkC16npoHk8kW65LaumuoWzXI629nLNq9c="; }; + patches = [ + # meson: Remove redundant check for glib-mkenums + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-logs/-/commit/01386ce9a69652a00bdb163e569b51150ca8903e.diff"; + sha256 = "sha256-tJJEai4Jw8aVcyhsFTYILiUV1xhsysX/rleeLP13DVM="; + }) + # meson: remove redundant check for pkg-config + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-logs/-/commit/ad350729a8b81f2c8eb2122de0956bb2199b48da.patch"; + sha256 = "sha256-5qGYyKM+B9XNZKytWH8K4QfSuBf7wpaPCWT6YIO5FGY="; + }) + ]; + nativeBuildInputs = [ python3 meson @@ -41,6 +55,7 @@ stdenv.mkDerivation rec { libxslt docbook_xsl docbook_xml_dtd_43 + glib ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/apps/gnome-weather/default.nix b/pkgs/desktops/gnome/apps/gnome-weather/default.nix index b7921322d994..c04cd6f2dc96 100644 --- a/pkgs/desktops/gnome/apps/gnome-weather/default.nix +++ b/pkgs/desktops/gnome/apps/gnome-weather/default.nix @@ -31,13 +31,14 @@ stdenv.mkDerivation rec { ninja wrapGAppsHook python3 + gobject-introspection + gjs ]; buildInputs = [ gtk4 libadwaita gjs - gobject-introspection libgweather gnome.adwaita-icon-theme geoclue2 diff --git a/pkgs/desktops/gnome/apps/seahorse/default.nix b/pkgs/desktops/gnome/apps/seahorse/default.nix index 60b1e2d572ed..07e39248bb70 100644 --- a/pkgs/desktops/gnome/apps/seahorse/default.nix +++ b/pkgs/desktops/gnome/apps/seahorse/default.nix @@ -42,6 +42,13 @@ stdenv.mkDerivation rec { itstool wrapGAppsHook python3 + openssh + gnupg + 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 = [ @@ -50,13 +57,11 @@ stdenv.mkDerivation rec { glib-networking gcr gsettings-desktop-schemas - gnupg gpgme libsecret avahi libsoup p11-kit - openssh openldap libpwquality libhandy diff --git a/pkgs/desktops/gnome/core/gdm/default.nix b/pkgs/desktops/gnome/core/gdm/default.nix index 990f1bef2119..cf435b1e9ea3 100644 --- a/pkgs/desktops/gnome/core/gdm/default.nix +++ b/pkgs/desktops/gnome/core/gdm/default.nix @@ -73,13 +73,13 @@ stdenv.mkDerivation rec { pkg-config python3 rsync + gobject-introspection ]; buildInputs = [ accountsservice audit glib - gobject-introspection gtk3 keyutils libX11 diff --git a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix index 678895ffbb50..8b6eb8c4f1bb 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,6 +50,8 @@ stdenv.mkDerivation rec { docbook-xsl-nons docbook_xml_dtd_43 python3 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix index 397f0b9838f1..64eb22b186d6 100644 --- a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix +++ b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { gettext wrapGAppsHook4 libxml2 + glib ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix index 0d8e87b3642d..c60e06ea640a 100644 --- a/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix +++ b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { # Fixup adapted from export-zips.sh in the source. extensiondir=$out/share/gnome-shell/extensions - schemadir=${glib.makeSchemaPath "$out" "${pname}-${version}"} + schemadir=${glib.makeSchemaPath "$out" "$name"} glib-compile-schemas $schemadir diff --git a/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix index aad4744935be..cbce4ad8b05c 100644 --- a/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix +++ b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix @@ -42,6 +42,7 @@ stdenv.mkDerivation rec { wrapGAppsHook meson ninja + glib ]; buildInputs = [ diff --git a/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix index 53f775833a8f..c7f70c76b2b3 100644 --- a/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix +++ b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix @@ -18,7 +18,7 @@ in stdenv.mkDerivation rec { }; }; - nativeBuildInputs = [ pkg-config intltool ]; + nativeBuildInputs = [ pkg-config intltool gtk3 ]; buildInputs = [ gtk3 librsvg pango atk gtk2 gdk-pixbuf ]; propagatedBuildInputs = [ gnome.adwaita-icon-theme hicolor-icon-theme ]; diff --git a/pkgs/development/libraries/clutter/default.nix b/pkgs/development/libraries/clutter/default.nix index aacb8581c8fc..2bf1162fe192 100644 --- a/pkgs/development/libraries/clutter/default.nix +++ b/pkgs/development/libraries/clutter/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; buildInputs = [ gtk3 ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config gobject-introspection ]; propagatedBuildInputs = [ libX11 libGL libGLU libXext libXfixes libXdamage libXcomposite libXi cogl pango atk json-glib gobject-introspection libxcb libinput libgudev libxkbcommon diff --git a/pkgs/development/libraries/cogl/default.nix b/pkgs/development/libraries/cogl/default.nix index e58a500cf838..7eef53e4c625 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" @@ -41,6 +41,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional gstreamerSupport "--enable-cogl-gst" ++ lib.optionals (!stdenv.isDarwin) [ "--enable-gles1" "--enable-gles2" ]; + # TODO: this shouldn't propagate so many things + # especially not gobject-introspection propagatedBuildInputs = with xorg; [ glib gdk-pixbuf gobject-introspection wayland mesa libGL libXrandr libXfixes libXcomposite libXdamage diff --git a/pkgs/development/libraries/gcr/default.nix b/pkgs/development/libraries/gcr/default.nix index cb833272923f..1241ae2a63f5 100644 --- a/pkgs/development/libraries/gcr/default.nix +++ b/pkgs/development/libraries/gcr/default.nix @@ -46,10 +46,11 @@ stdenv.mkDerivation rec { wrapGAppsHook vala shared-mime-info + gnupg + openssh ]; buildInputs = [ - gnupg libgcrypt libtasn1 pango diff --git a/pkgs/development/libraries/geocode-glib/default.nix b/pkgs/development/libraries/geocode-glib/default.nix index b55b5c19228a..e69ea93bb121 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,6 +54,8 @@ stdenv.mkDerivation rec { gtk-doc docbook-xsl-nons gobject-introspection + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ diff --git a/pkgs/development/libraries/gexiv2/default.nix b/pkgs/development/libraries/gexiv2/default.nix index 0cf505660040..6c5f797a0981 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,13 @@ 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 = [ glib - # Python binding overrides - python3 - python3.pkgs.pygobject3 ]; propagatedBuildInputs = [ diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index c8e28236aa3c..e24211590054 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,15 +56,17 @@ 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 = [ - gobject-introspection cairo readline libsysprof-capture spidermonkey_91 - dbus # for dbus-run-session ]; checkInputs = [ diff --git a/pkgs/development/libraries/gnome-menus/default.nix b/pkgs/development/libraries/gnome-menus/default.nix index 0b3d6689cb0b..498641bbdc30 100644 --- a/pkgs/development/libraries/gnome-menus/default.nix +++ b/pkgs/development/libraries/gnome-menus/default.nix @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { "INTROSPECTION_TYPELIBDIR=${placeholder "out"}/lib/girepository-1.0" ]; - nativeBuildInputs = [ pkg-config gettext ]; - buildInputs = [ glib gobject-introspection ]; + nativeBuildInputs = [ pkg-config gettext gobject-introspection ]; + buildInputs = [ glib ]; passthru = { updateScript = gnome.updateScript { diff --git a/pkgs/development/libraries/grilo/default.nix b/pkgs/development/libraries/grilo/default.nix index 16897c6f0446..2f8c291da0d6 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,6 +48,8 @@ stdenv.mkDerivation rec { gtk-doc docbook-xsl-nons docbook_xml_dtd_43 + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ diff --git a/pkgs/development/libraries/gspell/default.nix b/pkgs/development/libraries/gspell/default.nix index d4bd149e64e3..9592fd116766 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,10 @@ stdenv.mkDerivation rec { libxml2 autoreconfHook gtk-doc + glib ]; buildInputs = [ - glib gtk3 icu ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ @@ -53,6 +54,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; diff --git a/pkgs/development/libraries/gtkmm/3.x.nix b/pkgs/development/libraries/gtkmm/3.x.nix index 420dee6cbaaf..7245b9749303 100644 --- a/pkgs/development/libraries/gtkmm/3.x.nix +++ b/pkgs/development/libraries/gtkmm/3.x.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, gtk3, glibmm, cairomm, pangomm, atkmm, libepoxy, gnome }: +{ lib, stdenv, fetchurl, pkg-config, meson, ninja, python3, gtk3, glibmm, cairomm, pangomm, atkmm, libepoxy, gnome, glib, gdk-pixbuf }: stdenv.mkDerivation rec { pname = "gtkmm"; @@ -11,7 +11,14 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkg-config meson ninja python3 ]; + nativeBuildInputs = [ + pkg-config + meson + ninja + python3 + glib + gdk-pixbuf # for gdk-pixbuf-pixdata + ]; buildInputs = [ libepoxy ]; propagatedBuildInputs = [ glibmm gtk3 atkmm cairomm pangomm ]; diff --git a/pkgs/development/libraries/gusb/default.nix b/pkgs/development/libraries/gusb/default.nix index e3dac6c4ec70..af24e46efe2a 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 diff --git a/pkgs/development/libraries/libaccounts-glib/default.nix b/pkgs/development/libraries/libaccounts-glib/default.nix index 8dfc222f36ac..e20ad1c954d1 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 { @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { ninja pkg-config vala + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -38,6 +40,12 @@ stdenv.mkDerivation rec { sqlite ]; + # TODO: send patch upstream to make running tests optional + postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + substituteInPlace meson.build \ + --replace "subdir('tests')" "" + ''; + LC_ALL = "en_US.UTF-8"; mesonFlags = [ diff --git a/pkgs/development/libraries/libadwaita/default.nix b/pkgs/development/libraries/libadwaita/default.nix index a9185f0b4fec..862ecda2697b 100644 --- a/pkgs/development/libraries/libadwaita/default.nix +++ b/pkgs/development/libraries/libadwaita/default.nix @@ -33,6 +33,10 @@ stdenv.mkDerivation rec { hash = "sha256-xxnLgPKPOND/ITvDC6SOD2GlkzlIX3BzBbt6p2AEjgY="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ gi-docgen meson @@ -40,6 +44,7 @@ stdenv.mkDerivation rec { pkg-config sassc vala + gobject-introspection ]; mesonFlags = [ @@ -50,7 +55,6 @@ stdenv.mkDerivation rec { buildInputs = [ fribidi - gobject-introspection ] ++ lib.optionals stdenv.isDarwin [ AppKit Foundation diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix index 22ef87e43d04..aa808d5b4aa8 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 @@ -43,6 +44,8 @@ stdenv.mkDerivation rec { glib ] ++ lib.optionals stdenv.isLinux [ xvfb-run + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ diff --git a/pkgs/development/libraries/libgsf/default.nix b/pkgs/development/libraries/libgsf/default.nix index 30324b04d850..6897ed5a0973 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; diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix index cae2095f8ebd..e9a4eb2a4ea1 100644 --- a/pkgs/development/libraries/libgweather/default.nix +++ b/pkgs/development/libraries/libgweather/default.nix @@ -35,6 +35,10 @@ stdenv.mkDerivation rec { ./fix-pkgconfig.patch ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja @@ -43,8 +47,7 @@ stdenv.mkDerivation rec { vala gi-docgen gobject-introspection - python3 - python3.pkgs.pygobject3 + (python3.pythonForBuild.withPackages (ps: [ ps.pygobject3 ])) ]; buildInputs = [ @@ -63,6 +66,18 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs build-aux/meson/meson_post_install.py patchShebangs build-aux/meson/gen_locations_variant.py + + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # it should be a build-time dep for build + # TODO: send upstream + substituteInPlace doc/meson.build \ + --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" \ + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" + + # gir works for us even when cross-compiling + # TODO: send upstream because downstream users can use the option to disable gir if they don't have it working + substituteInPlace libgweather/meson.build \ + --replace "g_ir_scanner.found() and not meson.is_cross_build()" "g_ir_scanner.found()" ''; postFixup = '' diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index 468062beaefb..58d9097d8378 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -31,7 +31,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" - ] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ] ++ lib.optionals enableGlade [ "glade" @@ -43,6 +42,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-R3iL01gE69M8sJkR6XU0TIQ1ngttlSCv0cgh66i6d/8="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ gobject-introspection gi-docgen @@ -70,9 +73,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dgtk_doc=true" "-Dglade_catalog=${if enableGlade then "enabled" else "disabled"}" - "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" ]; # Uses define_variable in pkg-config, but we still need it to use the glade output diff --git a/pkgs/development/libraries/liblouis/default.nix b/pkgs/development/libraries/liblouis/default.nix index 32e58c9be0b2..2f3093e2facc 100644 --- a/pkgs/development/libraries/liblouis/default.nix +++ b/pkgs/development/libraries/liblouis/default.nix @@ -15,7 +15,9 @@ stdenv.mkDerivation rec { pname = "liblouis"; version = "3.22.0"; - outputs = [ "out" "dev" "man" "info" "doc" ]; + outputs = [ "out" "dev" "info" "doc" ] + # configure: WARNING: cannot generate manual pages while cross compiling + ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ "man" ]; src = fetchFromGitHub { owner = "liblouis"; diff --git a/pkgs/development/libraries/libmediaart/default.nix b/pkgs/development/libraries/libmediaart/default.nix index 531ff8584fac..e8898698dca1 100644 --- a/pkgs/development/libraries/libmediaart/default.nix +++ b/pkgs/development/libraries/libmediaart/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, meson, ninja, pkg-config, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gdk-pixbuf, gobject-introspection, gnome }: +{ lib, stdenv, fetchurl, meson, mesonEmulatorHook, ninja, pkg-config, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gdk-pixbuf, gobject-introspection, gnome }: stdenv.mkDerivation rec { pname = "libmediaart"; @@ -11,7 +11,11 @@ stdenv.mkDerivation rec { sha256 = "w7xQJdfbOAWH+cjrgAxhH2taFta0t4/P+T9ih2pnfxc="; }; - nativeBuildInputs = [ meson ninja pkg-config vala gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ]; + nativeBuildInputs = [ meson ninja pkg-config vala gtk-doc docbook_xsl docbook_xml_dtd_412 gobject-introspection ] + ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook + ]; + buildInputs = [ glib gdk-pixbuf ]; mesonFlags = [ diff --git a/pkgs/development/libraries/libpeas/default.nix b/pkgs/development/libraries/libpeas/default.nix index 712592431abe..95e56153e51c 100644 --- a/pkgs/development/libraries/libpeas/default.nix +++ b/pkgs/development/libraries/libpeas/default.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation rec { sha256 = "1iVSD6AuiXcCmyRq5Dm8IYloll8egtYSIItxPx3MPQ4="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ pkg-config meson diff --git a/pkgs/development/libraries/libportal/default.nix b/pkgs/development/libraries/libportal/default.nix index 93ca52c243c6..005bc2126652 100644 --- a/pkgs/development/libraries/libportal/default.nix +++ b/pkgs/development/libraries/libportal/default.nix @@ -40,6 +40,10 @@ stdenv.mkDerivation rec { }) ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix index 5f418efe9fab..d43a4331f98d 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"; @@ -64,7 +64,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 ] )) diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index e14223c1fd6d..52c7be56bc72 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,27 @@ 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" + # Exec format error during configure + "-Dpython=${python.pythonForBuild.interpreter}" ]; doCheck = true; diff --git a/pkgs/development/tools/profiling/sysprof/default.nix b/pkgs/development/tools/profiling/sysprof/default.nix index e21e71907869..118b55197da5 100644 --- a/pkgs/development/tools/profiling/sysprof/default.nix +++ b/pkgs/development/tools/profiling/sysprof/default.nix @@ -43,10 +43,10 @@ stdenv.mkDerivation rec { shared-mime-info wrapGAppsHook gnome.adwaita-icon-theme + glib ]; buildInputs = [ - glib gtk3 json-glib pango diff --git a/pkgs/os-specific/linux/bolt/default.nix b/pkgs/os-specific/linux/bolt/default.nix index d424f89fdfb3..2545c73ac588 100644 --- a/pkgs/os-specific/linux/bolt/default.nix +++ b/pkgs/os-specific/linux/bolt/default.nix @@ -44,6 +44,10 @@ stdenv.mkDerivation rec { }) ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ asciidoc docbook_xml_dtd_45 @@ -53,10 +57,10 @@ stdenv.mkDerivation rec { meson ninja pkg-config + glib ] ++ lib.optional (!doCheck) python3; buildInputs = [ - glib polkit systemd ]; @@ -71,7 +75,7 @@ stdenv.mkDerivation rec { dbus gobject-introspection umockdev - (python3.withPackages + (python3.pythonForBuild.withPackages (p: [ p.pygobject3 p.dbus-python p.python-dbusmock ])) ]; diff --git a/pkgs/os-specific/linux/power-profiles-daemon/default.nix b/pkgs/os-specific/linux/power-profiles-daemon/default.nix index 402b2536163c..f2720f40f5d4 100644 --- a/pkgs/os-specific/linux/power-profiles-daemon/default.nix +++ b/pkgs/os-specific/linux/power-profiles-daemon/default.nix @@ -2,6 +2,7 @@ , lib , pkg-config , meson +, mesonEmulatorHook , ninja , fetchFromGitLab , fetchpatch @@ -24,13 +25,6 @@ , nixosTests }: -let - testPythonPkgs = ps: with ps; [ - pygobject3 - dbus-python - python-dbusmock - ]; -in stdenv.mkDerivation rec { pname = "power-profiles-daemon"; version = "0.12"; @@ -58,6 +52,14 @@ stdenv.mkDerivation rec { gobject-introspection wrapGAppsNoGuiHook python3.pkgs.wrapPython + # checkInput but cheked for during the configuring + (python3.pythonForBuild.withPackages (ps: with ps; [ + pygobject3 + dbus-python + python-dbusmock + ])) + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -81,13 +83,12 @@ stdenv.mkDerivation rec { checkInputs = [ umockdev dbus - (python3.withPackages testPythonPkgs) ]; mesonFlags = [ "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system" "-Dgtk_doc=true" - "-Dtests=true" + "-Dtests=${lib.boolToString (stdenv.buildPlatform.canExecute stdenv.hostPlatform)}" ]; doCheck = true; diff --git a/pkgs/tools/networking/networkmanager/libnma/default.nix b/pkgs/tools/networking/networkmanager/libnma/default.nix index 4993068d2a51..00e68176c107 100644 --- a/pkgs/tools/networking/networkmanager/libnma/default.nix +++ b/pkgs/tools/networking/networkmanager/libnma/default.nix @@ -1,6 +1,7 @@ { stdenv , fetchurl , meson +, mesonEmulatorHook , ninja , gettext , gtk-doc @@ -51,6 +52,8 @@ stdenv.mkDerivation rec { docbook_xml_dtd_43 libxml2 vala + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ @@ -72,7 +75,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/nma-ws/nma-eap.c --subst-var-by \ - NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "${pname}-${version}"} + NM_APPLET_GSETTINGS ${glib.makeSchemaPath "$out" "$name"} ''; postInstall = '' diff --git a/pkgs/tools/package-management/packagekit/default.nix b/pkgs/tools/package-management/packagekit/default.nix index 66064139f380..0dfa433e6c40 100644 --- a/pkgs/tools/package-management/packagekit/default.nix +++ b/pkgs/tools/package-management/packagekit/default.nix @@ -44,7 +44,6 @@ stdenv.mkDerivation rec { glib polkit python3 - gobject-introspection gst_all_1.gstreamer gst_all_1.gst-plugins-base gtk3 @@ -54,6 +53,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional enableSystemd systemd ++ lib.optional enableBashCompletion bash-completion; nativeBuildInputs = [ + gobject-introspection + glib vala gettext pkg-config diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e0117f946f73..f33700146e8b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4010,8 +4010,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 a52d95ac10bda7b81383bac1c1f69d8ab1d6f842 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 7 Aug 2022 06:08:14 +0300 Subject: [PATCH 6/7] libgnomekbd: fix cross and build introspection data they weren't being built before at all --- pkgs/development/libraries/libgnomekbd/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgnomekbd/default.nix b/pkgs/development/libraries/libgnomekbd/default.nix index 957c21342524..5efd751bbb1e 100644 --- a/pkgs/development/libraries/libgnomekbd/default.nix +++ b/pkgs/development/libraries/libgnomekbd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, file, intltool, glib, gtk3, libxklavier, wrapGAppsHook, gnome }: +{ lib, stdenv, fetchurl, pkg-config, file, intltool, glib, gtk3, libxklavier, wrapGAppsHook, gnome, gobject-introspection }: stdenv.mkDerivation rec { pname = "libgnomekbd"; @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { intltool pkg-config wrapGAppsHook + glib + gobject-introspection ]; # Requires in libgnomekbd.pc @@ -25,6 +27,11 @@ stdenv.mkDerivation rec { glib ]; + postPatch = '' + substituteInPlace libgnomekbd/Makefile.in \ + --replace "shell pkg-config" 'shell $(PKG_CONFIG)' + ''; + passthru = { updateScript = gnome.updateScript { packageName = pname; From b59f013860edef42fbabcb010932d4e2bb63d5f2 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 7 Aug 2022 06:27:50 +0300 Subject: [PATCH 7/7] uhttpmock: fix cross no idea why this still happens here when this issue was fixed in gobject-introspection hook and the fix works for other packages --- pkgs/development/libraries/uhttpmock/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/uhttpmock/default.nix b/pkgs/development/libraries/uhttpmock/default.nix index 7a27cd1fd678..a5bd2fd36162 100644 --- a/pkgs/development/libraries/uhttpmock/default.nix +++ b/pkgs/development/libraries/uhttpmock/default.nix @@ -16,6 +16,13 @@ stdenv.mkDerivation rec { preConfigure = "NOCONFIGURE=1 ./autogen.sh"; + # while cross + # /build/source/tmp-introspect3xf43lf3/.libs/Uhm-0.0: error while loading shared libraries: libuhttpmock-0.0.so.0: cannot open shared object file: No such file or directory + preBuild = '' + mkdir -p ${placeholder "out"}/lib + ln -s $PWD/libuhttpmock/.libs/libuhttpmock-0.0.so.0 ${placeholder "out"}/lib/libuhttpmock-0.0.so.0 + ''; + meta = with lib; { description = "Project for mocking web service APIs which use HTTP or HTTPS"; homepage = "https://gitlab.com/groups/uhttpmock/";