9 , withTranscoder ? true
16 cmakeBool = b: if b then "ON" else "OFF";
18 stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
26 sha256 = "sha256-WYWEUfBPz/Pt7sE8snG3/LnOA3DEUm/SUVLtsH7zG5g=";
27 fetchSubmodules = true;
30 buildInputs = [ gtest ]
31 ++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ];
33 nativeBuildInputs = [ cmake python3 ];
36 "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
37 "-DDRACO_GOOGLETEST_PATH=${gtest}"
38 "-DBUILD_SHARED_LIBS=${cmakeBool true}"
39 "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}"
40 ] ++ lib.optionals withTranscoder [
41 "-DDRACO_EIGEN_PATH=${eigen}/include/eigen3"
42 "-DDRACO_FILESYSTEM_PATH=${ghc_filesystem}"
43 "-DDRACO_TINYGLTF_PATH=${tinygltf}"
46 passthru.updateScript = nix-update-script {
51 description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
52 homepage = "https://google.github.io/draco/";
53 changelog = "https://github.com/google/draco/releases/tag/${version}";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ jansol ];
56 platforms = platforms.all;