From d0df291f63d28d738bc25fe53e38a88ffda70fac Mon Sep 17 00:00:00 2001 From: chillcicada <2210227279@qq.com> Date: Sun, 14 Dec 2025 14:50:52 +0800 Subject: [PATCH] libHX: 3.22 -> 5.2; adopted --- pkgs/by-name/li/libHX/package.nix | 41 ++++++++++++++----------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/pkgs/by-name/li/libHX/package.nix b/pkgs/by-name/li/libHX/package.nix index e95023fc43ca..42a9ce958f86 100644 --- a/pkgs/by-name/li/libHX/package.nix +++ b/pkgs/by-name/li/libHX/package.nix @@ -1,46 +1,41 @@ { lib, stdenv, - fetchurl, - autoconf, - automake, - libtool, + fetchFromGitea, + autoreconfHook, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libHX"; - version = "3.22"; + version = "5.2"; - src = fetchurl { - url = "mirror://sourceforge/libhx/libHX/${version}/${pname}-${version}.tar.xz"; - sha256 = "18w39j528lyg2026dr11f2xxxphy91cg870nx182wbd8cjlqf86c"; + src = fetchFromGitea { + domain = "codeberg.org"; + tag = "v${finalAttrs.version}"; + owner = "jengelh"; + repo = "libhx"; + hash = "sha256-z1/D5dkcDc2VIoGCvunUYsLGq3AV6jZ01Edf1vuUx9o="; }; - patches = [ ]; + nativeBuildInputs = [ autoreconfHook ]; - nativeBuildInputs = [ - autoconf - automake - libtool - ]; - - preConfigure = '' - sh autogen.sh - ''; + passthru.updateScript = nix-update-script { }; meta = { - homepage = "https://libhx.sourceforge.net/"; + homepage = "https://inai.de/projects/libhx/"; longDescription = '' libHX is a C library (with some C++ bindings available) that provides data structures and functions commonly needed, such as maps, deques, linked lists, string formatting and autoresizing, option and config file parsing, type checking casts and more. ''; - maintainers = [ ]; + changelog = "https://codeberg.org/jengelh/libhx/src/branch/master/doc/changelog.rst"; + maintainers = with lib.maintainers; [ chillcicada ]; platforms = lib.platforms.linux; license = with lib.licenses; [ gpl3 lgpl21Plus - wtfpl + mit ]; }; -} +})