nur-packages

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

package.nix (1538B)


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