diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-06-25 16:59:57 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-06-25 19:09:56 -0300 |
commit | cbe6b9ecc9b76a39122980ba4fc3c6574e433219 (patch) | |
tree | ec5ae4152270a3e009aec2a9799e98580f5c1e34 | |
parent | 4b2582a5ba284020c59fb84248dcfd63f187ccd9 (diff) | |
download | nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar.gz nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar.bz2 nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar.lz nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar.xz nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.tar.zst nixpkgs-cbe6b9ecc9b76a39122980ba4fc3c6574e433219.zip |
nanoflann: refactor
Also add myself as maintainer.
-rw-r--r-- | pkgs/development/libraries/nanoflann/default.nix | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/pkgs/development/libraries/nanoflann/default.nix b/pkgs/development/libraries/nanoflann/default.nix index eeac0ab932a..1fa8a216e4d 100644 --- a/pkgs/development/libraries/nanoflann/default.nix +++ b/pkgs/development/libraries/nanoflann/default.nix @@ -1,20 +1,25 @@ -{lib, stdenv, fetchFromGitHub, cmake}: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, buildExamples ? false +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.5.0"; pname = "nanoflann"; src = fetchFromGitHub { owner = "jlblancoc"; repo = "nanoflann"; - rev = "v${version}"; - sha256 = "sha256-vPLL6l4sFRi7nvIfdMbBn/gvQ1+1lQHlZbR/2ok0Iw8="; + rev = "v${finalAttrs.version}"; + hash = "sha256-vPLL6l4sFRi7nvIfdMbBn/gvQ1+1lQHlZbR/2ok0Iw8="; }; nativeBuildInputs = [ cmake ]; cmakeFlags = [ - "-DBUILD_EXAMPLES=OFF" + "-DBUILD_EXAMPLES=${if buildExamples then "ON" else "OFF"}" ]; doCheck = true; @@ -22,8 +27,22 @@ stdenv.mkDerivation rec { meta = { homepage = "https://github.com/jlblancoc/nanoflann"; - license = lib.licenses.bsd2; 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; }; -} +}) |