vscode-extensions.ms-dotnettools.csharp: 2.55.29 -> 2.61.28 (#376090)
[NixPkgs.git] / pkgs / by-name / me / meshoptimizer / package.nix
blobe50aa8eb854382ab3f43e204fad4de2a01869ccc
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   cmake,
6   nix-update-script,
7 }:
9 let
10   basis_universal = fetchFromGitHub {
11     owner = "zeux";
12     repo = "basis_universal";
13     rev = "8903f6d69849fd782b72a551a4dd04a264434e20";
14     hash = "sha256-o3dCxAAkpMoNkvkM7qD75cPn/obDc/fJ8u7KLPm1G6g=";
15   };
17 stdenv.mkDerivation rec {
18   pname = "meshoptimizer";
19   version = "0.22";
20   src = fetchFromGitHub {
21     owner = "zeux";
22     repo = "meshoptimizer";
23     rev = "v${version}";
24     hash = "sha256-/47CfgPtj+e4iz01+rwahP+jCXPXXZhTeLLiLktrJ6g=";
25   };
27   nativeBuildInputs = [ cmake ];
29   outputs = [
30     "bin"
31     "dev"
32     "out"
33   ];
35   cmakeFlags = [
36     "-DMESHOPT_BUILD_GLTFPACK=ON"
37     "-DMESHOPT_BASISU_PATH=${basis_universal}"
38   ] ++ lib.optional (!stdenv.hostPlatform.isStatic) "-DMESHOPT_BUILD_SHARED_LIBS:BOOL=ON";
40   passthru.updateScript = nix-update-script { };
42   meta = with lib; {
43     description = "Mesh optimization library that makes meshes smaller and faster to render";
44     homepage = "https://github.com/zeux/meshoptimizer";
45     license = licenses.mit;
46     maintainers = with maintainers; [
47       bouk
48       lillycham
49     ];
50     platforms = platforms.all;
51     mainProgram = "gltfpack";
52   };