depot/third_party/nixpkgs/pkgs/development/libraries/tinyobjloader/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

33 lines
886 B
Nix

{ lib, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "tinyobjloader";
version = "1.0.7";
src = fetchFromGitHub {
owner = "tinyobjloader";
repo = "tinyobjloader";
rev = "v${version}";
sha256 = "sha256-BNffbicnLTGK2GQ2/bB328LFU9fqHxrpAVj2hJaekWc=";
};
nativeBuildInputs = [ cmake ];
# https://github.com/tinyobjloader/tinyobjloader/issues/336
postPatch = ''
substituteInPlace tinyobjloader.pc.in \
--replace '$'{prefix}/@TINYOBJLOADER_LIBRARY_DIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@TINYOBJLOADER_INCLUDE_DIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
'';
meta = with lib; {
homepage = "https://github.com/tinyobjloader/tinyobjloader";
description = "Tiny but powerful single file wavefront obj loader";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.all;
};
}