Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "tinyobjloader"; 10 version = "1.0.7"; 11 12 src = fetchFromGitHub { 13 owner = "tinyobjloader"; 14 repo = "tinyobjloader"; 15 rev = "v${version}"; 16 sha256 = "sha256-BNffbicnLTGK2GQ2/bB328LFU9fqHxrpAVj2hJaekWc="; 17 }; 18 19 nativeBuildInputs = [ cmake ]; 20 21 # https://github.com/tinyobjloader/tinyobjloader/issues/336 22 postPatch = '' 23 substituteInPlace tinyobjloader.pc.in \ 24 --replace '$'{prefix}/@TINYOBJLOADER_LIBRARY_DIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \ 25 --replace '$'{prefix}/@TINYOBJLOADER_INCLUDE_DIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ 26 ''; 27 28 meta = with lib; { 29 homepage = "https://github.com/tinyobjloader/tinyobjloader"; 30 description = "Tiny but powerful single file wavefront obj loader"; 31 license = licenses.mit; 32 maintainers = [ ]; 33 platforms = platforms.all; 34 }; 35}