1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "tinyxml-2";
5 version = "9.0.0";
6
7 src = fetchFromGitHub {
8 repo = "tinyxml2";
9 owner = "leethomason";
10 rev = version;
11 sha256 = "sha256-AQQOctXi7sWIH/VOeSUClX6hlm1raEQUOp+VoPjLM14=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 cmakeFlags = [
17 # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
18 # (setting it to an absolute path causes include files to go to $out/$out/include,
19 # because the absolute path is interpreted with root at $out).
20 "-DCMAKE_INSTALL_INCLUDEDIR=include"
21 "-DCMAKE_INSTALL_LIBDIR=lib"
22 ];
23
24 meta = {
25 description = "A simple, small, efficient, C++ XML parser";
26 homepage = "https://www.grinninglizard.com/tinyxml2/index.html";
27 platforms = lib.platforms.unix;
28 license = lib.licenses.zlib;
29 };
30}