summary refs log tree commit diff
path: root/pkgs/development/libraries/flann
diff options
context:
space:
mode:
authorLuis G. Torres <lgtorres42@gmail.com>2015-03-23 08:36:24 -0400
committerVladimír Čunát <vcunat@gmail.com>2015-03-24 20:48:10 +0100
commitf7e4be5011795dab79b1c0f6cb5d3eebaed16b8b (patch)
treef980b7bc94f610845bf16b13d67eab78b0e80844 /pkgs/development/libraries/flann
parent60c123560e89600d1b728690ba8a4009f8bb0416 (diff)
downloadnixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar.gz
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar.bz2
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar.lz
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar.xz
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.tar.zst
nixpkgs-f7e4be5011795dab79b1c0f6cb5d3eebaed16b8b.zip
flann: make it build on Darwin (close #6946)
Diffstat (limited to 'pkgs/development/libraries/flann')
-rw-r--r--pkgs/development/libraries/flann/default.nix7
-rw-r--r--pkgs/development/libraries/flann/no-examples.patch10
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/development/libraries/flann/default.nix b/pkgs/development/libraries/flann/default.nix
index bffb124dc68..145d2b42a9d 100644
--- a/pkgs/development/libraries/flann/default.nix
+++ b/pkgs/development/libraries/flann/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation {
   name = "flann-1.8.4";
-  
+
   src = fetchurl {
     url = http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip;
     sha256 = "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz";
@@ -10,11 +10,14 @@ stdenv.mkDerivation {
 
   buildInputs = [ unzip cmake python ];
 
+  # patch out examples in Darwin because they do not compile.
+  patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-examples.patch ];
+
   meta = {
     homepage = http://people.cs.ubc.ca/~mariusm/flann/;
     license = stdenv.lib.licenses.bsd3;
     description = "Fast approximate nearest neighbor searches in high dimensional spaces";
     maintainers = with stdenv.lib.maintainers; [viric];
-    platforms = with stdenv.lib.platforms; linux;
+    platforms = with stdenv.lib.platforms; linux ++ darwin;
   };
 }
diff --git a/pkgs/development/libraries/flann/no-examples.patch b/pkgs/development/libraries/flann/no-examples.patch
new file mode 100644
index 00000000000..95a6f0eed8e
--- /dev/null
+++ b/pkgs/development/libraries/flann/no-examples.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt	
++++ b/CMakeLists.txt	
+@@ -155,7 +155,7 @@
+
+ add_subdirectory( cmake )
+ add_subdirectory( src )
+-add_subdirectory( examples )
++#add_subdirectory( examples )
+ add_subdirectory( test )
+ add_subdirectory( doc )