From 7d8f4d6b449ee1a6b16df87ea246a0550c310873 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 7 Nov 2024 07:35:11 -0800 Subject: [PATCH 1/2] ccze: move to pkgs/by-name, nixfmt as a result --- pkgs/by-name/cc/ccze/package.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/cc/ccze/package.nix b/pkgs/by-name/cc/ccze/package.nix index 2c028485ccd3..23b722bdf4d6 100644 --- a/pkgs/by-name/cc/ccze/package.nix +++ b/pkgs/by-name/cc/ccze/package.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, autoconf, ncurses, pcre }: +{ + lib, + stdenv, + fetchFromGitHub, + autoconf, + ncurses, + pcre, +}: stdenv.mkDerivation rec { pname = "ccze"; @@ -13,7 +20,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoconf ]; - buildInputs = [ ncurses pcre ]; + buildInputs = [ + ncurses + pcre + ]; preConfigure = '' autoheader From 710751d11903403d11b7563a9c3a325a53749c7b Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Thu, 7 Nov 2024 07:51:24 -0800 Subject: [PATCH 2/2] ccze: 0.2.1-2 -> 0.2.1-8 Debian appears to be the only maintained source for this package. Added a changelog and a mainProgram. --- pkgs/by-name/cc/ccze/package.nix | 44 +++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/cc/ccze/package.nix b/pkgs/by-name/cc/ccze/package.nix index 23b722bdf4d6..113db4b49a07 100644 --- a/pkgs/by-name/cc/ccze/package.nix +++ b/pkgs/by-name/cc/ccze/package.nix @@ -1,28 +1,37 @@ { lib, stdenv, - fetchFromGitHub, + fetchFromGitLab, autoconf, ncurses, - pcre, + pcre2, + quilt, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ccze"; - version = "0.2.1-2"; + version = "0.2.1-8"; - src = fetchFromGitHub { - owner = "madhouse"; + src = fetchFromGitLab { + domain = "salsa.debian.org"; + owner = "debian"; repo = "ccze"; - rev = "ccze-${version}"; - hash = "sha256-LVwmbrq78mZcAEuAqjXTqLE5we83H9mcMPtxQx2Tn/c="; + rev = "debian/${finalAttrs.version}"; + hash = "sha256-sESbs+HTDRX9w7c+LYnzQoemPIxAtqk27IVSTtiAGEk="; }; - nativeBuildInputs = [ autoconf ]; + postPatch = '' + QUILT_PATCHES=debian/patches quilt push -a + ''; + + nativeBuildInputs = [ + autoconf + quilt + ]; buildInputs = [ ncurses - pcre + pcre2 ]; preConfigure = '' @@ -31,14 +40,19 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + mainProgram = "ccze"; description = "Fast, modular log colorizer"; + homepage = "https://salsa.debian.org/debian/ccze"; + changelog = "https://salsa.debian.org/debian/ccze/-/raw/master/debian/changelog?ref_type=heads"; longDescription = '' - Fast log colorizer written in C, intended to be a drop-in replacement - for the Perl colorize tool. Includes plugins for a variety of log - formats (Apache, Postfix, Procmail, etc.). + Fast log colorizer written in C, intended to be a drop-in replacement for the Perl colorize tool. + Includes plugins for a variety of log formats (Apache, Postfix, Procmail, etc.). ''; license = licenses.gpl2Plus; - maintainers = with maintainers; [ malyn ]; + maintainers = with maintainers; [ + malyn + philiptaron + ]; platforms = platforms.linux; }; -} +})