From 4e223a3b68092f2917578e3aba703aee1cecac04 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:04:04 +0200 Subject: [PATCH 01/10] clutter-gst: enable strictDeps fix cross cogl propagates gobject-introspection to buildInputs so thats why it has been working so far checked with diffing --- pkgs/development/libraries/clutter-gst/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/clutter-gst/default.nix b/pkgs/development/libraries/clutter-gst/default.nix index e00cda47da6d..4d21cd10f8ef 100644 --- a/pkgs/development/libraries/clutter-gst/default.nix +++ b/pkgs/development/libraries/clutter-gst/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, fetchpatch, lib, stdenv, pkg-config, clutter, gtk3, glib, cogl, gnome, gdk-pixbuf }: +{ fetchurl, fetchpatch, lib, stdenv, pkg-config, clutter, gtk3, glib, cogl, gnome, gdk-pixbuf, gobject-introspection }: stdenv.mkDerivation rec { pname = "clutter-gst"; @@ -21,8 +21,9 @@ stdenv.mkDerivation rec { }) ]; + strictDeps = true; + nativeBuildInputs = [ pkg-config glib gobject-introspection ]; propagatedBuildInputs = [ clutter gtk3 glib cogl gdk-pixbuf ]; - nativeBuildInputs = [ pkg-config ]; postBuild = "rm -rf $out/share/gtk-doc"; From 52306ecc2687ce97652f0853a2709fd7d1502f28 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:10:56 +0200 Subject: [PATCH 02/10] amtk: enable strictDeps fix cross checked with diffing --- pkgs/development/libraries/amtk/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/amtk/default.nix b/pkgs/development/libraries/amtk/default.nix index 74f83a30a502..86d5a038a3f2 100644 --- a/pkgs/development/libraries/amtk/default.nix +++ b/pkgs/development/libraries/amtk/default.nix @@ -3,6 +3,7 @@ , fetchurl , gtk3 , meson +, mesonEmulatorHook , ninja , pkg-config , gobject-introspection @@ -24,6 +25,7 @@ stdenv.mkDerivation rec { sha256 = "1QEVuFyHKqwpaTS17nJqP6FWxvWtltJ+Dt0Kpa0XMig="; }; + strictDeps = true; nativeBuildInputs = [ meson ninja @@ -32,6 +34,8 @@ stdenv.mkDerivation rec { gobject-introspection gtk-doc docbook-xsl-nons + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ From 9de6ea604b1e3fdd4d958c29f875f3632e498b51 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:13:57 +0200 Subject: [PATCH 03/10] libcloudproviders: enable strictDeps fix cross checked with diffing --- .../libraries/libcloudproviders/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libcloudproviders/default.nix b/pkgs/development/libraries/libcloudproviders/default.nix index 08601db08342..41a51f001451 100644 --- a/pkgs/development/libraries/libcloudproviders/default.nix +++ b/pkgs/development/libraries/libcloudproviders/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, meson, ninja, pkg-config, gobject-introspection, vala, gtk-doc, docbook_xsl, glib }: +{ lib, stdenv, fetchurl, meson, ninja, pkg-config, gobject-introspection, vala, gtk-doc, docbook_xsl, glib, mesonEmulatorHook }: # TODO: Add installed tests once https://gitlab.gnome.org/World/libcloudproviders/issues/4 is fixed @@ -17,7 +17,18 @@ stdenv.mkDerivation rec { "-Denable-gtk-doc=true" ]; - nativeBuildInputs = [ meson ninja pkg-config gobject-introspection vala gtk-doc docbook_xsl ]; + strictDeps = true; + nativeBuildInputs = [ + meson + ninja + pkg-config + gobject-introspection + vala + gtk-doc + docbook_xsl + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook + ]; buildInputs = [ glib ]; From ceb7b207235d51e5ddf532a9ef085b0e233758b9 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:16:56 +0200 Subject: [PATCH 04/10] gucharmap: enable strictDeps fix cross checked with diffing --- pkgs/desktops/gnome/core/gucharmap/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/core/gucharmap/default.nix b/pkgs/desktops/gnome/core/gucharmap/default.nix index c822605cf3e6..ec07f89ebc55 100644 --- a/pkgs/desktops/gnome/core/gucharmap/default.nix +++ b/pkgs/desktops/gnome/core/gucharmap/default.nix @@ -3,6 +3,7 @@ , intltool , fetchFromGitLab , meson +, mesonEmulatorHook , ninja , pkg-config , python3 @@ -18,7 +19,6 @@ , docbook_xsl , docbook_xml_dtd_412 , gsettings-desktop-schemas -, callPackage , unzip , unicode-character-database , unihan-database @@ -57,6 +57,7 @@ in stdenv.mkDerivation rec { sha256 = "sha256-QoHLMq3U/BvpCFKttxLo0qs2xmZ/pCqPjsgq/MMWNbo="; }; + strictDeps = true; nativeBuildInputs = [ meson ninja @@ -73,6 +74,8 @@ in stdenv.mkDerivation rec { libxml2 desktop-file-utils gobject-introspection + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ From 729c8406c995166a9352c4e018f86f95047486fd Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:26:06 +0200 Subject: [PATCH 05/10] uhttpmock: enable strictDeps fix cross checked with diffing --- pkgs/development/libraries/uhttpmock/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/uhttpmock/default.nix b/pkgs/development/libraries/uhttpmock/default.nix index f2f0fabb0637..d22ff81c2530 100644 --- a/pkgs/development/libraries/uhttpmock/default.nix +++ b/pkgs/development/libraries/uhttpmock/default.nix @@ -2,6 +2,7 @@ , lib , fetchFromGitLab , meson +, mesonEmulatorHook , ninja , pkg-config , gobject-introspection @@ -26,6 +27,7 @@ stdenv.mkDerivation rec { sha256 = "NuxiVVowZ8ilP9rcgapCe9OzFCpoOfZxZiSyjTeOrts="; }; + strictDeps = true; nativeBuildInputs = [ meson ninja @@ -34,6 +36,8 @@ stdenv.mkDerivation rec { vala gtk-doc docbook-xsl-nons + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ From e6b244b41d37003eb687841ab32d3a9c9ba41e9b Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:33:32 +0200 Subject: [PATCH 06/10] tepl: enable strictDeps fix cross checked with diffing --- pkgs/development/libraries/tepl/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/tepl/default.nix b/pkgs/development/libraries/tepl/default.nix index 3b228b6c6250..387fa214de26 100644 --- a/pkgs/development/libraries/tepl/default.nix +++ b/pkgs/development/libraries/tepl/default.nix @@ -1,6 +1,7 @@ { lib, stdenv , fetchurl , meson +, mesonEmulatorHook , ninja , amtk , gnome @@ -24,6 +25,7 @@ stdenv.mkDerivation rec { sha256 = "XlayBmnQzwX6HWS1jIw0LFkVgSLcUYEA0JPVnfm4cyE="; }; + strictDeps = true; nativeBuildInputs = [ meson ninja @@ -31,6 +33,8 @@ stdenv.mkDerivation rec { pkg-config gtk-doc docbook-xsl-nons + ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + mesonEmulatorHook ]; buildInputs = [ From e8d9eb71f67c9d1995ef14c8bf005865c944fa6d Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 00:45:29 +0200 Subject: [PATCH 07/10] gmime2,gmime3: fix cross by copying iconv-detect.h from void-packages https://github.com/void-linux/void-packages/tree/master/srcpkgs/gmime/files https://github.com/jstedfast/gmime/blob/1137d672654a1e8fdbda52c7e02482c810d237af/configure.ac#L298-L322 --- pkgs/development/libraries/gmime/2.nix | 8 +++++++- pkgs/development/libraries/gmime/3.nix | 19 ++++++++++++++++--- .../libraries/gmime/iconv-detect.h | 6 ++++++ .../libraries/gmime/musl-iconv-detect.h | 6 ++++++ 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/libraries/gmime/iconv-detect.h create mode 100644 pkgs/development/libraries/gmime/musl-iconv-detect.h diff --git a/pkgs/development/libraries/gmime/2.nix b/pkgs/development/libraries/gmime/2.nix index 2a953fa702cb..d6369227739b 100644 --- a/pkgs/development/libraries/gmime/2.nix +++ b/pkgs/development/libraries/gmime/2.nix @@ -13,7 +13,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config gobject-introspection ]; propagatedBuildInputs = [ glib zlib libgpg-error ]; - configureFlags = [ "--enable-introspection=yes" ]; + configureFlags = [ + "--enable-introspection=yes" + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ]; postPatch = '' substituteInPlace tests/testsuite.c \ @@ -24,6 +26,10 @@ stdenv.mkDerivation rec { --replace /bin/mkdir mkdir ''; + preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + cp ${if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h} ./iconv-detect.h + ''; + nativeCheckInputs = [ gnupg ]; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/gmime/3.nix b/pkgs/development/libraries/gmime/3.nix index 6816c108160a..e5a70f234872 100644 --- a/pkgs/development/libraries/gmime/3.nix +++ b/pkgs/development/libraries/gmime/3.nix @@ -12,19 +12,32 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - buildInputs = [ vala gobject-introspection zlib gpgme libidn2 libunistring ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config gobject-introspection vala ]; + buildInputs = [ + zlib + gpgme + libidn2 + libunistring + vala # for share/vala/Makefile.vapigen + ]; propagatedBuildInputs = [ glib ]; configureFlags = [ "--enable-introspection=yes" "--enable-vala=yes" - ]; + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ]; postPatch = '' substituteInPlace tests/testsuite.c \ --replace /bin/rm rm ''; + preConfigure = '' + PKG_CONFIG_VAPIGEN_VAPIGEN="$(type -p vapigen)" + export PKG_CONFIG_VAPIGEN_VAPIGEN + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + cp ${if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h} ./iconv-detect.h + ''; + nativeCheckInputs = [ gnupg ]; doCheck = true; diff --git a/pkgs/development/libraries/gmime/iconv-detect.h b/pkgs/development/libraries/gmime/iconv-detect.h new file mode 100644 index 000000000000..6d9dd05b59e2 --- /dev/null +++ b/pkgs/development/libraries/gmime/iconv-detect.h @@ -0,0 +1,6 @@ +/* This is an auto-generated header, DO NOT EDIT! */ + +#define ICONV_ISO_INT_FORMAT "iso-%u-%u" +#define ICONV_ISO_STR_FORMAT "iso-%u-%s" +#define ICONV_SHIFT_JIS "shift-jis" +#define ICONV_10646 "iso-10646" diff --git a/pkgs/development/libraries/gmime/musl-iconv-detect.h b/pkgs/development/libraries/gmime/musl-iconv-detect.h new file mode 100644 index 000000000000..569da106b943 --- /dev/null +++ b/pkgs/development/libraries/gmime/musl-iconv-detect.h @@ -0,0 +1,6 @@ +/* This is an auto-generated header, DO NOT EDIT! */ + +#define ICONV_ISO_INT_FORMAT "iso-%u-%u" +#define ICONV_ISO_STR_FORMAT "iso-%u-%s" +#define ICONV_SHIFT_JIS "shift-jis" +#define ICONV_10646 "UCS-4BE" From 928c439ec256e9f1f2319433138079525bc04ec7 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 01:17:29 +0200 Subject: [PATCH 08/10] librest_1_0: fix cross --- pkgs/development/libraries/librest/1.0.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/librest/1.0.nix b/pkgs/development/libraries/librest/1.0.nix index fec622752f8c..1e134f62bad7 100644 --- a/pkgs/development/libraries/librest/1.0.nix +++ b/pkgs/development/libraries/librest/1.0.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { }) ]; + strictDeps = true; + depsBuildBuild = [ pkg-config ]; nativeBuildInputs = [ meson ninja @@ -64,6 +66,12 @@ stdenv.mkDerivation rec { # https://gitlab.gnome.org/GNOME/librest/-/merge_requests/19 substituteInPlace meson.build \ --replace "con." "conf." + + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # it should be a build-time dep for build + # TODO: send upstream + substituteInPlace docs/meson.build \ + --replace "'gi-docgen', ver" "'gi-docgen', native:true, ver" ''; postFixup = '' From ef0e28c60a469b4366e0894a6f048ffb7517e475 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 01:22:47 +0200 Subject: [PATCH 09/10] telepathy-glib: enable strictDeps fix cross checked with diffing --- pkgs/development/libraries/telepathy/glib/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/telepathy/glib/default.nix b/pkgs/development/libraries/telepathy/glib/default.nix index 9ab269aaacfc..e1510fca92a6 100644 --- a/pkgs/development/libraries/telepathy/glib/default.nix +++ b/pkgs/development/libraries/telepathy/glib/default.nix @@ -22,16 +22,17 @@ stdenv.mkDerivation rec { sha256 = "sKN013HN0IESXzjDq9B5ZXZCMBxxpUPVVeK/IZGSc/A="; }; + strictDeps = true; nativeBuildInputs = [ pkg-config libxslt gobject-introspection vala + python3 ]; buildInputs = [ glibcLocales - python3 ]; propagatedBuildInputs = [ From 7b3e5b002e602d4344cc65ed060bad1cb5e2e1f3 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 26 Mar 2023 22:18:25 +0300 Subject: [PATCH 10/10] gtksourceview5: fix cross --- pkgs/development/libraries/gtksourceview/5.x.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gtksourceview/5.x.nix b/pkgs/development/libraries/gtksourceview/5.x.nix index 100e3e44a88f..230047daa04f 100644 --- a/pkgs/development/libraries/gtksourceview/5.x.nix +++ b/pkgs/development/libraries/gtksourceview/5.x.nix @@ -59,6 +59,7 @@ stdenv.mkDerivation (finalAttrs: { gobject-introspection vala gi-docgen + gtk4 # for gtk4-update-icon-cache checked during configure ]; buildInputs = [