about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-05-07 20:35:47 +0000
committerGitHub <noreply@github.com>2019-05-07 20:35:47 +0000
commitf41599a028d2743825b1de3cb5866e8e826ae221 (patch)
treef29a5b29876d97296a6b1889f4a0d872a745fafa /pkgs
parent87a5d8fedeb4949234a84206f3da9f3d882d1111 (diff)
parent4a246cea2867b0012a0fae2949b3d87127f73bb2 (diff)
downloadnixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar.gz
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar.bz2
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar.lz
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar.xz
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.tar.zst
nixlib-f41599a028d2743825b1de3cb5866e8e826ae221.zip
Merge pull request #61086 from mayflower/cross-fixes
Batch of cross compilation fixes
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/cdparanoia/default.nix4
-rw-r--r--pkgs/applications/misc/dmenu/default.nix2
-rw-r--r--pkgs/development/libraries/dbus-glib/default.nix12
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix31
-rw-r--r--pkgs/development/libraries/iso-codes/default.nix4
-rw-r--r--pkgs/os-specific/linux/libnl/default.nix2
-rw-r--r--pkgs/servers/x11/xorg/default.nix42
-rwxr-xr-xpkgs/servers/x11/xorg/generate-expr-from-tarballs.pl3
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix3
-rw-r--r--pkgs/tools/filesystems/btrfs-progs/default.nix13
-rw-r--r--pkgs/tools/networking/jnettop/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix6
12 files changed, 81 insertions, 45 deletions
diff --git a/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix
index c419d141d1ba..4e517ee636e8 100644
--- a/pkgs/applications/audio/cdparanoia/default.nix
+++ b/pkgs/applications/audio/cdparanoia/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./utils.patch
     ++ [./fix_private_keyword.patch];
 
-  buildInputs = stdenv.lib.optional stdenv.isAarch64 autoreconfHook;
+  nativeBuildInputs = stdenv.lib.optional stdenv.isAarch64 autoreconfHook;
 
   propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
     Carbon
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "format" ];
 
-  preConfigure = "unset CC" + stdenv.lib.optionalString stdenv.isAarch64 ''\n
+  preConfigure = "unset CC" + stdenv.lib.optionalString stdenv.isAarch64 '';
     cp ${gnu-config}/config.sub configure.sub
     cp ${gnu-config}/config.guess configure.guess
   '';
diff --git a/pkgs/applications/misc/dmenu/default.nix b/pkgs/applications/misc/dmenu/default.nix
index 90754b8fb1d8..e6b62817b907 100644
--- a/pkgs/applications/misc/dmenu/default.nix
+++ b/pkgs/applications/misc/dmenu/default.nix
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
     sed -i "s@PREFIX = /usr/local@PREFIX = $out@g" config.mk
   '';
 
+  makeFlags = [ "CC:=$(CC)" ];
+
   meta = with stdenv.lib; {
       description = "A generic, highly customizable, and efficient menu for the X Window System";
       homepage = https://tools.suckless.org/dmenu;
diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix
index fe57759f09fb..c62377959608 100644
--- a/pkgs/development/libraries/dbus-glib/default.nix
+++ b/pkgs/development/libraries/dbus-glib/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, expat, gettext, libiconv, dbus, glib }:
+{ stdenv, fetchurl, buildPackages
+, pkgconfig, expat, gettext, libiconv, dbus, glib
+}:
 
 stdenv.mkDerivation rec {
   name = "dbus-glib-0.110";
@@ -11,15 +13,15 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "dev" "devdoc" ];
   outputBin = "dev";
 
-  nativeBuildInputs = [ pkgconfig gettext ];
+  nativeBuildInputs = [ pkgconfig gettext glib ];
 
   buildInputs = [ expat libiconv ];
 
   propagatedBuildInputs = [ dbus glib ];
 
-  preConfigure = ''
-    configureFlagsArray+=("--exec-prefix=$dev")
-  '';
+  configureFlags = [ "--exec-prefix=${placeholder "dev"}" ] ++
+    stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform)
+      "--with-dbus-binding-tool=${buildPackages.dbus-glib.dev}/bin/dbus-binding-tool";
 
   doCheck = false;
 
diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
index 96c9d8e0c8e1..d03151e43444 100644
--- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
+++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix
@@ -1,4 +1,6 @@
-{ fetchurl, stdenv, perl, bison, flex, pkgconfig, glib, libxml2, libintl }:
+{ fetchurl, fetchpatch, stdenv, autoreconfHook
+, perl, bison2, flex, pkgconfig, glib, libxml2, libintl
+}:
 
 stdenv.mkDerivation rec {
   name = "gstreamer-0.10.36";
@@ -13,12 +15,31 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ pkgconfig libintl ];
-  buildInputs = [ perl bison flex ];
+  nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison2 glib ];
   propagatedBuildInputs = [ glib libxml2 ];
 
