feat(repo): initialise repository
This commit is contained in:
commit
c85e45aaee
11 changed files with 237 additions and 0 deletions
39
flake.nix
Normal file
39
flake.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
description = "Haskell Project Template";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
treefmt.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
outputs =
|
||||
inputs@{ nixpkgs, ... }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
systems = [ "x86_64-linux" ];
|
||||
forAllSystems =
|
||||
f:
|
||||
lib.genAttrs systems (
|
||||
system:
|
||||
f {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
}
|
||||
);
|
||||
treefmtEval = forAllSystems ({ pkgs }: inputs.treefmt.lib.evalModule pkgs ./flake/treefmt.nix);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
{ pkgs }:
|
||||
{
|
||||
default = pkgs.callPackage ./flake/package.nix { };
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
{ pkgs }:
|
||||
{
|
||||
default = pkgs.callPackage ./flake/shell.nix { };
|
||||
}
|
||||
);
|
||||
formatter = forAllSystems ({ pkgs }: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue