mini-calc: 3.3.3 -> 3.3.5 (#372274)
[NixPkgs.git] / pkgs / by-name / li / libdict / package.nix
blobc9eb090fd4e6a918619e5e42dd2b547148cce7a0
1 { stdenv
2 , lib
3 , fetchFromGitHub
4 , cmake
5 , cunit
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "libdict";
10   version = "1.0.4";
12   src = fetchFromGitHub {
13     owner = "rtbrick";
14     repo = "libdict";
15     rev = finalAttrs.version;
16     hash = "sha256-GFK2yjtxAwwstoJQGCXxwNKxn3LL74FBxad7JdOn0pU=";
17   };
19   nativeBuildInputs = [
20     cmake
21   ];
22   buildInputs = [
23     cunit
24   ];
26   cmakeFlags = [
27     "-DLIBDICT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
28     "-DLIBDICT_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
29   ];
31   env.NIX_CFLAGS_COMPILE = toString (
32     lib.optionals stdenv.cc.isClang [
33       "-Wno-error=strict-prototypes"
34       "-Wno-error=newline-eof"
35     ]
36   );
38   doCheck = true;
40   meta = with lib; {
41     homepage = "https://github.com/rtbrick/libdict/";
42     changelog = "https://github.com/rtbrick/libdict/releases/tag/${finalAttrs.version}";
43     description = "C library of key-value data structures";
44     license = licenses.bsd2;
45     maintainers = teams.wdz.members;
46   };