mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
0b564f445e
Upstream repo has moved to a different owner
31 lines
1,005 B
Nix
31 lines
1,005 B
Nix
# 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 }:
|
|
stdenv.mkDerivation rec {
|
|
pname = "easyloggingpp";
|
|
version = "9.97.0";
|
|
src = fetchFromGitHub {
|
|
owner = "amrayn";
|
|
repo = "easyloggingpp";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-sFWmZMnucMuvpwDzuowni21KiD3bx0lH1Ts+yhusOYs=";
|
|
};
|
|
|
|
nativeBuildInputs = [cmake];
|
|
buildInputs = [gtest];
|
|
cmakeFlags = [ "-Dtest=ON" ];
|
|
NIX_CFLAGS_COMPILE = "-std=c++11" +
|
|
lib.optionalString stdenv.isLinux " -pthread";
|
|
postInstall = ''
|
|
mkdir -p $out/include
|
|
cp ../src/easylogging++.cc $out/include
|
|
'';
|
|
meta = {
|
|
description = "C++ logging library";
|
|
homepage = "https://github.com/amrayn/easyloggingpp";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [acowley];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
}
|