From d8ecd404e604cf8d4bbd1bdbd8142566d66ebad1 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 23 Feb 2025 00:26:07 +0400 Subject: [PATCH 1/2] =?UTF-8?q?zlog:=201.2.17=20=E2=86=92=201.2.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/zl/zlog/package.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/zl/zlog/package.nix b/pkgs/by-name/zl/zlog/package.nix index 9054ae1a6a54..75faa879f64e 100644 --- a/pkgs/by-name/zl/zlog/package.nix +++ b/pkgs/by-name/zl/zlog/package.nix @@ -2,28 +2,19 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, }: stdenv.mkDerivation rec { - version = "1.2.17"; + version = "1.2.18"; pname = "zlog"; src = fetchFromGitHub { owner = "HardySimpson"; repo = pname; rev = version; - sha256 = "sha256-ckpDMRLxObpl8N539DC5u2bPpmD7jM+KugurUfta6tg="; + hash = "sha256-79yyOGKgqUR1KI2+ngZd7jfVcz4Dw1IxaYfBJyjsxYc="; }; - patches = [ - (fetchpatch { - name = "CVE-2024-22857.patch"; - url = "https://github.com/HardySimpson/zlog/commit/c47f781a9f1e9604f5201e27d046d925d0d48ac4.patch"; - hash = "sha256-3FAAHJ2R/OpNpErWXptjEh0x370/jzvK2VhuUuyaOjE="; - }) - ]; - makeFlags = [ "PREFIX=${placeholder "out"}" ]; preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' @@ -33,7 +24,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Reliable, high-performance, thread safe, flexible, clear-model, pure C logging library"; homepage = "https://hardysimpson.github.io/zlog/"; - license = licenses.lgpl21; + license = licenses.asl20; maintainers = [ maintainers.matthiasbeyer ]; mainProgram = "zlog-chk-conf"; platforms = platforms.unix; From f2a6f8ea83d3007d187c7dc33ce3e5dd45014919 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 23 Feb 2025 00:29:47 +0400 Subject: [PATCH 2/2] zlog: modernize --- pkgs/by-name/zl/zlog/package.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/zl/zlog/package.nix b/pkgs/by-name/zl/zlog/package.nix index 75faa879f64e..e8f4b3f8473a 100644 --- a/pkgs/by-name/zl/zlog/package.nix +++ b/pkgs/by-name/zl/zlog/package.nix @@ -2,31 +2,28 @@ lib, stdenv, fetchFromGitHub, + cmake, }: -stdenv.mkDerivation rec { - version = "1.2.18"; +stdenv.mkDerivation (finalAttrs: { pname = "zlog"; + version = "1.2.18"; src = fetchFromGitHub { owner = "HardySimpson"; - repo = pname; - rev = version; + repo = "zlog"; + tag = finalAttrs.version; hash = "sha256-79yyOGKgqUR1KI2+ngZd7jfVcz4Dw1IxaYfBJyjsxYc="; }; - makeFlags = [ "PREFIX=${placeholder "out"}" ]; + nativeBuildInputs = [ cmake ]; - preBuild = lib.optionalString stdenv.hostPlatform.isDarwin '' - makeFlagsArray+=(CFLAGS="-Wno-pointer-to-int-cast -Wno-newline-eof") - ''; - - meta = with lib; { + meta = { description = "Reliable, high-performance, thread safe, flexible, clear-model, pure C logging library"; homepage = "https://hardysimpson.github.io/zlog/"; - license = licenses.asl20; - maintainers = [ maintainers.matthiasbeyer ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ matthiasbeyer ]; mainProgram = "zlog-chk-conf"; - platforms = platforms.unix; + platforms = lib.platforms.unix; }; -} +})