git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #68889 from nspin/pr/various-cross-2

Various cross-compilation fixes

commit1bc7fae62d711ea7e7cfd833437faf6aecb6915c authorMatthew Bauer <mjbauer95@gmail.com> dateTue 17 Sep 2019, 19:35 (7 years ago) parent9566ec035f39ac
5 files changed+51−11
pkgs/development/compilers/dtc/default.nix+7−4 pkgs/os-specific/linux/udisks/2-default.nix+2−2 pkgs/tools/security/gnupg/22.nix+2−2 pkgs/tools/security/pinentry/autoconf-ar.patch+35 pkgs/tools/security/pinentry/default.nix+5−3
pkgs/development/compilers/dtc/default.nix+7−4
@@ -1,4 +1,6 @@
1−{ stdenv, fetchgit, flex, bison, pkgconfig, python2, swig, which }:
1+{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
2+, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform, python2, swig
3+}:
24
35stdenv.mkDerivation rec {
46 pname = "dtc";
@@ -10,16 +12,17 @@ stdenv.mkDerivation rec {
1012 sha256 = "1jhhfrg22h53lvm2lqhd66pyk20pil08ry03wcwyx1c3ln27k73z";
1113 };
1214
13− nativeBuildInputs = [ flex bison pkgconfig swig which ];
14− buildInputs = [ python2 ];
15+ nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python2 swig ];
16+ buildInputs = lib.optionals pythonSupport [ python2 ];
1517
1618 postPatch = ''
1719 patchShebangs pylibfdt/
1820 '';
1921
22+ makeFlags = lib.optionals (!pythonSupport) [ "NO_PYTHON=1" ];
2023 installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
2124
22− meta = with stdenv.lib; {
25+ meta = with lib; {
2326 description = "Device Tree Compiler";
2427 homepage = https://git.kernel.org/cgit/utils/dtc/dtc.git;
2528 license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
pkgs/os-specific/linux/udisks/2-default.nix+2−2
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
1616 sha256 = "01wx2x8xyal595dhdih7rva2bz7gqzgwdp56gi0ikjdzayx17wcf";
1717 };
1818
19− outputs = [ "out" "man" "dev" "devdoc" ];
19+ outputs = [ "out" "man" "dev" ] ++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
2020
2121 patches = [
2222 (substituteAll {
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
5757 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
5858
5959 configureFlags = [
60− "--enable-gtk-doc"
60+ (stdenv.lib.enableFeature (stdenv.buildPlatform == stdenv.hostPlatform) "gtk-doc")
6161 "--localstatedir=/var"
6262 "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
6363 "--with-udevdir=$(out)/lib/udev"
pkgs/tools/security/gnupg/22.nix+2−2
@@ -24,9 +24,9 @@ stdenv.mkDerivation rec {
2424 };
2525
2626 depsBuildBuild = [ buildPackages.stdenv.cc ];
27− nativeBuildInputs = [ pkgconfig ];
27+ nativeBuildInputs = [ pkgconfig texinfo ];
2828 buildInputs = [
29− libgcrypt libassuan libksba libiconv npth gettext texinfo
29+ libgcrypt libassuan libksba libiconv npth gettext
3030 readline libusb gnutls adns openldap zlib bzip2 sqlite
3131 ];
3232
pkgs/tools/security/pinentry/autoconf-ar.patchnew file+35
@@ -0,0 +1,35 @@
1+diff -ur a/configure.ac b/configure.ac
2+--- a/configure.ac 2019-09-14 11:30:11.584847746 +0000
3++++ b/configure.ac 2019-09-14 11:31:26.692355265 +0000
4+@@ -81,6 +81,7 @@
5+ AC_PROG_CPP
6+ AC_PROG_INSTALL
7+ AC_PROG_RANLIB
8++AC_CHECK_TOOL(AR, ar)
9+ # We need to check for cplusplus here because we may not do the test
10+ # for Qt and autoconf does does not allow that.
11+ AC_PROG_CXX
12+diff -ur a/pinentry/Makefile.in b/pinentry/Makefile.in
13+--- a/pinentry/Makefile.in 2017-12-03 17:43:23.000000000 +0000
14++++ b/pinentry/Makefile.in 2019-09-14 11:32:02.532000236 +0000
15+@@ -113,7 +113,7 @@
16+ CONFIG_CLEAN_FILES =
17+ CONFIG_CLEAN_VPATH_FILES =
18+ LIBRARIES = $(noinst_LIBRARIES)
19+-AR = ar
20++AR = @AR@
21+ ARFLAGS = cru
22+ AM_V_AR = $(am__v_AR_@AM_V@)
23+ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
24+diff -ur a/secmem/Makefile.in b/secmem/Makefile.in
25+--- a/secmem/Makefile.in 2017-12-03 17:43:23.000000000 +0000
26++++ b/secmem/Makefile.in 2019-09-14 11:31:58.764934552 +0000
27+@@ -113,7 +113,7 @@
28+ CONFIG_CLEAN_FILES =
29+ CONFIG_CLEAN_VPATH_FILES =
30+ LIBRARIES = $(noinst_LIBRARIES)
31+-AR = ar
32++AR = @AR@
33+ ARFLAGS = cru
34+ AM_V_AR = $(am__v_AR_@AM_V@)
35+ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
pkgs/tools/security/pinentry/default.nix+5−3
@@ -1,4 +1,4 @@
1−{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
1+{ fetchurl, fetchpatch, stdenv, lib, pkgconfig, autoreconfHook
22, libgpgerror, libassuan
33, libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null
44, qt4 ? null, qt5 ? null
@@ -23,7 +23,7 @@ mkDerivation rec {
2323 sha256 = "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8";
2424 };
2525
26− nativeBuildInputs = [ pkgconfig ];
26+ nativeBuildInputs = [ pkgconfig autoreconfHook ];
2727 buildInputs =
2828 [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt4 ]
2929 ++ stdenv.lib.optional (qt5 != null) qt5.qtbase;
@@ -32,7 +32,9 @@ mkDerivation rec {
3232 substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
3333 '';
3434
35− patches = lib.optionals (gtk2 != null) [
35+ patches = [
36+ ./autoconf-ar.patch
37+ ] ++ lib.optionals (gtk2 != null) [
3638 (fetchpatch {
3739 url = "https://salsa.debian.org/debian/pinentry/raw/debian/1.1.0-1/debian/patches/"
3840 + "0007-gtk2-When-X11-input-grabbing-fails-try-again-over-0..patch";