nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7}:
8
9stdenv.mkDerivation {
10 pname = "loguru";
11 version = "2.1.0-unstable-2023-04-06";
12
13 src = fetchFromGitHub {
14 owner = "emilk";
15 repo = "loguru";
16 rev = "4adaa185883e3c04da25913579c451d3c32cfac1";
17 hash = "sha256-NpMKyjCC06bC5B3xqgDr2NgA9RsPEeiWr9GbHrHHzZ8=";
18 };
19
20 patches = [
21 # See https://github.com/emilk/loguru/issues/249
22 # The following patches are coming from a fork and fix builds on Darwin
23 # Hopefully they will be merged in the main repository soon.
24 (fetchpatch {
25 url = "https://github.com/virtuosonic/loguru/commit/e1ffdc4149083cc221d44b666a0f7e3ec4a87259.patch";
26 hash = "sha256-fYdS8+qfgyj1J+T6H434jDGK/L+VYq+L22CQ7M/uiXE=";
27 })
28 (fetchpatch {
29 url = "https://github.com/virtuosonic/loguru/commit/743777bea361642349d4673e6a0a55912849c14f.patch";
30 hash = "sha256-3FhH7zdkzHuXSirSCr8A3uHg8UpSfEM02AkR0ZSG0Yw=";
31 })
32 ];
33
34 cmakeFlags = [
35 "-DLOGURU_WITH_STREAMS=1"
36 ];
37
38 nativeBuildInputs = [
39 cmake
40 ];
41
42 meta = {
43 description = "Lightweight C++ logging library";
44 homepage = "https://github.com/emilk/loguru";
45 license = lib.licenses.unlicense;
46 maintainers = [ ];
47 platforms = lib.platforms.all;
48 };
49}