From 70a8d1cab484248326793bed1fa30b1365c64119 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 18 Feb 2023 23:55:12 +0100 Subject: it\'s fuzzing --- flake.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..18b4180 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + description = "Nix pwn env"; + nixConfig.bash-prompt = "\[pwn\]; "; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + # Flake outputs + outputs = { self, nixpkgs }: + let + # Systems supported + allSystems = [ + "x86_64-linux" # 64-bit Intel/AMD Linux + "aarch64-linux" # 64-bit ARM Linux + "x86_64-darwin" # 64-bit Intel macOS + "aarch64-darwin" # 64-bit ARM macOS + ]; + + # Helper to provide system-specific attributes + nameValuePair = name: value: { inherit name value; }; + genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names); + forAllSystems = f: genAttrs allSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + # Development environment output + devShells = forAllSystems ({ pkgs }: { + default = + let + python = pkgs.python311; # Use Python 3.11 + in + pkgs.mkShell { + packages = [ # The Nix packages provided in the environment + + # Python plus helper tools + (python.withPackages (ps: with ps; [ + virtualenv # Virtualenv + pip # The pip installer + pwntools # The pip installer + ])) + + ]; + }; + }); + }; +} -- cgit 1.4.1