After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
result/bin/apply-formatting $NIXPKGS_PATH
67 lines
1.9 KiB
Nix
67 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
autoreconfHook,
|
|
flex,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libconfuse";
|
|
version = "3.3";
|
|
|
|
src = fetchFromGitHub {
|
|
sha256 = "1npfk5jv59kk4n8pkyx89fn9s6p8x3gbffs42jaw24frgxfgp8ca";
|
|
rev = "v${version}";
|
|
repo = "libconfuse";
|
|
owner = "martinh";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "CVE-2022-40320.patch";
|
|
urls = [
|
|
"https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
|
|
# files on sources.debian.org can disappear
|
|
"https://web.archive.org/web/20230107133212/https://sources.debian.org/data/main/libc/libconfuse/3.3-3/debian/patches/CVE-2022-40320.patch"
|
|
];
|
|
sha256 = "sha256-ftfE9JFz4nyRSOb2xHb9BAtgWn5Yv2WLm4RegDLtiBw=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace tests/Makefile.am \
|
|
--replace 'TESTS += empty_string' "" \
|
|
--replace 'TESTS += print_filter' ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
flex
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# On darwin the tests depend on the installed libraries because of install_name.
|
|
doInstallCheck = true;
|
|
installCheckTarget = "check";
|
|
|
|
meta = with lib; {
|
|
inherit (src.meta) homepage;
|
|
description = "Small configuration file parser library for C";
|
|
longDescription = ''
|
|
libConfuse (previously libcfg) is a configuration file parser library
|
|
written in C. It supports sections and (lists of) values, as well as
|
|
some other features. It makes it very easy to add configuration file
|
|
capability to a program using a simple API.
|
|
|
|
The goal of libConfuse is not to be the configuration file parser library
|
|
with a gazillion of features. Instead, it aims to be easy to use and
|
|
quick to integrate with your code.
|
|
'';
|
|
license = licenses.isc;
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|