1 { stdenv, lib, fetchFromGitHub, cmake, check, validatePkgConfig, shared ? false }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-MAXm/9ANj6TjO1Skpg20RYt88bf6w1uPwRwOHXiXsWw=";
14 outputs = [ "out" ] ++ lib.optionals shared [ "dev" ];
16 nativeBuildInputs = [ cmake validatePkgConfig ];
20 "-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"}"
23 nativeCheckInputs = [ check ];
26 # Enable long long support (required for filezilla)
27 sed -ire '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp
31 description = "Light-weight, simple and fast XML parser for C++ with XPath support";
32 homepage = "https://pugixml.org";
33 license = licenses.mit;
34 maintainers = with maintainers; [ pSub ];
35 platforms = platforms.unix;