From 51013d947e3e3c99aebb0ee2bee7d05e35c4b2df Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 31 Dec 2023 14:01:26 -0300 Subject: [PATCH 1/2] tinyxml-2: refactor - finalAttrs design pattern - change pname - update meta - homepage - maintainers - changelog --- .../libraries/tinyxml-2/default.nix | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/tinyxml-2/default.nix b/pkgs/development/libraries/tinyxml-2/default.nix index 5e63893bb232..33ec1340528e 100644 --- a/pkgs/development/libraries/tinyxml-2/default.nix +++ b/pkgs/development/libraries/tinyxml-2/default.nix @@ -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; }; -} +}) From 05aa78d9c53d81104ce8c4c380d60c008ac5e552 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 31 Dec 2023 17:05:46 -0300 Subject: [PATCH 2/2] tinyxml-2: migrate to by-name --- .../tinyxml-2/default.nix => by-name/ti/tinyxml-2/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/tinyxml-2/default.nix => by-name/ti/tinyxml-2/package.nix} (100%) diff --git a/pkgs/development/libraries/tinyxml-2/default.nix b/pkgs/by-name/ti/tinyxml-2/package.nix similarity index 100% rename from pkgs/development/libraries/tinyxml-2/default.nix rename to pkgs/by-name/ti/tinyxml-2/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c126053bbd4..3353a2f2b2e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25364,8 +25364,6 @@ with pkgs; tinyxml2 = callPackage ../development/libraries/tinyxml/2.6.2.nix { }; - tinyxml-2 = callPackage ../development/libraries/tinyxml-2 { }; - tiscamera = callPackage ../os-specific/linux/tiscamera { }; tivodecode = callPackage ../applications/video/tivodecode { };