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,32 @@
diff --git a/Makefile b/Makefile
index 1a20f4f..077acdb 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-RAW_CC = gcc
+RAW_CC := $(CC)
RAW_FLAGS = -Wall -O2
LINK_OPT =
VERSION = 1.5.7
@@ -24,9 +24,9 @@ MAN_PAGES = $(NAME).8.gz
RAW_FLAGS += -DVERSION=\"$(VERSION)\"
# Where we get installed
-BIN = /usr/local/bin
-MAN = /usr/share/man/man8
-CONF= /usr/local/etc
+BIN = $(PREFIX)/bin
+MAN = $(PREFIX)/share/man/man8
+CONF= $(PREFIX)/etc
# Setup for compiling and cross-compiling for Windows
# The CR_ prefix refers to cross compiling from OSX to Windows
CR_CC = $(CR_BASE)/gcc
@@ -120,7 +120,6 @@ foremost: $(OBJ)
install: goals
install -m 755 $(NAME) $(BIN)
install -m 444 $(MAN_PAGES) $(MAN)
- install -m 444 foremost.conf $(CONF)
macinstall: BIN = /usr/local/bin/
macinstall: MAN = /usr/share/man/man1/
macinstall: CONF = /usr/local/etc/

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "foremost";
version = "1.5.7";
src = fetchurl {
sha256 = "0d2zxw0ijg8cd3ksgm8cf8jg128zr5x7z779jar90g9f47pm882h";
url = "https://foremost.sourceforge.net/pkg/${pname}-${version}.tar.gz";
};
patches = [ ./makefile.patch ];
# -fcommon: Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "mac" ];
enableParallelBuilding = true;
hardeningDisable = [ "format" ];
preInstall = ''
mkdir -p $out/{bin,share/man/man8}
'';
meta = with lib; {
description = "Recover files based on their contents";
longDescription = ''
Foremost is a console program to recover files based on their headers,
footers, and internal data structures. Foremost can work on image files, such
as those generated by dd, Safeback, Encase, etc, or directly on a drive.
The headers and footers can be specified by a configuration file or you can
use command line switches to specify built-in file types. These built-in types
look at the data structures of a given file format allowing for a more
reliable and faster recovery.
'';
homepage = "https://foremost.sourceforge.net/";
license = licenses.publicDomain;
maintainers = [ maintainers.jiegec ];
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "foremost";
};
}