-  # See https://trac.macports.org/ticket/40783 for explanation of patch
-  patches = stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/GStreamer/common/commit/03a0e5736761a72d4ed880e8c485bbf9e4a8ea47.patch";
+      sha256 = "0rin3x01yy78ky3smmhbwlph18hhym18q4x9w6ddiqajg5lk4xhm";
+      extraPrefix = "common/";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      url = "https://github.com/GStreamer/common/commit/8aadeaaa8a948d7ce62008789ab03e9aa514c2b9.patch";
+      sha256 = "0n2mqvq2al7jr2hflhz4l781i3jya5a9i725jvy508ambpgycz3x";
+      extraPrefix = "common/";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      url = "https://github.com/GStreamer/common/commit/7bb2bcecda471a0d514a964365a78150f3ee5747.patch";
+      sha256 = "0famdj70m7wjvr1dpy7iywhrkqxmrshxz0rizz1bixgp42dvkhbq";
+      extraPrefix = "common/";
+      stripLen = 1;
+    })
+  ] ++
+    # See https://trac.macports.org/ticket/40783 for explanation of patch
+    stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
 
   postPatch = ''
     sed -i -e 's/^   /\t/' docs/gst/Makefile.in docs/libs/Makefile.in docs/plugins/Makefile.in
diff --git a/pkgs/development/libraries/iso-codes/default.nix b/pkgs/development/libraries/iso-codes/default.nix
index 80154f504d41..43ab20da8ae0 100644
--- a/pkgs/development/libraries/iso-codes/default.nix
+++ b/pkgs/development/libraries/iso-codes/default.nix
@@ -8,13 +8,15 @@ stdenv.mkDerivation rec {
     url = "https://salsa.debian.org/iso-codes-team/iso-codes/uploads/ef8de8bc12e0512d26ed73436a477871/${name}.tar.xz";
     sha256 = "08i8hjy0qjlw9kd9i87jx967ihwh45l2xi55q1aa5265sind7byb";
   };
+
   patchPhase = ''
     for i in `find . -name \*.py`
     do
         sed -i -e "s|#!/usr/bin/env python|#!${python3}/bin/python|" $i
     done
   '';
