Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ fetchurl, lib, stdenv, texinfo, help2man }:
2
3stdenv.mkDerivation rec {
4 pname = "gengetopt";
5 version = "2.23";
6
7 src = fetchurl {
8 url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
9 sha256 = "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr";
10 };
11
12 doCheck = true;
13 # attempts to open non-existent file
14 preCheck = ''
15 rm tests/test_conf_parser_save.sh
16 '';
17
18 # test suite is not thread safe
19 enableParallelBuilding = false;
20
21 nativeBuildInputs = [ texinfo help2man ];
22
23 #Fix, see #28255
24 postPatch = ''
25 substituteInPlace configure --replace \
26 'set -o posix' \
27 'set +o posix'
28 '';
29
30 meta = {
31 description = "Command-line option parser generator";
32
33 longDescription =
34 '' GNU Gengetopt program generates a C function that uses getopt_long
35 function to parse the command line options, to validate them and
36 fills a struct
37 '';
38
39 homepage = "https://www.gnu.org/software/gengetopt/";
40
41 license = lib.licenses.gpl3Plus;
42
43 maintainers = [ ];
44 platforms = lib.platforms.all;
45 };
46}