diff options
| author | seth <[email protected]> | 2023-07-03 23:54:18 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-07-04 00:05:04 -0400 |
| commit | 369eb89ea18250bad1b3ef73280b7683ee1c6f93 (patch) | |
| tree | 8cc728a4db0e6431b5320295e0ddbdd9a6ab1d2b /flake.nix | |
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3f75ebc --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "cool calculators"; + + inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; + + outputs = {nixpkgs, ...}: let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = nixpkgs.lib.genAttrs systems; + nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); + + forEachSystem = fn: + forAllSystems (system: + fn { + inherit system; + pkgs = nixpkgsFor.${system}; + }); + in { + devShells = forEachSystem ({pkgs, ...}: { + default = pkgs.mkShell { + packages = with pkgs; [ + ghc + haskellPackages.runghc + jdk17_headless + ldc + rustc + swift + ]; + }; + }); + + formatter = forEachSystem ({pkgs, ...}: pkgs.alejandra); + }; +} |
