9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
14 sha256 = "1npfk5jv59kk4n8pkyx89fn9s6p8x3gbffs42jaw24frgxfgp8ca";
22 name = "CVE-2022-40320.patch";
24 "https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
25 # files on sources.debian.org can disappear
26 "https://web.archive.org/web/20230107133212/https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
28 sha256 = "sha256-ftfE9JFz4nyRSOb2xHb9BAtgWn5Yv2WLm4RegDLtiBw=";
33 substituteInPlace tests/Makefile.am \
34 --replace 'TESTS += empty_string' "" \
35 --replace 'TESTS += print_filter' ""
38 nativeBuildInputs = [ autoreconfHook flex ];
40 enableParallelBuilding = true;
42 # On darwin the tests depend on the installed libraries because of install_name.
43 doInstallCheck = true;
44 installCheckTarget = "check";
47 inherit (src.meta) homepage;
48 description = "Small configuration file parser library for C";
50 libConfuse (previously libcfg) is a configuration file parser library
51 written in C. It supports sections and (lists of) values, as well as
52 some other features. It makes it very easy to add configuration file
53 capability to a program using a simple API.
55 The goal of libConfuse is not to be the configuration file parser library
56 with a gazillion of features. Instead, it aims to be easy to use and
57 quick to integrate with your code.
59 license = licenses.isc;
60 platforms = platforms.linux ++ platforms.darwin;