2020-04-24 23:36:52 +00:00
|
|
|
# To use this package with a CMake and pkg-config build:
|
|
|
|
# pkg_check_modules(EASYLOGGINGPP REQUIRED easyloggingpp)
|
|
|
|
# add_executable(main src/main.cpp ${EASYLOGGINGPP_PREFIX}/include/easylogging++.cc)
|
2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "easyloggingpp";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "9.97.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-02-10 20:34:41 +00:00
|
|
|
owner = "amrayn";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "easyloggingpp";
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-sFWmZMnucMuvpwDzuowni21KiD3bx0lH1Ts+yhusOYs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [cmake];
|
|
|
|
buildInputs = [gtest];
|
|
|
|
cmakeFlags = [ "-Dtest=ON" ];
|
|
|
|
NIX_CFLAGS_COMPILE = "-std=c++11" +
|
2021-02-05 17:12:51 +00:00
|
|
|
lib.optionalString stdenv.isLinux " -pthread";
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/include
|
|
|
|
cp ../src/easylogging++.cc $out/include
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
description = "C++ logging library";
|
2022-02-10 20:34:41 +00:00
|
|
|
homepage = "https://github.com/amrayn/easyloggingpp";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [acowley];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|