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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
1009 B
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)
{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
2017-10-09 18:09:06 +00:00
stdenv.mkDerivation rec {
pname = "easyloggingpp";
2021-01-18 15:13:09 +00:00
version = "9.97.0";
2017-10-09 18:09:06 +00:00
src = fetchFromGitHub {
owner = "amrayn";
2017-10-09 18:09:06 +00:00
repo = "easyloggingpp";
rev = "v${version}";
2021-01-18 15:13:09 +00:00
sha256 = "sha256-sFWmZMnucMuvpwDzuowni21KiD3bx0lH1Ts+yhusOYs=";
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];
cmakeFlags = [ "-Dtest=ON" ];
env.NIX_CFLAGS_COMPILE = "-std=c++11" +
lib.optionalString stdenv.isLinux " -pthread";
postInstall = ''
mkdir -p $out/include
cp ../src/easylogging++.cc $out/include
'';
2017-10-09 18:09:06 +00:00
meta = {
description = "C++ logging library";
homepage = "https://github.com/amrayn/easyloggingpp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [acowley];
platforms = lib.platforms.all;
2017-10-09 18:09:06 +00:00
};
}