
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19
.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
51 lines
1.6 KiB
Nix
51 lines
1.6 KiB
Nix
{
|
|
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";
|
|
};
|
|
}
|