2021-01-23 04:26:19 -08:00
|
|
|
{ fetchurl, lib, stdenv, texinfo, help2man }:
|
2010-01-22 09:00:44 -08:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-21 17:57:08 -07:00
|
|
|
pname = "gengetopt";
|
|
|
|
version = "2.23";
|
2010-01-22 09:00:44 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-21 17:57:08 -07:00
|
|
|
url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "1b44fn0apsgawyqa4alx2qj5hls334mhbszxsy6rfr0q074swhdr";
|
2010-01-22 09:00:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
2020-11-20 11:22:32 -08:00
|
|
|
# attempts to open non-existent file
|
|
|
|
preCheck = ''
|
|
|
|
rm tests/test_conf_parser_save.sh
|
|
|
|
'';
|
2010-01-22 09:00:44 -08:00
|
|
|
|
2019-08-21 17:57:08 -07:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ texinfo help2man ];
|
|
|
|
|
|
|
|
#Fix, see #28255
|
2017-09-20 10:23:14 -07:00
|
|
|
postPatch = ''
|
2019-08-21 17:57:08 -07:00
|
|
|
substituteInPlace configure --replace \
|
|
|
|
'set -o posix' \
|
|
|
|
'set +o posix'
|
2017-09-20 10:23:14 -07:00
|
|
|
'';
|
|
|
|
|
2010-01-22 09:00:44 -08:00
|
|
|
meta = {
|
2014-08-24 07:21:08 -07:00
|
|
|
description = "Command-line option parser generator";
|
2010-01-22 09:00:44 -08:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.gnu.org/software/gengetopt/";
|
2010-01-22 09:00:44 -08:00
|
|
|
|
2021-01-23 04:26:19 -08:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2010-01-22 09:00:44 -08:00
|
|
|
|
2013-08-16 14:44:33 -07:00
|
|
|
maintainers = [ ];
|
2021-01-23 04:26:19 -08:00
|
|
|
platforms = lib.platforms.all;
|
2010-01-22 09:00:44 -08:00
|
|
|
};
|
|
|
|
}
|