push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
diff --git a/sweep.h b/sweep.h
index 198349d..549f39f 100644
--- a/sweep.h
+++ b/sweep.h
@@ -32,6 +32,10 @@
#include <string.h>
#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif /* HAVE_STRINGS_H */
+
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif /* HAVE_GETOPT_H */

View File

@@ -0,0 +1,13 @@
diff --git a/logs.c b/logs.c
index 5e87f52..29ad433 100644
--- a/logs.c
+++ b/logs.c
@@ -128,7 +128,7 @@ static void log_display(const char *mesg) {
// Display the message on the screen.
if (log_win) {
wclear(log_win);
- mvwprintw(log_win, 0, 0, mesg);
+ mvwprintw(log_win, 0, 0, "%s", mesg);
wnoutrefresh(log_win);
wrefresh(log_win);
}

View File

@@ -0,0 +1,12 @@
diff --git a/configure.ac b/configure.ac
index ae08308..5262e56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,6 @@ AC_TYPE_SIZE_T
AC_TYPE_UID_T
# Checks for library functions.
-AC_FUNC_MALLOC
AC_CHECK_FUNCS([alarm getcwd memset mkdir setlocale strdup strncasecmp
fileno flock lockf getopt getopt_long])

View File

@@ -0,0 +1,66 @@
{
fetchFromGitHub,
ncurses,
lib,
stdenv,
autoconf,
automake,
pkg-config,
installShellFiles,
}:
stdenv.mkDerivation {
pname = "freesweep";
version = "1.0.2-unstable-2024-04-19";
src = fetchFromGitHub {
owner = "rwestlund";
repo = "freesweep";
rev = "68c0ee5b29d1087d216d95875a7036713cd25fc0";
hash = "sha256-ZnAH7mIuBMFLdrtJOY8PzNbxv+GDEFAgyEtWCpTH2Us=";
};
# These patches are sent upstream in github:rwestlund/freesweep#18
patches = [
# strncasecmp and friends are declared in strings.h and not string.h on
# systems with HAVE_STRINGS_H
./0001-include-strings.h.patch
# Fixes a potential format string vulnerability and makes it compile with
# -Wformat-security
./0002-fix-Wformat-security.patch
# autoconf believes systems that handle malloc(0) differently from glibc
# have a bad malloc implementation and will replace calls to malloc with
# rpl_malloc. freesweep does not define rpl_malloc so this macro prevents
# building for such systems, the easiest solution is to remove this macro
./0003-remove-ac_func_malloc.patch
];
nativeBuildInputs = [
autoconf
automake
pkg-config
installShellFiles
];
buildInputs = [ ncurses ];
enableParallelBuilding = true;
preConfigure = "./autogen.sh";
installPhase = ''
runHook preInstall
install -D -m 0555 freesweep $out/bin/freesweep
install -D -m 0444 sweeprc $out/share/sweeprc
installManPage freesweep.6
runHook postInstall
'';
meta = {
description = "Console minesweeper-style game written in C for Unix-like systems";
mainProgram = "freesweep";
homepage = "https://github.com/rwestlund/freesweep";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ lzcunt ];
platforms = lib.platforms.unix;
};
}