nixpkgs/pkgs/development/libraries/draco/default.nix

41 lines
926 B
Nix
Raw Normal View History

2021-12-10 01:05:06 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, python3
, withAnimation ? true
, withTranscoder ? true
2020-05-12 16:41:38 +00:00
}:
2021-12-10 01:05:06 +00:00
let
cmakeBool = b: if b then "ON" else "OFF";
in
2020-05-12 16:41:38 +00:00
stdenv.mkDerivation rec {
2021-12-10 01:05:06 +00:00
version = "1.5.0";
2020-05-12 16:41:38 +00:00
pname = "draco";
src = fetchFromGitHub {
owner = "google";
repo = "draco";
rev = version;
2021-12-10 01:05:06 +00:00
hash = "sha256-BoJg2lZBPVVm6Nc0XK8QSISpe+B8tpgRg9PFncN4+fY=";
fetchSubmodules = true;
2020-05-12 16:41:38 +00:00
};
2021-12-10 01:05:06 +00:00
nativeBuildInputs = [ cmake python3 ];
2020-05-12 16:41:38 +00:00
cmakeFlags = [
2021-12-10 01:05:06 +00:00
"-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
"-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}"
"-DBUILD_SHARED_LIBS=${cmakeBool true}"
2020-05-12 16:41:38 +00:00
];
meta = with lib; {
2020-05-12 16:41:38 +00:00
description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
homepage = "https://google.github.io/draco/";
license = licenses.asl20;
maintainers = with maintainers; [ jansol ];
platforms = platforms.all;
};
}