Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 54 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 autoreconfHook, 5 fetchFromGitHub, 6 gettext, 7 libmaxminddb, 8 ncurses, 9 openssl, 10 withGeolocation ? true, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "goaccess"; 15 version = "1.9.4"; 16 17 src = fetchFromGitHub { 18 owner = "allinurl"; 19 repo = "goaccess"; 20 tag = "v${version}"; 21 hash = "sha256-KevxuZuIrMybNlPZgVDLO0zQe4LfAKxfVBbHnyTUC/o="; 22 }; 23 24 nativeBuildInputs = [ autoreconfHook ]; 25 26 buildInputs = [ 27 ncurses 28 openssl 29 ] 30 ++ lib.optionals withGeolocation [ libmaxminddb ] 31 ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; 32 33 configureFlags = [ 34 "--enable-utf8" 35 "--with-openssl" 36 ] 37 ++ lib.optionals withGeolocation [ "--enable-geoip=mmdb" ]; 38 39 env.NIX_CFLAGS_COMPILE = toString ( 40 lib.optionals stdenv.hostPlatform.isDarwin [ 41 "-DHOST_NAME_MAX=_POSIX_HOST_NAME_MAX" 42 ] 43 ); 44 45 meta = { 46 description = "Real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems"; 47 homepage = "https://goaccess.io"; 48 changelog = "https://github.com/allinurl/goaccess/raw/v${version}/ChangeLog"; 49 license = lib.licenses.mit; 50 maintainers = with lib.maintainers; [ ederoyd46 ]; 51 platforms = lib.platforms.linux ++ lib.platforms.darwin; 52 mainProgram = "goaccess"; 53 }; 54}