about summary refs log tree commit diff
path: root/pkgs/tools/security/pinentry
diff options
context:
space:
mode:
authorNick Spinale <nick@nickspinale.com>2019-09-14 11:46:39 +0000
committerNick Spinale <nick@nickspinale.com>2019-09-16 10:48:24 +0000
commita6635fbc19f3d4d13256d11aa8fb14952b92826d (patch)
tree6d50eb4cda9073379de4a08e449364b2a76c29fd /pkgs/tools/security/pinentry
parent37e333af9a18814537b872745d9b1c580c1b1a9d (diff)
downloadnixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar.gz
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar.bz2
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar.lz
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar.xz
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.tar.zst
nixlib-a6635fbc19f3d4d13256d11aa8fb14952b92826d.zip
pinentry: fix cross-compilation
Diffstat (limited to 'pkgs/tools/security/pinentry')
-rw-r--r--pkgs/tools/security/pinentry/autoconf-ar.patch35
-rw-r--r--pkgs/tools/security/pinentry/default.nix8
2 files changed, 40 insertions, 3 deletions
diff --git a/pkgs/tools/security/pinentry/autoconf-ar.patch b/pkgs/tools/security/pinentry/autoconf-ar.patch
new file mode 100644
index 000000000000..6f531cfce325
--- /dev/null
+++ b/pkgs/tools/security/pinentry/autoconf-ar.patch
@@ -0,0 +1,35 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac	2019-09-14 11:30:11.584847746 +0000
++++ b/configure.ac	2019-09-14 11:31:26.692355265 +0000
+@@ -81,6 +81,7 @@
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AC_CHECK_TOOL(AR, ar)
+ # We need to check for cplusplus here because we may not do the test
+ # for Qt and autoconf does does not allow that.
+ AC_PROG_CXX
+diff -ur a/pinentry/Makefile.in b/pinentry/Makefile.in
+--- a/pinentry/Makefile.in	2017-12-03 17:43:23.000000000 +0000
++++ b/pinentry/Makefile.in	2019-09-14 11:32:02.532000236 +0000
+@@ -113,7 +113,7 @@
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ LIBRARIES = $(noinst_LIBRARIES)
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ AM_V_AR = $(am__v_AR_@AM_V@)
+ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+diff -ur a/secmem/Makefile.in b/secmem/Makefile.in
+--- a/secmem/Makefile.in	2017-12-03 17:43:23.000000000 +0000
++++ b/secmem/Makefile.in	2019-09-14 11:31:58.764934552 +0000
+@@ -113,7 +113,7 @@
+ CONFIG_CLEAN_FILES =
+ CONFIG_CLEAN_VPATH_FILES =
+ LIBRARIES = $(noinst_LIBRARIES)
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ AM_V_AR = $(am__v_AR_@AM_V@)
+ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix
index ac6a50960ad2..ec1425bbeb4a 100644
--- a/pkgs/tools/security/pinentry/default.nix
+++ b/pkgs/tools/security/pinentry/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, fetchpatch, stdenv, lib, pkgconfig
+{ fetchurl, fetchpatch, stdenv, lib, pkgconfig, autoreconfHook
 , libgpgerror, libassuan
 , libcap ? null, libsecret ? null, ncurses ? null, gtk2 ? null, gcr ? null
 , qt4 ? null, qt5 ? null
@@ -23,7 +23,7 @@ mkDerivation rec {
     sha256 = "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
   buildInputs =
     [ libgpgerror libassuan libcap libsecret gtk2 gcr ncurses qt4 ]
     ++ stdenv.lib.optional (qt5 != null) qt5.qtbase;
@@ -32,7 +32,9 @@ mkDerivation rec {
     substituteInPlace pinentry/pinentry-curses.c --replace ncursesw ncurses
   '';
 
-  patches = lib.optionals (gtk2 != null) [
+  patches = [
+    ./autoconf-ar.patch
+  ] ++ lib.optionals (gtk2 != null) [
     (fetchpatch {
       url = "https://salsa.debian.org/debian/pinentry/raw/debian/1.1.0-1/debian/patches/"
           + "0007-gtk2-When-X11-input-grabbing-fails-try-again-over-0..patch";