diff options
author | Bobby Rong <rjl931189261@126.com> | 2021-12-17 19:08:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 19:08:34 +0800 |
commit | af4e86ffbbda22d478d2a83c7efb49abf1c976b3 (patch) | |
tree | a1dc4f622133ab22ad234dedfee3134aa42a447d /pkgs | |
parent | f578899c9e4e50772f79bbfbab191330be0d3f45 (diff) | |
parent | 6db7c7519ccbe017d63703deca7f1ae824762b8a (diff) |
Merge pull request #149952 from jansol/draco
draco: 1.4.3 -> 1.5.0
Diffstat (limited to 'pkgs')
-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/"; |