freesweep has a new version in development and it seems to be usable, let's update to it. I included a few patches to allow it to build with and without mlibc (which I'm working on in #371092).
···3 ncurses,
4 lib,
5 stdenv,
6+ autoconf,
7+ automake,
8+ pkg-config,
9 installShellFiles,
10}:
1112+stdenv.mkDerivation {
13 pname = "freesweep";
14+ version = "1.0.2-unstable-2024-04-19";
1516 src = fetchFromGitHub {
17 owner = "rwestlund";
18 repo = "freesweep";
19+ rev = "68c0ee5b29d1087d216d95875a7036713cd25fc0";
20+ hash = "sha256-ZnAH7mIuBMFLdrtJOY8PzNbxv+GDEFAgyEtWCpTH2Us=";
21 };
2223+ # These patches are sent upstream in github:rwestlund/freesweep#18
24+ patches = [
25+ # strncasecmp and friends are declared in strings.h and not string.h on
26+ # systems with HAVE_STRINGS_H
27+ ./0001-include-strings.h.patch
28+ # Fixes a potential format string vulnerability and makes it compile with
29+ # -Wformat-security
30+ ./0002-fix-Wformat-security.patch
31+ # autoconf believes systems that handle malloc(0) differently from glibc
32+ # have a bad malloc implementation and will replace calls to malloc with
33+ # rpl_malloc. freesweep does not define rpl_malloc so this macro prevents
34+ # building for such systems, the easiest solution is to remove this macro
35+ ./0003-remove-ac_func_malloc.patch
36+ ];
37+38 nativeBuildInputs = [
39+ autoconf
40+ automake
41+ pkg-config
42 installShellFiles
43 ];
44 buildInputs = [ ncurses ];
450046 enableParallelBuilding = true;
47+48+ preConfigure = "./autogen.sh";
4950 installPhase = ''
51 runHook preInstall