at 23.11-beta 31 lines 1.0 kB view raw
1# To use this package with a CMake and pkg-config build: 2# pkg_check_modules(EASYLOGGINGPP REQUIRED easyloggingpp) 3# add_executable(main src/main.cpp ${EASYLOGGINGPP_PREFIX}/include/easylogging++.cc) 4{ lib, stdenv, fetchFromGitHub, cmake, gtest }: 5stdenv.mkDerivation rec { 6 pname = "easyloggingpp"; 7 version = "9.97.1"; 8 src = fetchFromGitHub { 9 owner = "amrayn"; 10 repo = "easyloggingpp"; 11 rev = "v${version}"; 12 sha256 = "sha256-R4NdwsUywgJoK5E/OdZXFds6iBKOsMa0E+2PDdQbV6E="; 13 }; 14 15 nativeBuildInputs = [cmake]; 16 buildInputs = [gtest]; 17 cmakeFlags = [ "-Dtest=ON" ]; 18 env.NIX_CFLAGS_COMPILE = "-std=c++11" + 19 lib.optionalString stdenv.isLinux " -pthread"; 20 postInstall = '' 21 mkdir -p $out/include 22 cp ../src/easylogging++.cc $out/include 23 ''; 24 meta = { 25 description = "C++ logging library"; 26 homepage = "https://github.com/amrayn/easyloggingpp"; 27 license = lib.licenses.mit; 28 maintainers = with lib.maintainers; [acowley]; 29 platforms = lib.platforms.all; 30 }; 31}