draco: 1.5.0 -> 1.5.2

This commit is contained in:
Jan Solanti 2022-03-23 02:42:12 +02:00
parent 781ea695cf
commit a8cff20649

View file

@ -1,35 +1,52 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, nix-update-script
, cmake , cmake
, python3 , python3
, gtest
, withAnimation ? true , withAnimation ? true
, withTranscoder ? true , withTranscoder ? true
, eigen
, ghc_filesystem
, tinygltf
}: }:
let let
cmakeBool = b: if b then "ON" else "OFF"; cmakeBool = b: if b then "ON" else "OFF";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.5.0"; version = "1.5.2";
pname = "draco"; pname = "draco";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "draco"; repo = "draco";
rev = version; rev = version;
hash = "sha256-BoJg2lZBPVVm6Nc0XK8QSISpe+B8tpgRg9PFncN4+fY="; sha256 = "sha256-o6KQJFrnxx2kz6g3vXk1w435OmaJhAJjzsKM/gmVJ2M=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
buildInputs = [ gtest ]
++ lib.optionals withTranscoder [ eigen ghc_filesystem tinygltf ];
nativeBuildInputs = [ cmake python3 ]; nativeBuildInputs = [ cmake python3 ];
cmakeFlags = [ cmakeFlags = [
"-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}" "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
"-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}" "-DDRACO_GOOGLETEST_PATH=${gtest}"
"-DBUILD_SHARED_LIBS=${cmakeBool true}" "-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; { meta = with lib; {
description = "Library for compressing and decompressing 3D geometric meshes and point clouds"; description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
homepage = "https://google.github.io/draco/"; homepage = "https://google.github.io/draco/";