Commit b1460e25 authored by Andrew Marshall's avatar Andrew Marshall
Browse files

openpgl: init at 0.5.0

Setting TBB_ROOT to the out path is necessary as otherwise the bundled
FindTBB.cmake tries to search the `tbb.dev` output for the library
files.

Note that embree and nanoflann are bundled within the source. The build
system is not currently setup to use non-vendored libs.

Rebuilt 25 times to test reproducibility.

Attempted a build on x86_64-darwin, and it failed, so marking this as
linux only.
parent a45ba81d
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
{ lib
, cmake
, fetchFromGitHub
, ninja
, stdenv
, tbb
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "openpgl";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "OpenPathGuidingLibrary";
    repo = finalAttrs.pname;
    rev = "v${finalAttrs.version}";
    hash = "sha256-dbHmGGiHQkU0KPpQYpY/o0uCWdb3L5namETdOcOREgs=";
  };

  nativeBuildInputs = [
    cmake
    ninja
  ];

  buildInputs = [
    tbb
  ];

  cmakeFlags = [
    "-DOPENPGL_BUILD_STATIC=OFF"
    "-DTBB_ROOT=${tbb.out}"
  ];

  meta = {
    description = "Intel Open Path Guiding Library";
    homepage = "https://github.com/OpenPathGuidingLibrary/openpgl";
    platforms = lib.platforms.linux;
    maintainers = [ lib.maintainers.amarshall ];
    license = lib.licenses.asl20;
  };
})