From 958dbdf137f2bcf1d9539243ea0f5d01cf0db14f Mon Sep 17 00:00:00 2001 From: awwpotato Date: Fri, 4 Apr 2025 10:50:15 -0700 Subject: [PATCH] petidomo: unbreak on gcc 14, modernize --- pkgs/by-name/pe/petidomo/package.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pe/petidomo/package.nix b/pkgs/by-name/pe/petidomo/package.nix index 20b70daea826..d9047bf4e62b 100644 --- a/pkgs/by-name/pe/petidomo/package.nix +++ b/pkgs/by-name/pe/petidomo/package.nix @@ -5,15 +5,16 @@ flex, bison, sendmailPath ? "/run/wrappers/bin/sendmail", + versionCheckHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "petidomo"; version = "4.3"; src = fetchurl { - url = "mirror://sourceforge/petidomo/${pname}-${version}.tar.gz"; - sha256 = "0x4dbxc4fcfg1rw5ywpcypvylnzn3y4rh0m6fz4h4cdnzb8p1lvm"; + url = "mirror://sourceforge/petidomo/petidomo-${finalAttrs.version}.tar.gz"; + hash = "sha256-ddNw0fq2MQLJd6YCmIkf9lvq9/Xscl94Ds8xR1hfjXQ="; }; buildInputs = [ @@ -23,10 +24,16 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-mta=${sendmailPath}" ]; + # test.c:43:11: error: implicit declaration of function 'gets'; did you mean 'fgets'? + env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; + enableParallelBuilding = true; doCheck = true; + doInstallCheck = true; + nativeInstallCheck = [ versionCheckHook ]; + meta = { homepage = "https://petidomo.sourceforge.net/"; description = "Simple and easy to administer mailing list server"; @@ -35,4 +42,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; maintainers = [ lib.maintainers.peti ]; }; -} +})