nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1506B)


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