2024-01-02 11:29:13 +00:00
|
|
|
{ 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 = [
|
2024-09-19 14:19:46 +00:00
|
|
|
"-DLIBDICT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
2024-01-02 11:29:13 +00:00
|
|
|
"-DLIBDICT_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/rtbrick/libdict/";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/rtbrick/libdict/releases/tag/${finalAttrs.version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "C library of key-value data structures";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = teams.wdz.members;
|
|
|
|
};
|
|
|
|
})
|