9 , withTranscoder ? true
16 cmakeBool = b: if b then "ON" else "OFF";
18 stdenv.mkDerivation (finalAttrs: {
22 src = fetchFromGitHub {
25 rev = finalAttrs.version;
26 hash = "sha256-p0Mn4kGeBBKL7Hoz4IBgb6Go6MdkgE7WZgxAnt1tE/0=";
27 fetchSubmodules = true;
30 # ld: unknown option: --start-group
32 substituteInPlace cmake/draco_targets.cmake \
33 --replace "^Clang" "^AppleClang"
36 buildInputs = [ gtest ]
37 ++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ];
39 nativeBuildInputs = [ cmake python3 ];
42 "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
43 "-DDRACO_GOOGLETEST_PATH=${gtest}"
44 "-DBUILD_SHARED_LIBS=${cmakeBool true}"
45 "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}"
46 ] ++ lib.optionals withTranscoder [
47 "-DDRACO_EIGEN_PATH=${eigen}/include/eigen3"
48 "-DDRACO_FILESYSTEM_PATH=${ghc_filesystem}"
49 "-DDRACO_TINYGLTF_PATH=${tinygltf}"
53 # error: expected ')' before 'value' in 'explicit GltfValue(uint8_t value)'
57 passthru.updateScript = nix-update-script { };
60 description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
61 homepage = "https://google.github.io/draco/";
62 changelog = "https://github.com/google/draco/releases/tag/${finalAttrs.version}";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ jansol ];
65 platforms = platforms.all;