Add flake.nix

This commit is contained in:
Christian
2023-09-22 16:09:57 +02:00
parent 3913e4c902
commit 0402af987a
2 changed files with 53 additions and 0 deletions

27
flake.nix Normal file
View File

@@ -0,0 +1,27 @@
{
description = "Advent Of Code 2022";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
forAllSystems = function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-darwin"
] (system: function nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (pkgs: with pkgs; {
default = mkShell {
buildInputs = [ ghc cabal-install haskell-language-server ];
};
});
};
}