2020-11-06 00:33:48 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, check, validatePkgConfig, shared ? false }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pugixml";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zeux";
|
|
|
|
repo = "pugixml";
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-MAXm/9ANj6TjO1Skpg20RYt88bf6w1uPwRwOHXiXsWw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
outputs = [ "out" ] ++ lib.optionals shared [ "dev" ];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake validatePkgConfig ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_TESTS=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ check ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# Enable long long support (required for filezilla)
|
|
|
|
sed -ire '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp
|
|
|
|
'';
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Light-weight, simple and fast XML parser for C++ with XPath support";
|
|
|
|
homepage = "https://pugixml.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|