2021-08-08 23:34:03 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, orcania
|
|
|
|
, systemd
|
|
|
|
, check
|
|
|
|
, subunit
|
2023-02-02 18:25:31 +00:00
|
|
|
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2021-08-08 23:34:03 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yder";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.4.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babelouest";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-4o1sKxlWeAgZZm01sPV2yIR3xXZwzPJwqcGCkz6+Cfc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# We set CMAKE_INSTALL_LIBDIR to the absolute path in $out, so
|
|
|
|
# prefix and exec_prefix cannot be $out, too
|
|
|
|
./fix-pkgconfig.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
buildInputs = [ orcania ]
|
|
|
|
++ lib.optional withSystemd systemd;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ check subunit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_YDER_TESTING=on"
|
|
|
|
] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Logging library for C applications";
|
|
|
|
homepage = "https://github.com/babelouest/yder";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|