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