mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-15 09:07:58 +00:00
tinyxml-2: refactor
- finalAttrs design pattern - change pname - update meta - homepage - maintainers - changelog
This commit is contained in:
parent
34d3d09834
commit
51013d947e
@ -1,30 +1,37 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tinyxml-2";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tinyxml2";
|
||||
version = "10.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "tinyxml2";
|
||||
owner = "leethomason";
|
||||
rev = version;
|
||||
sha256 = "sha256-9xrpPFMxkAecg3hMHzzThuy0iDt970Iqhxs57Od+g2g=";
|
||||
repo = "tinyxml2";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-9xrpPFMxkAecg3hMHzzThuy0iDt970Iqhxs57Od+g2g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
|
||||
# (setting it to an absolute path causes include files to go to $out/$out/include,
|
||||
# because the absolute path is interpreted with root at $out).
|
||||
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR
|
||||
# correctly (setting it to an absolute path causes include files to go to
|
||||
# $out/$out/include, because the absolute path is interpreted with root at
|
||||
# $out).
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A simple, small, efficient, C++ XML parser";
|
||||
homepage = "https://www.grinninglizard.com/tinyxml2/index.html";
|
||||
homepage = "https://github.com/leethomason/tinyxml2";
|
||||
changelog = "https://github.com/leethomason/tinyxml2/releases/tag/${finalAttrs.src.rev}";
|
||||
license = with lib.licenses; [ zlib ];
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.unix;
|
||||
license = lib.licenses.zlib;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user