Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
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
2024-12-10 20:26:33 +01:00

61 lines
1.2 KiB
Nix

{
fetchurl,
lib,
stdenv,
texinfo,
help2man,
}:
stdenv.mkDerivation rec {
pname = "gengetopt";
version = "2.23";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
sha256 = "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr";
};
doCheck = true;
# attempts to open non-existent file
preCheck = ''
rm tests/test_conf_parser_save.sh
'';
# test suite is not thread safe
enableParallelBuilding = false;
nativeBuildInputs = [
texinfo
help2man
];
#Fix, see #28255
postPatch = ''
substituteInPlace configure --replace \
'set -o posix' \
'set +o posix'
'';
env = lib.optionalAttrs stdenv.cc.isClang {
CXXFLAGS = "-std=c++14";
};
meta = {
description = "Command-line option parser generator";
mainProgram = "gengetopt";
longDescription = ''
GNU Gengetopt program generates a C function that uses getopt_long
function to parse the command line options, to validate them and
fills a struct
'';
homepage = "https://www.gnu.org/software/gengetopt/";
license = lib.licenses.gpl3Plus;
maintainers = [ ];
platforms = lib.platforms.all;
};
}