mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 21:42:16 -06:00
chore: init
This commit is contained in:
commit
1b2c1ea359
891 changed files with 37053 additions and 0 deletions
57
templates/haskell/flake.nix
Executable file
57
templates/haskell/flake.nix
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
description = "Haskell Environment";
|
||||
|
||||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ inputs.treefmt-nix.flakeModule ];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
hp = pkgs.haskellPackages;
|
||||
project = hp.callCabal2nix "project" ./. { };
|
||||
in
|
||||
{
|
||||
devShells.default = hp.shellFor {
|
||||
nativeBuildInputs = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
nil
|
||||
stylish-haskell
|
||||
ghc
|
||||
;
|
||||
inherit (hp)
|
||||
cabal-install
|
||||
cabal-gild
|
||||
haskell-language-server
|
||||
;
|
||||
};
|
||||
packages = _: [ project ];
|
||||
};
|
||||
|
||||
packages.default = project;
|
||||
|
||||
treefmt = {
|
||||
programs = {
|
||||
cabal-fmt.enable = true;
|
||||
deadnix.enable = true;
|
||||
hlint.enable = true;
|
||||
nixfmt.enable = true;
|
||||
ormolu.enable = true;
|
||||
statix.enable = true;
|
||||
typstyle.enable = true;
|
||||
yamlfmt.enable = true;
|
||||
};
|
||||
projectRootFile = "flake.nix";
|
||||
};
|
||||
};
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue