at 23.11-beta 50 lines 1.2 kB view raw
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 env = lib.optionalAttrs stdenv.cc.isClang { 31 CXXFLAGS = "-std=c++14"; 32 }; 33 34 meta = { 35 description = "Command-line option parser generator"; 36 37 longDescription = 38 '' GNU Gengetopt program generates a C function that uses getopt_long 39 function to parse the command line options, to validate them and 40 fills a struct 41 ''; 42 43 homepage = "https://www.gnu.org/software/gengetopt/"; 44 45 license = lib.licenses.gpl3Plus; 46 47 maintainers = [ ]; 48 platforms = lib.platforms.all; 49 }; 50}