nur-packages

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

default.nix (1545B)


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