about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/draco/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/draco/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/draco/default.nix26
1 files changed, 17 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/draco/default.nix b/nixpkgs/pkgs/development/libraries/draco/default.nix
index 41ffdd16f5a9..ecbd12521263 100644
--- a/nixpkgs/pkgs/development/libraries/draco/default.nix
+++ b/nixpkgs/pkgs/development/libraries/draco/default.nix
@@ -1,25 +1,33 @@
-{ 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.1";
+  version = "1.5.0";
   pname = "draco";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "draco";
     rev = version;
-    sha256 = "14ln4la52x38pf8syr7i5v4vd65ya4zij8zj5kgihah03cih0qcd";
+    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}"
   ];
 
   meta = with lib; {