diff options
1 files changed, 31 insertions, 0 deletions
| -rw-r--r-- | flake.nix | 31 |
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f6e5e01 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + }; + + outputs = { nixpkgs, ... }: + let + # Taken from lib.systems.doubles.all + systems = [ "x86_64-linux" "aarch64-linux" ]; + + inherit (nixpkgs) lib; + + forAllSystems = config: + lib.foldl + lib.recursiveUpdate + {} + (builtins.map + (system: + builtins.mapAttrs + (_: value: { ${system} = value; }) + (config (import nixpkgs { inherit system; }))) + systems); + + in forAllSystems (pkgs: { + devShells.default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + cargo + ]; + }; + }); +} |
