From e2bd46dddb621c61e6525bb4fbd2f1f269493113 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Sat, 29 Mar 2025 14:27:06 -0700 Subject: [PATCH] pies: 1.3 -> 1.8, unbreak --- pkgs/by-name/pi/pies/package.nix | 30 +++++++++++++++++++----------- pkgs/by-name/pi/pies/stdlib.patch | 24 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 pkgs/by-name/pi/pies/stdlib.patch diff --git a/pkgs/by-name/pi/pies/package.nix b/pkgs/by-name/pi/pies/package.nix index 4d9e858669be..e5499a017637 100644 --- a/pkgs/by-name/pi/pies/package.nix +++ b/pkgs/by-name/pi/pies/package.nix @@ -1,30 +1,40 @@ { - fetchurl, lib, stdenv, + fetchurl, libxcrypt, + versionCheckHook, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pies"; - version = "1.3"; + version = "1.8"; src = fetchurl { - url = "mirror://gnu/pies/${pname}-${version}.tar.bz2"; - sha256 = "12r7rjjyibjdj08dvwbp0iflfpzl4s0zhn6cr6zj3hwf9gbzgl1g"; + url = "mirror://gnu/pies/pies-${finalAttrs.version}.tar.bz2"; + hash = "sha256-ZSi00WmC6il4+aSohqFKrKjtp6xFXYE7IIRGVwFmHWw="; }; buildInputs = [ libxcrypt ]; + patches = [ ./stdlib.patch ]; + + postPatch = '' + substituteInPlace configure \ + --replace-fail "gl_cv_func_memchr_works=\"guessing no\"" "gl_cv_func_memchr_works=yes" + ''; + configureFlags = [ "--sysconfdir=/etc" ]; hardeningDisable = [ "format" ]; doCheck = true; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + meta = { description = "Program invocation and execution supervisor"; - longDescription = '' The name Pies (pronounced "p-yes") stands for Program Invocation and Execution Supervisor. This utility starts and controls execution of @@ -45,12 +55,10 @@ stdenv.mkDerivation rec { Jabberd or MeTA1 (and it offers much more control over them than the native utilities). Finally, it can replace the inetd utility! ''; - - license = lib.licenses.gpl3Plus; - homepage = "https://www.gnu.org/software/pies/"; - + license = lib.licenses.gpl3Plus; platforms = lib.platforms.gnu ++ lib.platforms.linux; + broken = stdenv.hostPlatform.system == "aarch64-linux"; maintainers = [ ]; }; -} +}) diff --git a/pkgs/by-name/pi/pies/stdlib.patch b/pkgs/by-name/pi/pies/stdlib.patch new file mode 100644 index 000000000000..13af5cdc8522 --- /dev/null +++ b/pkgs/by-name/pi/pies/stdlib.patch @@ -0,0 +1,24 @@ +diff --git a/src/pies.c b/src/pies.c +index 9355d50..9fe6109 100644 +--- a/src/pies.c ++++ b/src/pies.c +@@ -19,6 +19,7 @@ + #include + #include "meta1parse.h" + #include "grecsasrt.h" ++#include + + int preprocess_only; /* Preprocess config, do nothing more */ + int lint_mode; /* Test configuration syntax and exit */ +diff --git a/src/piesctl.c b/src/piesctl.c +index a0ac967..fd6c3e2 100644 +--- a/src/piesctl.c ++++ b/src/piesctl.c +@@ -14,6 +14,7 @@ + You should have received a copy of the GNU General Public License + along with GNU Pies. If not, see . */ + ++#include + #include + #include + #include