mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-14 17:04:42 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
cmake,
|
|
python3,
|
|
gtest,
|
|
withAnimation ? true,
|
|
withTranscoder ? true,
|
|
eigen,
|
|
ghc_filesystem,
|
|
tinygltf,
|
|
}:
|
|
|
|
let
|
|
cmakeBool = b: if b then "ON" else "OFF";
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
version = "1.5.7";
|
|
pname = "draco";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "draco";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-p0Mn4kGeBBKL7Hoz4IBgb6Go6MdkgE7WZgxAnt1tE/0=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
# ld: unknown option: --start-group
|
|
postPatch = ''
|
|
substituteInPlace cmake/draco_targets.cmake \
|
|
--replace "^Clang" "^AppleClang"
|
|
'';
|
|
|
|
buildInputs =
|
|
[ gtest ]
|
|
++ lib.optionals withTranscoder [
|
|
eigen
|
|
ghc_filesystem
|
|
tinygltf
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
python3
|
|
];
|
|
|
|
cmakeFlags =
|
|
[
|
|
"-DDRACO_ANIMATION_ENCODING=${cmakeBool withAnimation}"
|
|
"-DDRACO_GOOGLETEST_PATH=${gtest}"
|
|
"-DBUILD_SHARED_LIBS=${cmakeBool true}"
|
|
"-DDRACO_TRANSCODER_SUPPORTED=${cmakeBool withTranscoder}"
|
|
]
|
|
++ lib.optionals withTranscoder [
|
|
"-DDRACO_EIGEN_PATH=${eigen}/include/eigen3"
|
|
"-DDRACO_FILESYSTEM_PATH=${ghc_filesystem}"
|
|
"-DDRACO_TINYGLTF_PATH=${tinygltf}"
|
|
];
|
|
|
|
CXXFLAGS = [
|
|
# error: expected ')' before 'value' in 'explicit GltfValue(uint8_t value)'
|
|
"-include cstdint"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
description = "Library for compressing and decompressing 3D geometric meshes and point clouds";
|
|
homepage = "https://google.github.io/draco/";
|
|
changelog = "https://github.com/google/draco/releases/tag/${finalAttrs.version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ jansol ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|