-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
56 lines (45 loc) · 1.08 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ pkgs ? import <nixpkgs> {} }:
let
# Especificar la versión específica de Filebeat con el hash correcto
filebeat68 = pkgs.stdenv.mkDerivation {
name = "filebeat-6.8.0";
version = "6.8.0";
src = pkgs.fetchurl {
url = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.8.0-linux-x86_64.tar.gz";
sha256 = "0zxl9v3k0ig5d74vlaszqhk3q7qc3xa5bgl2ymmrswvwb16yjn9y"; # Hash actualizado
};
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
tar -xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp filebeat-6.8.0-linux-x86_64/filebeat $out/bin/
chmod +x $out/bin/filebeat
'';
};
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cmake
jq
#redis
#logstash
#elasticsearch
#kibana
];
buildInputs = [
filebeat68
];
packages = with pkgs; [
git
neovim
httpie
];
GIT_EDITOR = "${pkgs.neovim}/bin/nvim";
shellHook = ''
echo "Starting Redis server..."
export PATH=$PATH:${filebeat68}/bin
filebeat -c ./elk/filebeat/filebeat.yml
'';
}