2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv
|
2020-12-01 05:06:20 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tinyobjloader";
|
2021-08-21 23:52:32 +02:00
|
|
|
version = "1.0.7";
|
2020-12-01 05:06:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tinyobjloader";
|
|
|
|
repo = "tinyobjloader";
|
|
|
|
rev = "v${version}";
|
2021-08-21 23:52:32 +02:00
|
|
|
sha256 = "sha256-BNffbicnLTGK2GQ2/bB328LFU9fqHxrpAVj2hJaekWc=";
|
2020-12-01 05:06:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-05-18 22:58:14 +02:00
|
|
|
# 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@
|
|
|
|
'';
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-12-01 05:06:20 +01:00
|
|
|
homepage = "https://github.com/tinyobjloader/tinyobjloader";
|
|
|
|
description = "Tiny but powerful single file wavefront obj loader";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ivar ];
|
2021-03-10 11:58:01 +01:00
|
|
|
platforms = platforms.all;
|
2020-12-01 05:06:20 +01:00
|
|
|
};
|
|
|
|
}
|