pugixml: modernize

This commit is contained in:
Nikolay Korotkiy 2025-01-18 23:34:20 +04:00
parent 1671ec9169
commit fc5f292eef
No known key found for this signature in database
GPG Key ID: D1DE6D7F693663A5

View File

@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "zeux"; owner = "zeux";
repo = "pugixml"; repo = "pugixml";
rev = "v${version}"; tag = "v${version}";
sha256 = "sha256-t/57lg32KgKPc7qRGQtO/GOwHRqoj78lllSaE/A8Z9Q="; hash = "sha256-t/57lg32KgKPc7qRGQtO/GOwHRqoj78lllSaE/A8Z9Q=";
}; };
outputs = [ "out" ] ++ lib.optionals shared [ "dev" ]; outputs = [ "out" ] ++ lib.optionals shared [ "dev" ];
@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
]; ];
cmakeFlags = [ cmakeFlags = [
"-DBUILD_TESTS=ON" (lib.cmakeBool "BUILD_TESTS" true)
"-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"}" (lib.cmakeBool "BUILD_SHARED_LIBS" shared)
]; ];
nativeCheckInputs = [ check ]; nativeCheckInputs = [ check ];
@ -38,11 +38,11 @@ stdenv.mkDerivation rec {
sed -i -e '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp sed -i -e '/PUGIXML_HAS_LONG_LONG/ s/^\/\///' src/pugiconfig.hpp
''; '';
meta = with lib; { meta = {
description = "Light-weight, simple and fast XML parser for C++ with XPath support"; description = "Light-weight, simple and fast XML parser for C++ with XPath support";
homepage = "https://pugixml.org"; homepage = "https://pugixml.org";
license = licenses.mit; license = lib.licenses.mit;
maintainers = with maintainers; [ pSub ]; maintainers = with lib.maintainers; [ pSub ];
platforms = platforms.unix; platforms = lib.platforms.unix;
}; };
} }