-  buildInputs = [ gettext python3 ];
+
+  nativeBuildInputs = [ gettext python3 ];
 
   meta = with stdenv.lib; {
     homepage = https://salsa.debian.org/iso-codes-team/iso-codes;
diff --git a/pkgs/os-specific/linux/libnl/default.nix b/pkgs/os-specific/linux/libnl/default.nix
index 1caf91b0bb69..34d10d3aa5fb 100644
--- a/pkgs/os-specific/linux/libnl/default.nix
+++ b/pkgs/os-specific/linux/libnl/default.nix
@@ -1,5 +1,5 @@
 { stdenv, file, lib, fetchFromGitHub, fetchpatch, autoreconfHook, bison, flex, pkgconfig
-, pythonSupport ? true, swig ? null, python}:
+, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, swig ? null, python}:
 
 stdenv.mkDerivation rec {
   name = "libnl-${version}";
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 42df8f62ef57..44d4aad947d3 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -1430,7 +1430,7 @@ lib.makeScope newScope (self: with self; {
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutil = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xorgproto }: stdenv.mkDerivation {
+  xcbutil = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-0.4.0";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1438,12 +1438,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "1sahmrgbpyki4bb72hxym0zvxwnycmswsxiisgqlln9vrdlr9r26";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilcursor = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xcbutilimage, xcbutilrenderutil, xorgproto }: stdenv.mkDerivation {
+  xcbutilcursor = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xcbutilimage, xcbutilrenderutil, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-cursor-0.1.3";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1451,12 +1451,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "0krr4rcw6r42cncinzvzzdqnmxk3nrgpnadyg2h8k9x10q3hm885";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xcbutilimage xcbutilrenderutil xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xcbutilimage xcbutilrenderutil xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilerrors = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xcbproto, xorgproto }: stdenv.mkDerivation {
+  xcbutilerrors = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xcbproto, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-errors-1.0";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1464,12 +1464,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "158rm913dg3hxrrhyvvxr8bcm0pjy5jws70dhy2s12w1krv829k8";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xcbproto xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xcbproto xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilimage = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xcbutil, xorgproto }: stdenv.mkDerivation {
+  xcbutilimage = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xcbutil, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-image-0.4.0";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1477,12 +1477,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "1z1gxacg7q4cw6jrd26gvi5y04npsyavblcdad1xccc8swvnmf9d";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xcbutil xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xcbutil xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilkeysyms = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xorgproto }: stdenv.mkDerivation {
+  xcbutilkeysyms = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-keysyms-0.4.0";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1490,12 +1490,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "1nbd45pzc1wm6v5drr5338j4nicbgxa5hcakvsvm5pnyy47lky0f";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilrenderutil = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xorgproto }: stdenv.mkDerivation {
+  xcbutilrenderutil = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-renderutil-0.3.9";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1503,12 +1503,12 @@ lib.makeScope newScope (self: with self; {
       sha256 = "0nza1csdvvxbmk8vgv8vpmq7q8h05xrw3cfx9lwxd1hjzd47xsf6";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
-  xcbutilwm = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, m4, libxcb, xorgproto }: stdenv.mkDerivation {
+  xcbutilwm = callPackage ({ stdenv, pkgconfig, fetchurl, gperf, libxcb, xorgproto, m4 }: stdenv.mkDerivation {
     name = "xcb-util-wm-0.4.1";
     builder = ./builder.sh;
     src = fetchurl {
@@ -1516,8 +1516,8 @@ lib.makeScope newScope (self: with self; {
       sha256 = "0gra7hfyxajic4mjd63cpqvd20si53j1q3rbdlkqkahfciwq3gr8";
     };
     hardeningDisable = [ "bindnow" "relro" ];
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [ gperf m4 libxcb xorgproto ];
+    nativeBuildInputs = [ pkgconfig m4 ];
+    buildInputs = [ gperf libxcb xorgproto ];
     meta.platforms = stdenv.lib.platforms.unix;
   }) {};
 
diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
index bb0d1b595517..2c4d4fb3a5ab 100755
--- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
+++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
@@ -229,7 +229,8 @@ while (<>) {
 
     push @nativeRequires, "gettext" if $file =~ /USE_GETTEXT/;
     push @requires, "libxslt" if $pkg =~ /libxcb/;
-    push @requires, "gperf", "m4", "xorgproto" if $pkg =~ /xcbutil/;
+    push @nativeRequires, "m4" if $pkg =~ /xcbutil/;
+    push @requires, "gperf", "xorgproto" if $pkg =~ /xcbutil/;
 
     print "REQUIRES $pkg => @requires\n";
     print "NATIVE_REQUIRES $pkg => @nativeRequires\n";
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index 068130f9c768..8a1eef6ac1d3 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -198,6 +198,9 @@ self: super:
   libXi = super.libXi.overrideAttrs (attrs: {
     outputs = [ "out" "dev" "man" "doc" ];
     propagatedBuildInputs = [ self.libXfixes ];
+    configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+      "xorg_cv_malloc0_returns_null=no"
+    ];
   });
 
   libXinerama = super.libXinerama.overrideAttrs (attrs: {
diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix
index ebb9db8670e3..47906389d58b 100644
--- a/pkgs/tools/filesystems/btrfs-progs/default.nix
+++ b/pkgs/tools/filesystems/btrfs-progs/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, fetchpatch, pkgconfig, attr, acl, zlib, libuuid, e2fsprogs, lzo
-, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd, python3, python3Packages
+, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, libxslt, zstd, python3
 }:
 
 stdenv.mkDerivation rec {
@@ -12,10 +12,17 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [
-    pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt python3 python3Packages.setuptools
+    pkgconfig asciidoc xmlto docbook_xml_dtd_45 docbook_xsl libxslt
+    python3 python3.pkgs.setuptools
   ];
 
-  buildInputs = [ attr acl zlib libuuid e2fsprogs lzo zstd ];
+  buildInputs = [ attr acl zlib libuuid e2fsprogs lzo zstd python3 ];
+
+  # for python cross-compiling
+  _PYTHON_HOST_PLATFORM = stdenv.hostPlatform.config;
+  postConfigure = ''
+    export LDSHARED="$LD -shared"
+  '';
 
   # gcc bug with -O1 on ARM with gcc 4.8
   # This should be fine on all platforms so apply universally
diff --git a/pkgs/tools/networking/jnettop/default.nix b/pkgs/tools/networking/jnettop/default.nix
index 19626174ba4c..47aeb8574b68 100644
--- a/pkgs/tools/networking/jnettop/default.nix
+++ b/pkgs/tools/networking/jnettop/default.nix
@@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1855np7c4b0bqzhf1l1dyzxb90fpnvrirdisajhci5am6als31z9";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf libpcap ncurses glib ];
+  nativeBuildInputs = [ pkgconfig autoconf ];
+  buildInputs = [ libpcap ncurses glib ];
 
   patches = [
     ./no-dns-resolution.patch
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 85234a8350e9..a558abdf15e5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10489,12 +10489,10 @@ in
   gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { };
 
   gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer {
-    callPackage = pkgs.newScope (pkgs // { libav = pkgs.ffmpeg; });
+    callPackage = newScope { libav = pkgs.ffmpeg; };
   });
 
-  gstreamer = callPackage ../development/libraries/gstreamer/legacy/gstreamer {
-    bison = bison2;
-  };
+  gstreamer = callPackage ../development/libraries/gstreamer/legacy/gstreamer { };
 
   gst-plugins-base = callPackage ../development/libraries/gstreamer/legacy/gst-plugins-base {
     inherit (darwin.apple_sdk.frameworks) ApplicationServices;