nixpkgs/pkgs/development/libraries/easyloggingpp/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

32 lines
1.0 KiB
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)
{ stdenv, fetchFromGitHub, cmake, gtest }:
stdenv.mkDerivation rec {
pname = "easyloggingpp";
version = "9.96.7";
src = fetchFromGitHub {
owner = "muflihun";
repo = "easyloggingpp";
rev = "v${version}";
sha256 = "0nhszn0yyjwpnv7swm4vqs3i7admgbnifi5dvq5h01fk5nc8yjqz";
};
nativeBuildInputs = [cmake];
buildInputs = [gtest];
cmakeFlags = [ "-Dtest=ON" ];
NIX_CFLAGS_COMPILE = "-std=c++11" +
stdenv.lib.optionalString stdenv.isLinux " -pthread";
postInstall = ''
mkdir -p $out/include
cp ../src/easylogging++.cc $out/include
'';
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;
};
}