]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
misc: add a shell.nix file
authorEric Leblond <el@stamus-networks.com>
Thu, 17 Apr 2025 07:47:44 +0000 (09:47 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 9 May 2025 05:50:39 +0000 (07:50 +0200)
By adding a `shell.nix` file in the root directory of the source,
NixOs (https://nixos.org/) users can get a ready for development
environment by simply running `nix-shell` from the source tree.

This is really convenient as the installation of needed packages
is just done as user and transparently for the user/developer.

Ticket: #7669

shell.nix [new file with mode: 0644]

diff --git a/shell.nix b/shell.nix
new file mode 100644 (file)
index 0000000..67db96b
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,46 @@
+let
+  pkgs = import <nixpkgs> {};
+
+in with pkgs;
+  pkgs.mkShell {
+    name = "suri-shell";
+
+    buildInputs = [
+      bash
+      cargo
+      rustc
+      rust-cbindgen
+      clang
+      libllvm
+      automake
+      autoconf
+      autogen
+      libtool
+      pkg-config
+      elfutils
+      jansson
+      libbpf_0
+      libcap_ng
+      libevent
+      libmaxminddb
+      libnet
+      libnetfilter_log
+      libnetfilter_queue
+      libnfnetlink
+      libpcap
+      libyaml
+      lz4
+      pcre2
+      vectorscan
+      zlib
+    ];
+
+    # the following is needed to be able to build ebpf files
+    hardeningDisable = [
+      "zerocallusedregs"
+    ];
+
+    #shellHook = ''
+    #    cargo install cbindgen
+    #'';
+}