From ab8357484a4aae0c962ad1d4efe3c5759345020b Mon Sep 17 00:00:00 2001 From: chris bell Date: Fri, 23 Oct 2026 15:43:29 -0500 Subject: [PATCH] Adding inital flake and gitignore --- .gitignore | 7 +++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..858f26f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.direnv/ +.envrc + +compile_commands.json + +build/ + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..886d2d9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1792502884, + "narHash": "sha256-IoNisKcGbUjdd45qCqywGMCYmZ5EnkxezvLII0FWwNA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "02c087f3fe673c9e317f206a627cb6b910336dbe", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..db05232 --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = "VSSM dev environment"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "aarch64-linux" ]; + forAllSystems = f: + nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system}); + in + { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } { + nativeBuildInputs = with pkgs; [ + cmake + ninja + pkg-config + clang-tools + gdb + valgrind + ]; + + buildInputs = with pkgs; [ + boost + curl + libarchive + openssl + zlib + zstd + nlohmann_json + spdlog + cli11 + # dotnet-runtime_8 + ]; + + shellHook = '' + export CMAKE_EXPORT_COMPILE_COMMANDS=1 + ''; + }; + }); + }; +}