about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDan Peebles <pumpkin@me.com>2017-03-26 18:15:59 -0400
committerDan Peebles <pumpkin@me.com>2017-03-26 18:15:59 -0400
commit167aba003a6360347fb24aa05b761d05c924b0a9 (patch)
treefa3b96c1b9c6445ddc30d736401bd64d1738167a /pkgs
parenteab30996bd6a8ed2b74f49276146fab8c6d17597 (diff)
downloadnixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar.gz
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar.bz2
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar.lz
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar.xz
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.tar.zst
nixlib-167aba003a6360347fb24aa05b761d05c924b0a9.zip
capnproto: fix on clang 4
Embedding the patch because the way they build their source releases
changes the paths, so fetchpatch against GitHub doesn't apply cleanly
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/capnproto/clang4.patch22
-rw-r--r--pkgs/development/libraries/capnproto/default.nix5
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/libraries/capnproto/clang4.patch b/pkgs/development/libraries/capnproto/clang4.patch
new file mode 100644
index 000000000000..e83abe9f433a
--- /dev/null
+++ b/pkgs/development/libraries/capnproto/clang4.patch
@@ -0,0 +1,22 @@
+From 0f1fd1938b19dccdb5dbfe9cb5177c4342a2a5b5 Mon Sep 17 00:00:00 2001
+From: Eric Fiselier <eric@efcs.ca>
+Date: Thu, 29 Dec 2016 14:23:40 -0700
+Subject: [PATCH] Fix conversion build error when building with Clang 4.0
+
+---
+ c++/src/capnp/layout.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/c++/src/capnp/layout.h b/c++/src/capnp/layout.h
+index 850925a..b955f08 100644
+--- a/src/capnp/layout.h
++++ b/src/capnp/layout.h
+@@ -126,7 +126,7 @@template <> struct ElementSizeForType<Void> { static constexpr ElementSize value
+ template <> struct ElementSizeForType<bool> { static constexpr ElementSize value = ElementSize::BIT; };
+ 
+ // Lists and blobs are pointers, not structs.
+-template <typename T, bool b> struct ElementSizeForType<List<T, b>> {
++template <typename T, Kind K> struct ElementSizeForType<List<T, K>> {
+   static constexpr ElementSize value = ElementSize::POINTER;
+ };
+ template <> struct ElementSizeForType<Text> {
diff --git a/pkgs/development/libraries/capnproto/default.nix b/pkgs/development/libraries/capnproto/default.nix
index 839d48e488f0..0a5df88efdb9 100644
--- a/pkgs/development/libraries/capnproto/default.nix
+++ b/pkgs/development/libraries/capnproto/default.nix
@@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
     sha256 = "1yvaadhgakskqq5wpv53hd6fc3pp17mrdldw4i5cvgck4iwprcfd";
   };
 
+  patches = [
+    # Remove once they release a version above 0.5.3. See https://github.com/sandstorm-io/capnproto/issues/433
+    ./clang4.patch
+  ];
+
   meta = with stdenv.lib; {
     homepage    = "http://kentonv.github.io/capnproto";
     description = "Cap'n Proto cerealization protocol";