git.iko.soy/typeable/nixpkgs
on master help sign in
flann: make it build on Darwin (close #6946)
commitf7e4be5011795dab79b1c0f6cb5d3eebaed16b8b authorLuis G. Torres <lgtorres42@gmail.com> dateMon 23 Mar 2015, 08:36 (12 years ago) parent60c1235
2 files changed+15−2
pkgs/development/libraries/flann/default.nix+5−2 pkgs/development/libraries/flann/no-examples.patch+10
pkgs/development/libraries/flann/default.nix+5−2
@@ -2,7 +2,7 @@
22
33stdenv.mkDerivation {
44 name = "flann-1.8.4";
5−
5+
66 src = fetchurl {
77 url = http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.8.4-src.zip;
88 sha256 = "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz";
@@ -10,11 +10,14 @@ stdenv.mkDerivation {
1010
1111 buildInputs = [ unzip cmake python ];
1212
13+ # patch out examples in Darwin because they do not compile.
14+ patches = stdenv.lib.optionals stdenv.isDarwin [ ./no-examples.patch ];
15+
1316 meta = {
1417 homepage = http://people.cs.ubc.ca/~mariusm/flann/;
1518 license = stdenv.lib.licenses.bsd3;
1619 description = "Fast approximate nearest neighbor searches in high dimensional spaces";
1720 maintainers = with stdenv.lib.maintainers; [viric];
18− platforms = with stdenv.lib.platforms; linux;
21+ platforms = with stdenv.lib.platforms; linux ++ darwin;
1922 };
2023}
pkgs/development/libraries/flann/no-examples.patchnew file+10
@@ -0,0 +1,10 @@
1+--- a/CMakeLists.txt
2++++ b/CMakeLists.txt
3+@@ -155,7 +155,7 @@
4+
5+ add_subdirectory( cmake )
6+ add_subdirectory( src )
7+-add_subdirectory( examples )
8++#add_subdirectory( examples )
9+ add_subdirectory( test )
10+ add_subdirectory( doc )