package.nix (1567B)
1 { 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 ninja, 7 python3Packages, 8 boost, 9 ragel, 10 useSentry ? stdenv.isLinux, 11 useHyperscan ? false, 12 }: 13 14 stdenv.mkDerivation rec { 15 pname = "klogg"; 16 version = "2021-09-27"; 17 18 __structuredAttrs = true; 19 20 src = fetchFromGitHub { 21 owner = "variar"; 22 repo = "klogg"; 23 rev = "9fade8bcf354fc6d329facbce07a6c29437597a1"; 24 hash = "sha256-bim/cDEOfMolHkrBLBEu94YI+1o1opdeA66xeovAwp0="; 25 }; 26 27 nativeBuildInputs = [ 28 cmake 29 ninja 30 python3Packages.python 31 ]; 32 33 buildInputs = [ 34 boost 35 ragel 36 ]; 37 38 postPatch = lib.optionalString useSentry '' 39 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 40 --set-rpath "$out/lib:${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \ 41 3rdparty/sentry/dump_syms/linux/dump_syms 42 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 43 --set-rpath "$out/lib:${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \ 44 3rdparty/sentry/dump_syms/linux/minidump_dump 45 ''; 46 47 preConfigure = "export KLOGG_VERSION=${version}"; 48 49 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=missing-braces"; 50 51 cmakeFlags = [ 52 (lib.cmakeBool "KLOGG_USE_SENTRY" useSentry) 53 (lib.cmakeBool "KLOGG_USE_HYPERSCAN" useHyperscan) 54 ]; 55 56 meta = { 57 description = "A fast, advanced log explorer based on glogg project"; 58 homepage = "https://klogg.filimonov.dev/"; 59 license = lib.licenses.gpl3Plus; 60 maintainers = [ lib.maintainers.sikmir ]; 61 platforms = lib.platforms.unix; 62 broken = true; 63 }; 64 }
