2017-10-11 22:34:20 +02: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-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
|
2017-10-09 20:09:06 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "easyloggingpp";
|
2021-01-18 16:13:09 +01:00
|
|
|
version = "9.97.0";
|
2017-10-09 20:09:06 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "muflihun";
|
|
|
|
repo = "easyloggingpp";
|
|
|
|
rev = "v${version}";
|
2021-01-18 16:13:09 +01:00
|
|
|
sha256 = "sha256-sFWmZMnucMuvpwDzuowni21KiD3bx0lH1Ts+yhusOYs=";
|
2017-10-09 20:09:06 +02:00
|
|
|
};
|
2018-02-14 09:18:35 +01:00
|
|
|
|
2017-10-09 20:09:06 +02:00
|
|
|
nativeBuildInputs = [cmake];
|
|
|
|
buildInputs = [gtest];
|
2017-10-11 22:34:20 +02:00
|
|
|
cmakeFlags = [ "-Dtest=ON" ];
|
2017-10-09 20:09:06 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-std=c++11" +
|
2021-01-21 18:00:13 +01:00
|
|
|
lib.optionalString stdenv.isLinux " -pthread";
|
2017-10-11 22:34:20 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/include
|
|
|
|
cp ../src/easylogging++.cc $out/include
|
|
|
|
'';
|
2017-10-09 20:09:06 +02:00
|
|
|
meta = {
|
|
|
|
description = "C++ logging library";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://muflihun.github.io/easyloggingpp/";
|
2021-01-21 18:00:13 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [acowley];
|
|
|
|
platforms = lib.platforms.all;
|
2017-10-09 20:09:06 +02:00
|
|
|
};
|
|
|
|
}
|