From 90a08ecfc311473ff21d4d486e36eb8ef44d0dac Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Thu, 17 Apr 2025 09:47:44 +0200 Subject: [PATCH] misc: add a shell.nix file 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 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000000..67db96bd66 --- /dev/null +++ b/shell.nix @@ -0,0 +1,46 @@ +let + pkgs = import {}; + +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 + #''; +}