diff --git a/crystal/flake.nix b/crystal/flake.nix new file mode 100644 index 0000000..f26e9bd --- /dev/null +++ b/crystal/flake.nix @@ -0,0 +1,34 @@ +{ + description = "minimal flake for crystal dev"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; + + outputs = + inputs: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); + in + { + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShell { + packages = with pkgs; [ crystal ]; + }; + } + ); + }; +} diff --git a/flake.nix b/flake.nix index 7826f42..1464424 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,10 @@ path = ./odin; description = "odin template"; }; + crystal = { + path = ./crystal; + description = "crystal template"; + }; }; defaultTemplate = self.templates.go;