diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/nanoflann')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/nanoflann/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/nanoflann/default.nix b/nixpkgs/pkgs/development/libraries/nanoflann/default.nix new file mode 100644 index 000000000000..a9fb463e707a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/nanoflann/default.nix @@ -0,0 +1,48 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, buildExamples ? false +}: + +stdenv.mkDerivation (finalAttrs: { + version = "1.5.1"; + pname = "nanoflann"; + + src = fetchFromGitHub { + owner = "jlblancoc"; + repo = "nanoflann"; + rev = "v${finalAttrs.version}"; + hash = "sha256-ozFYqEq6PSe1C6Lc13Szxt8+sUTTlbXrmMgb8cvX04I="; + }; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ + "-DBUILD_EXAMPLES=${if buildExamples then "ON" else "OFF"}" + ]; + + doCheck = true; + checkTarget = "test"; + + meta = { + homepage = "https://github.com/jlblancoc/nanoflann"; + description = "Header only C++ library for approximate nearest neighbor search"; + longDescription = '' + nanoflann is a C++11 header-only library for building KD-Trees of datasets + with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and + 3D rotation groups). No support for approximate NN is provided. nanoflann + does not require compiling or installing. You just need to #include + <nanoflann.hpp> in your code. + + This library is a fork of the flann library by Marius Muja and David + G. Lowe, and born as a child project of MRPT. Following the original + license terms, nanoflann is distributed under the BSD license. Please, for + bugs use the issues button or fork and open a pull request. + ''; + changelog = "https://github.com/jlblancoc/nanoflann/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.bsd2; + maintainers = [ lib.maintainers.AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) |