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

39 lines
928 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake
2020-05-12 18:41:38 +02:00
}:
stdenv.mkDerivation rec {
2021-10-30 02:16:27 +02:00
version = "1.4.3";
2020-05-12 18:41:38 +02:00
pname = "draco";
src = fetchFromGitHub {
owner = "google";
repo = "draco";
rev = version;
2021-10-30 02:16:27 +02:00
sha256 = "sha256-eSu6tkWbRHzJkWwPgljaScAuL0gRkp8PJUHWC8mUvOw=";
2020-05-12 18:41:38 +02:00
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# Fake these since we are building from a tarball
"-Ddraco_git_hash=${version}"
"-Ddraco_git_desc=${version}"
"-DBUILD_UNITY_PLUGIN=1"
];
2021-10-30 02:16:27 +02:00
# Upstream mistakenly installs to /nix/store/.../nix/store/.../*, work around that
postInstall = ''
mv $out/nix/store/*/* $out
rm -rf $out/nix
'';
meta = with lib; {
2020-05-12 18:41:38 +02: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;
};
}