summary refs log tree commit diff
path: root/pkgs/development/libraries/pugixml
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2016-11-21 12:39:12 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2016-11-21 12:39:12 -0600
commite1c1fa695a6794cd6003765ac1d34a00c5a47768 (patch)
tree305054656d5d1a4d80b4b0eb3e84a83703d300ed /pkgs/development/libraries/pugixml
parent8458d6b72094a9990e9d7a272465bc9f7f65cec0 (diff)
downloadnixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar.gz
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar.bz2
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar.lz
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar.xz
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.tar.zst
nixpkgs-e1c1fa695a6794cd6003765ac1d34a00c5a47768.zip
pugixml: fix darwin build
Diffstat (limited to 'pkgs/development/libraries/pugixml')
-rw-r--r--pkgs/development/libraries/pugixml/default.nix5
-rw-r--r--pkgs/development/libraries/pugixml/no-long-long.patch19
2 files changed, 23 insertions, 1 deletions
diff --git a/pkgs/development/libraries/pugixml/default.nix b/pkgs/development/libraries/pugixml/default.nix
index 6ce2d9e2ffe..ebb62459091 100644
--- a/pkgs/development/libraries/pugixml/default.nix
+++ b/pkgs/development/libraries/pugixml/default.nix
@@ -20,11 +20,14 @@ stdenv.mkDerivation rec {
     sed -ire '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' ../src/pugiconfig.hpp
   '';
 
+  patches = []
+    ++ stdenv.lib.optionals stdenv.isDarwin [ ./no-long-long.patch ];
+
   meta = with stdenv.lib; {
     description = "Light-weight, simple and fast XML parser for C++ with XPath support";
     homepage = http://pugixml.org/;
     license = licenses.mit;
     maintainers = with maintainers; [ pSub ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/pugixml/no-long-long.patch b/pkgs/development/libraries/pugixml/no-long-long.patch
new file mode 100644
index 00000000000..46c54e85a1d
--- /dev/null
+++ b/pkgs/development/libraries/pugixml/no-long-long.patch
@@ -0,0 +1,19 @@
+Get rid of long-long feature. This breaks on AppleClang compilers.
+---
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 40a7ab0..c84f0f7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,9 +26,9 @@ else()
+ endif()
+ 
+ # Enable C++11 long long for compilers that are capable of it
+-if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1)
+-	target_compile_features(pugixml PUBLIC cxx_long_long_type)
+-endif()
++# if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1)
++# 	target_compile_features(pugixml PUBLIC cxx_long_long_type)
++# endif()
+ 
+ set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1)
+