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

50 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "argtable";
version = "3.2.2";
srcVersion = "v${finalAttrs.version}.f25c624";
src = fetchFromGitHub {
owner = "argtable";
repo = "argtable3";
rev = finalAttrs.srcVersion;
hash = "sha256-X89xFLDs6NEgjzzwy8kplvTgukQd/CV3Xa9A3JXecf4=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
];
postPatch = ''
patchShebangs tools/build
'';
meta = {
homepage = "https://github.com/argtable/argtable3";
description = "Single-file, ANSI C command-line parsing library";
longDescription = ''
Argtable is an open source ANSI C library that parses GNU-style
command-line options. It simplifies command-line parsing by defining a
declarative-style API that you can use to specify what your command-line
syntax looks like. Argtable will automatically generate consistent error
handling logic and textual descriptions of the command line syntax, which
are essential but tedious to implement for a robust CLI program.
'';
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ artuuge ];
platforms = lib.platforms.all;
};
})
# TODO: a NixOS test suite
# TODO: multiple outputs
# TODO: documentation
# TODO: build both shared and static libs