Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 51 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 mainProgram = "gengetopt"; 37 38 longDescription = 39 '' GNU Gengetopt program generates a C function that uses getopt_long 40 function to parse the command line options, to validate them and 41 fills a struct 42 ''; 43 44 homepage = "https://www.gnu.org/software/gengetopt/"; 45 46 license = lib.licenses.gpl3Plus; 47 48 maintainers = [ ]; 49 platforms = lib.platforms.all; 50 }; 51}