nixpkgs/pkgs/development/libraries/openvdb/default.nix
Andrew Marshall 1c2c7e4b76 openvdb: fix incorrect license
Since v12.0.0, OpenVDB is licensed under ASL 2.0; see
https://www.openvdb.org/documentation/doxygen/changes.html#v12_0_0_changes

Missing change from 633b86fab6.
2024-11-06 10:40:06 -05:00

43 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, boost, jemalloc, c-blosc, tbb, zlib }:
stdenv.mkDerivation rec
{
pname = "openvdb";
version = "12.0.0";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "openvdb";
rev = "v${version}";
sha256 = "sha256-S2uvzDCrTxAmvUMJr5PChcYTqhIHvRZbOfQLtUvzypI=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ boost tbb jemalloc c-blosc zlib ];
cmakeFlags = [ "-DOPENVDB_CORE_STATIC=OFF" "-DOPENVDB_BUILD_NANOVDB=ON"];
# error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer
env = lib.optionalAttrs (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") {
NIX_CFLAGS_COMPILE = "-faligned-allocation";
};
postFixup = ''
substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \
--replace \''${OPENVDB_LIBRARYDIR} $out/lib \
--replace \''${OPENVDB_INCLUDEDIR} $dev/include
'';
meta = with lib; {
description = "Open framework for voxel";
mainProgram = "vdb_print";
homepage = "https://www.openvdb.org";
maintainers = [ maintainers.guibou ];
platforms = platforms.unix;
license = licenses.asl20;
};
}