nixpkgs/pkgs/by-name/ar/argtable/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.4 KiB
Nix
Raw Normal View History

2021-10-15 18:30:30 +01:00
{ lib
, stdenv
2021-01-08 18:30:13 +00:00
, fetchFromGitHub
, cmake
}:
2023-10-21 04:18:45 +01:00
stdenv.mkDerivation (finalAttrs: {
2021-01-08 18:30:13 +00:00
pname = "argtable";
2023-10-21 04:18:45 +01:00
version = "3.2.2";
srcVersion = "v${finalAttrs.version}.f25c624";
2021-01-08 18:30:13 +00:00
src = fetchFromGitHub {
owner = "argtable";
repo = "argtable3";
2023-10-21 04:18:45 +01:00
rev = finalAttrs.srcVersion;
hash = "sha256-X89xFLDs6NEgjzzwy8kplvTgukQd/CV3Xa9A3JXecf4=";
2021-01-08 18:30:13 +00:00
};
nativeBuildInputs = [ cmake ];
2021-10-15 18:30:30 +01:00
cmakeFlags = [
2023-10-21 04:18:45 +01:00
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
2021-10-15 18:30:30 +01:00
];
2021-01-08 18:30:13 +00:00
postPatch = ''
patchShebangs tools/build
'';
2023-10-21 04:18:45 +01:00
meta = {
2022-01-07 06:25:43 +00:00
homepage = "https://github.com/argtable/argtable3";
2021-01-08 18:30:13 +00:00
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.
'';
2023-10-21 04:18:45 +01:00
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ AndersonTorres artuuge ];
platforms = lib.platforms.all;
2021-01-08 18:30:13 +00:00
};
2023-10-21 04:18:45 +01:00
})
2021-10-15 18:30:30 +01:00
# TODO: a NixOS test suite
# TODO: multiple outputs
# TODO: documentation
# TODO: build both shared and static libs