summary refs log tree commit diff
path: root/pkgs/development/libraries/libconfuse/default.nix
blob: cfef09c480a2e954b7fe8ffc6b0bcf0ffb421532 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, fetchFromGitHub, autoreconfHook, flex }:

stdenv.mkDerivation rec {
  pname = "libconfuse";
  version = "3.2.2";

  src = fetchFromGitHub {
    sha256 = "0djjq7j9iiyqxqqrlzm476xkibjasqvgzjwkalgj1l3f2smi53aw";
    rev = "v${version}";
    repo = "libconfuse";
    owner = "martinh";
  };

  nativeBuildInputs = [ autoreconfHook flex ];

  enableParallelBuilding = true;

  # On darwin the tests depend on the installed libraries because of install_name.
  doInstallCheck = true;
  installCheckTarget = "check";

  meta = with stdenv.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;
  };
}