summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorIan McFarlane <i.mcfarlane2002@gmail.com>2025-03-27 15:01:55 -0400
committerIan McFarlane <i.mcfarlane2002@gmail.com>2025-03-27 15:01:55 -0400
commitb4a88625672a2c2fc2703abed5d8565b95b86b1d (patch)
treeb60ba960ebf5c2f0a35fe1a32ed3da9febee2129 /flake.nix
parentcpu_reset prints at start, not usefull (diff)
downloadcomus-b4a88625672a2c2fc2703abed5d8565b95b86b1d.tar.gz
comus-b4a88625672a2c2fc2703abed5d8565b95b86b1d.tar.bz2
comus-b4a88625672a2c2fc2703abed5d8565b95b86b1d.zip
added flake environment
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix39
1 files changed, 39 insertions, 0 deletions
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;
+ });
+}