<commit_before>{ lib
, stdenv
, fetchFromGitHub
, wrapQtAppsHook
, cmake
, qhull
, flann
, boost
, vtk
, eigen
, pkg-config
, qtbase
, libusb1
, libpcap
, libXt
, libpng
, Cocoa
, AGL
, OpenGL
}:

stdenv.mkDerivation rec {
  pname = "pcl";
  version = "1.11.1";

  src = fetchFromGitHub {
    owner = "PointCloudLibrary";
    repo = "pcl";
    rev = "${pname}-${version}";
    sha256 = "1cli2rxqsk6nxp36p5mgvvahjz8hm4fb68yi8cf9nw4ygbcvcwb1";
  };

  nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
  buildInputs = [
    qhull
    flann
    boost
    eigen
    libusb1
    libpcap
    libpng
    vtk<commit_msg>pcl: fix convex hull support<commit_after>{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, wrapQtAppsHook
, cmake
, qhull
, flann
, boost
, vtk
, eigen
, pkg-config
, qtbase
, libusb1
, libpcap
, libXt
, libpng
, Cocoa
, AGL
, OpenGL
}:

stdenv.mkDerivation rec {
  pname = "pcl";
  version = "1.11.1";

  src = fetchFromGitHub {
    owner = "PointCloudLibrary";
    repo = "pcl";
    rev = "${pname}-${version}";
    sha256 = "1cli2rxqsk6nxp36p5mgvvahjz8hm4fb68yi8cf9nw4ygbcvcwb1";
  };

  patches = [
    # Support newer QHull versions (2020.2)
    # Backport of https://github.com/PointCloudLibrary/pcl/pull/4540
    (fetchpatch {
      url = "https://raw.githubusercontent.com/conda-forge/pcl-feedstock/0b1eff402994a3fb891b44659c261e7e85c8d915/recipe/4540.patch";
      sha256 = "0hhvw6ajigzrarn95aicni73zd3sdgnb8rc3wgjrrg19xs84z138";
    })
  ];

  nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
  buildInputs = [
    qhull
    flann
    boost
    eigen
    libusb1
    libpcap
    libpng
    vtk
{'fraction_non_alphanumeric': 0.1141804788213628, 'fraction_numerical': 0.06445672191528545, 'mean_word_length': 3.2337662337662336, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2355460', 'n_tokens_mistral': 749, 'n_tokens_neox': 691, 'n_words': 116}