From b4a88625672a2c2fc2703abed5d8565b95b86b1d Mon Sep 17 00:00:00 2001 From: Ian McFarlane Date: Thu, 27 Mar 2025 15:01:55 -0400 Subject: added flake environment --- flake.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a136a17 --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "systems programming x86"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + nixpkgs, + flake-utils, + ... + }: let + supportedSystems = let + inherit (flake-utils.lib) system; + in [ + system.aarch64-linux + system.x86_64-linux + ]; + in + flake-utils.lib.eachSystem supportedSystems (system: let + pkgs = import nixpkgs {inherit system;}; + in { + devShell = + pkgs.mkShell + { + packages = with pkgs; [ + # (writeShellScriptBin "build" "zig build -Dcpu=baseline") + gnumake + gdb + valgrind + zig_0_14 + qemu + ]; + }; + + formatter = pkgs.alejandra; + }); +} -- cgit v1.2.3-freya