python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / draco / default.nix
blob1d6a2b4da91c33884fdc3de7a66d797c70048b83
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , nix-update-script
5 , cmake
6 , python3
7 , gtest
8 , withAnimation ? true
9 , withTranscoder ? true
10 , eigen
11 , ghc_filesystem
12 , tinygltf
15 let
16   cmakeBool = b: if b then "ON" else "OFF";
18 stdenv.mkDerivation rec {
19   version = "1.5.5";
20   pname = "draco";
22   src = fetchFromGitHub {
23     owner = "google";
24     repo = "draco";
25     rev = version;
26     sha256 = "sha256-WYWEUfBPz/Pt7sE8snG3/LnOA3DEUm/SUVLtsH7zG5g=";
27     fetchSubmodules = true;
28   };
30   buildInputs = [ gtest ]
31     ++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ];
33   nativeBuildInputs = [ cmake python3 ];
35   cmakeFlags = [
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}"
44   ];
46   passthru.updateScript = nix-update-script {
47     attrPath = pname;
48   };
50   meta = with lib; {
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;
57   };