10 basis_universal = fetchFromGitHub {
12 repo = "basis_universal";
13 rev = "8903f6d69849fd782b72a551a4dd04a264434e20";
14 hash = "sha256-o3dCxAAkpMoNkvkM7qD75cPn/obDc/fJ8u7KLPm1G6g=";
17 stdenv.mkDerivation rec {
18 pname = "meshoptimizer";
20 src = fetchFromGitHub {
22 repo = "meshoptimizer";
24 hash = "sha256-/47CfgPtj+e4iz01+rwahP+jCXPXXZhTeLLiLktrJ6g=";
27 nativeBuildInputs = [ cmake ];
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 { };
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; [
50 platforms = platforms.all;
51 mainProgram = "gltfpack";