diff options
author | Jan Solanti <jhs@psonet.com> | 2022-03-23 02:42:12 +0200 |
---|---|---|
committer | Jan Solanti <jhs@psonet.com> | 2022-03-23 12:22:40 +0200 |
commit | a8cff2064948d6c474fa4a5a6c06b2ccc3362463 (patch) | |
tree | 8d4eec95905cd84d52b246fa036ef37750d0fc5f /pkgs/development/libraries/draco | |
parent | 781ea695cfccde24d71d4076765efed4c55ac846 (diff) |
draco: 1.5.0 -> 1.5.2
Diffstat (limited to 'pkgs/development/libraries/draco')
-rw-r--r-- | pkgs/development/libraries/draco/default.nix | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index ecbd125212632..d35e9a229a56e 100644 --- a/pkgs/development/libraries/draco/default.nix +++ b/pkgs/development/libraries/draco/default.nix @@ -1,35 +1,52 @@ { lib , stdenv , fetchFromGitHub +, nix-update-script , cmake , python3 +, gtest , withAnimation ? true , withTranscoder ? true +, eigen +, ghc_filesystem +, tinygltf }: let cmakeBool = b: if b then "ON" else "OFF"; in stdenv.mkDerivation rec { - version = "1.5.0"; + version = "1.5.2"; pname = "draco"; src = fetchFromGitHub { owner = "google"; repo = "draco"; rev = version; - hash = "sha256-BoJg2lZBPVVm6Nc0XK8QSISpe+B8tpgRg9PFncN4+fY="; + sha256 = "sha256-o6KQJFrnxx2kz6g3vXk1w435OmaJhAJjzsKM/gmVJ2M="; fetchSubmodules = true; }; + buildInputs = [ gtest ] + ++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ]; + nativeBuildInputs = [ cmake python3 ]; cmakeFlags = [ "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}" - "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}" + "-DDRACO_GOOGLETEST_PATH=${gtest}" "-DBUILD_SHARED_LIBS=${cmakeBool true}" + "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}" + ] ++ lib.optionals withTranscoder [ + "-DDRACO_EIGEN_PATH=${eigen}/include/eigen3" + "-DDRACO_FILESYSTEM_PATH=${ghc_filesystem}" + "-DDRACO_TINYGLTF_PATH=${tinygltf}" ]; + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + meta = with lib; { description = "Library for compressing and decompressing 3D geometric meshes and point clouds"; homepage = "https://google.github.io/draco/"; |