From 6db7c7519ccbe017d63703deca7f1ae824762b8a Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Fri, 10 Dec 2021 03:05:06 +0200 Subject: [PATCH] draco: 1.4.3 -> 1.5.0 --- pkgs/development/libraries/draco/default.nix | 32 +++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index ed65be9a2561..ecbd12521263 100644 --- a/pkgs/development/libraries/draco/default.nix +++ b/pkgs/development/libraries/draco/default.nix @@ -1,33 +1,35 @@ -{ lib, stdenv, fetchFromGitHub, cmake +{ lib +, stdenv +, fetchFromGitHub +, cmake +, python3 +, withAnimation ? true +, withTranscoder ? true }: +let + cmakeBool = b: if b then "ON" else "OFF"; +in stdenv.mkDerivation rec { - version = "1.4.3"; + version = "1.5.0"; pname = "draco"; src = fetchFromGitHub { owner = "google"; repo = "draco"; rev = version; - sha256 = "sha256-eSu6tkWbRHzJkWwPgljaScAuL0gRkp8PJUHWC8mUvOw="; + hash = "sha256-BoJg2lZBPVVm6Nc0XK8QSISpe+B8tpgRg9PFncN4+fY="; + fetchSubmodules = true; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake python3 ]; cmakeFlags = [ - # Fake these since we are building from a tarball - "-Ddraco_git_hash=${version}" - "-Ddraco_git_desc=${version}" - - "-DBUILD_UNITY_PLUGIN=1" + "-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}" + "-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}" + "-DBUILD_SHARED_LIBS=${cmakeBool true}" ]; - # Upstream mistakenly installs to /nix/store/.../nix/store/.../*, work around that - postInstall = '' - mv $out/nix/store/*/* $out - rm -rf $out/nix - ''; - meta = with lib; { description = "Library for compressing and decompressing 3D geometric meshes and point clouds"; homepage = "https://google.github.io/draco/";