From b827b46c8d17a57999b371e49bbd24812e3324df Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Sun, 7 Nov 2021 16:32:48 +0100 Subject: [PATCH 1/4] gssdp: fix cross-compilation Disables gtk_doc and introspection --- pkgs/development/libraries/gssdp/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gssdp/default.nix b/pkgs/development/libraries/gssdp/default.nix index 9947214bf7fc..a8f8535138e3 100644 --- a/pkgs/development/libraries/gssdp/default.nix +++ b/pkgs/development/libraries/gssdp/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation rec { pname = "gssdp"; version = "1.4.0.1"; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/gssdp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -44,13 +45,14 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" "-Dsniffer=false" + "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" ]; doCheck = true; - postFixup = '' + postFixup = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) '' # Move developer documentation to devdoc output. # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \ From 856ca0f52f704d99aebb3aacd58bfbcce6e31750 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 23 Aug 2021 21:17:51 +0200 Subject: [PATCH 2/4] gupnp: fix cross-compilation --- pkgs/development/libraries/gupnp/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 32f7c201fad4..1a77e50eb540 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -22,7 +22,8 @@ stdenv.mkDerivation rec { pname = "gupnp"; version = "1.4.0"; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -34,6 +35,10 @@ stdenv.mkDerivation rec { ./0001-pkg-config-Declare-header-dependencies-as-public.patch ]; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ meson ninja @@ -58,7 +63,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" ]; doCheck = true; From 4f8a79c4fe9466a9814ce2edc9db623ada55e518 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 23 Aug 2021 21:18:08 +0200 Subject: [PATCH 3/4] gupnp-igd: fix cross-compilation --- pkgs/development/libraries/gupnp-igd/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gupnp-igd/default.nix b/pkgs/development/libraries/gupnp-igd/default.nix index 6eb44b9172ab..45e17704449d 100644 --- a/pkgs/development/libraries/gupnp-igd/default.nix +++ b/pkgs/development/libraries/gupnp-igd/default.nix @@ -17,13 +17,18 @@ stdenv.mkDerivation rec { pname = "gupnp-igd"; version = "1.2.0"; - outputs = [ "out" "dev" "devdoc" ]; + outputs = [ "out" "dev" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "sha256-S1EgCYqhPt0ngYup7k1/6WG/VAv1DQVv9wPGFUXgK+E="; }; + depsBuildBuild = [ + pkg-config + ]; + nativeBuildInputs = [ pkg-config meson @@ -41,7 +46,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=true" + "-Dgtk_doc=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" + "-Dintrospection=${lib.boolToString (stdenv.buildPlatform == stdenv.hostPlatform)}" ]; # Seems to get stuck sometimes. From ff8a5ba767e9819e79ca97150d585ebf58369f2c Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Mon, 23 Aug 2021 21:22:40 +0200 Subject: [PATCH 4/4] libnice: support cross-compilation --- pkgs/development/libraries/libnice/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libnice/default.nix b/pkgs/development/libraries/libnice/default.nix index 7c5043165f9d..87f2d7327125 100644 --- a/pkgs/development/libraries/libnice/default.nix +++ b/pkgs/development/libraries/libnice/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { pname = "libnice"; version = "0.1.18"; - outputs = [ "bin" "out" "dev" "devdoc" ]; + outputs = [ "bin" "out" "dev" ] + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "devdoc" ]; src = fetchurl { url = "https://libnice.freedesktop.org/releases/${pname}-${version}.tar.gz"; @@ -61,7 +62,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=enabled" # Disabled by default as of libnice-0.1.15 + "-Dgtk_doc=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" + "-Dintrospection=${if (stdenv.buildPlatform == stdenv.hostPlatform) then "enabled" else "disabled"}" "-Dexamples=disabled" # requires many dependencies and probably not useful for our users ];