diff --git a/flake.nix b/flake.nix index 11d1575..97bfd6b 100644 --- a/flake.nix +++ b/flake.nix @@ -7,10 +7,32 @@ value = import "${base}/${name}"; }) (builtins.readDir base); + sdk = fetch: fetch { + owner = "NessieCircuits"; + repo = "Riotee_SDK"; + tag = "v1.2.0"; + hash = "sha256-1ZFvbGiTzAuBnKGUe/MAAI4D+d+jl/LCLcYqthkxB5M="; + }; + packages = let packages = scan ./packages; in system: pkgs: builtins.mapAttrs (_: fn: pkgs.callPackage fn {}) packages; + + devShells = system: pkgs: { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + self.packages.${system}.riotee-probe + gnumake + gcc-arm-embedded + ]; + shellHook = '' + export RIOTEE_SDK_ROOT="${sdk pkgs.fetchFromGitHub}" + ''; + }; + }; + in { packages = builtins.mapAttrs packages nixpkgs.legacyPackages; + devShells = builtins.mapAttrs devShells nixpkgs.legacyPackages; }; }