Files
nixpkgs/pkgs/by-name/ar/argtable/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.3 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 = [ ];
platforms = lib.platforms.all;
};
})
# TODO: a NixOS test suite
# TODO: multiple outputs
# TODO: documentation
# TODO: build both shared and static libs