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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.4.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "babelouest";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-BaCF1r5mOYxj0zKc11uoKI9gVKuxWd8GaneGcV+qIFg=";
|
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;
|
|
|
|
};
|
|
|
|
}
|