diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8077958 --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1753399495, + "narHash": "sha256-7XG/QBqhrYOyA2houjRTL2NMa7IKZZ/somBqr+Q/6Wo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0d00f23f023b7215b3f1035adb5247c8ec180dbc", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c78027a --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "devshell"; + + outputs = + { nixpkgs, ... }: + let + forAllSystems = + f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (s: f nixpkgs.legacyPackages.${s}); + in + { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + stdenv.cc.cc + arduino-cli + platformio + ]; + + LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; + ARDUINO_CONFIG_FILE = "./arduino-cli.yaml"; + }; + }); + }; +}