mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
48 lines
997 B
Nix
48 lines
997 B
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
cunit,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libdict";
|
|
version = "1.0.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rtbrick";
|
|
repo = "libdict";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-JO8gIZwSZ1vOigiM2IoGRYW2m2zoAa1af/eMBP3ZRjY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
buildInputs = [
|
|
cunit
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DLIBDICT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
|
"-DLIBDICT_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString (
|
|
lib.optionals stdenv.cc.isClang [
|
|
"-Wno-error=strict-prototypes"
|
|
"-Wno-error=newline-eof"
|
|
]
|
|
);
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
homepage = "https://github.com/rtbrick/libdict/";
|
|
changelog = "https://github.com/rtbrick/libdict/releases/tag/${finalAttrs.version}";
|
|
description = "C library of key-value data structures";
|
|
license = lib.licenses.bsd2;
|
|
};
|
|
})
|