nixpkgs-suyu/pkgs/development/libraries/easyloggingpp/default.nix

32 lines
1 KiB
Nix
Raw Normal View History

# 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 20:09:06 +02:00
{ stdenv, fetchFromGitHub, cmake, gtest }:
stdenv.mkDerivation rec {
name = "easyloggingpp-${version}";
version = "9.96.1";
2017-10-09 20:09:06 +02:00
src = fetchFromGitHub {
owner = "muflihun";
repo = "easyloggingpp";
rev = "v${version}";
sha256 = "1x5wwm62l1231sgxfwx8mj7fc8452j3f509jyxa9wd2krkpvqxmy";
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];
cmakeFlags = [ "-Dtest=ON" ];
2017-10-09 20:09:06 +02:00
NIX_CFLAGS_COMPILE = "-std=c++11" +
stdenv.lib.optionalString stdenv.isLinux " -pthread";
postInstall = ''
mkdir -p $out/include
cp ../src/easylogging++.cc $out/include
'';
2017-10-09 20:09:06 +02:00
meta = {
description = "C++ logging library";
homepage = https://muflihun.github.io/easyloggingpp/;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [acowley];
platforms = stdenv.lib.platforms.all;
};
}