summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-10 23:28:23 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-10 23:28:23 +0200
commitaa5220c7010290e93ccbd22ae67994028ef257d6 (patch)
tree49dc91c89a43f4d40eb41d3cc8b11efbf3bfa77d /pkgs/development
parent986f04c87efed848a27f5b571c15937acf12923b (diff)
downloadnixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar.gz
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar.bz2
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar.lz
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar.xz
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.tar.zst
nixpkgs-aa5220c7010290e93ccbd22ae67994028ef257d6.zip
gnutls: fix FreeBSD builds
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/gnutls/default.nix9
-rw-r--r--pkgs/development/libraries/gnutls/guile-gnulib-includes.patch19
2 files changed, 27 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix
index 06dc0c40b34..401433343da 100644
--- a/pkgs/development/libraries/gnutls/default.nix
+++ b/pkgs/development/libraries/gnutls/default.nix
@@ -3,7 +3,7 @@
 
 assert guileBindings -> guile != null;
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
 
   name = "gnutls-3.0.22";
 
@@ -54,3 +54,10 @@ stdenv.mkDerivation rec {
     maintainers = [ stdenv.lib.maintainers.ludo ];
   };
 }
+
+//
+
+(stdenv.lib.optionalAttrs stdenv.isFreeBSD {
+  # FreeBSD doesn't have <alloca.h>, and Gnulib's `alloca' module isn't used.
+  patches = [ ./guile-gnulib-includes.patch ];
+}))
diff --git a/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch b/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch
new file mode 100644
index 00000000000..3e7f46e7699
--- /dev/null
+++ b/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch
@@ -0,0 +1,19 @@
+commit 699ae6ef085c699dd5f3fb460b0f8a2408cc2860
+Author: Simon Josefsson <simon@josefsson.org>
+Date:   Thu Aug 9 15:24:11 2012 +0200
+
+    Add gnulib -I's to guile-snarf command.
+
+diff --git a/guile/src/Makefile.am b/guile/src/Makefile.am
+index 7b55500..f52eee9 100644
+--- a/guile/src/Makefile.am
++++ b/guile/src/Makefile.am
+@@ -95,7 +95,7 @@ priorities.i.c: $(srcdir)/make-session-priorities.scm
+ # `$(GUILE_CFLAGS)' may contain a series of `-I' switches so it must be
+ # included here, even though we'd really want `$(GUILE_CPPFLAGS)'.
+ snarfcppopts = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+-              $(CFLAGS) $(AM_CFLAGS) $(GUILE_CFLAGS)
++              $(CFLAGS) $(guile_gnutls_v_2_la_CFLAGS)
+ 
+ .c.x: $(BUILT_SOURCES)
+        $(guile_snarf) -o $@ $< $(snarfcppopts)