about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/li/libdict/package.nix
blob: 1c6e770299ca0d33e990395f4d1f763ff183db41 (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
39
40
{ stdenv
, lib
, fetchFromGitHub
, cmake
, cunit
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "libdict";
  version = "1.0.3";

  src = fetchFromGitHub {
    owner = "rtbrick";
    repo = "libdict";
    rev = finalAttrs.version;
    hash = "sha256-JM67lpXGacA0w8luQLc/83mAdHgtXnYlw543gUqUpRM=";
  };

  nativeBuildInputs = [
    cmake
  ];
  buildInputs = [
    cunit
  ];

  cmakeFlags = [
    "-DLIBDICT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
    "-DLIBDICT_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
  ];

  doCheck = true;

  meta = with lib; {
    homepage = "https://github.com/rtbrick/libdict/";
    changelog = "https://github.com/rtbrick/libdict/releases/tag/${version}";
    description = "C library of key-value data structures";
    license = licenses.bsd2;
    maintainers = teams.wdz.members;
  };
})