Merge pull request #146881 from Mindavi/libnice/cross
libnice (+ dependencies): support cross-compilation
This commit is contained in:
commit
3da23f7aac
4 changed files with 25 additions and 9 deletions
|
@ -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 \
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue