From 7b52a739c20c280e8cdf9e39087959c1f05641ab Mon Sep 17 00:00:00 2001 From: Priec Date: Mon, 28 Jul 2025 10:59:25 +0200 Subject: [PATCH] basic nix flake added --- flake.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dca5a36 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Komp AC - Kompress Accounting"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + # Rust toolchain + rustc + cargo + rustfmt + clippy + + # C build tools (for your linker issue) + gcc + binutils + pkg-config + ]; + + shellHook = '' + echo "🦀 Rust development environment loaded" + echo "Run 'cargo check' to verify everything works" + ''; + }; + } + ); +}