diff options
author | Jan Solanti <jhs@psonet.com> | 2021-12-10 03:05:06 +0200 |
---|---|---|
committer | Jan Solanti <jhs@psonet.com> | 2021-12-10 03:05:06 +0200 |
commit | 6db7c7519ccbe017d63703deca7f1ae824762b8a (patch) | |
tree | 1bdb1d0550ec6ad8ac2d741557435f57289c1759 | |
parent | 9fb7d91888fa24a7f96fd1915da2d4bc5e9b834e (diff) |
draco: 1.4.3 -> 1.5.0
-rw-r--r-- | pkgs/development/libraries/draco/default.nix | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index ed65be9a2561b..ecbd125212632 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/"; |