Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
[feat] nix
Browse files Browse the repository at this point in the history
  • Loading branch information
MangoIV committed Mar 10, 2024
1 parent b23084d commit afdf3fa
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 0 deletions.
1 change: 1 addition & 0 deletions servant-quickcheck/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake . -Lv
205 changes: 205 additions & 0 deletions servant-quickcheck/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions servant-quickcheck/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
nixConfig.allow-import-from-derivation = true;
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs = inputs:
inputs.parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
imports = [
inputs.haskell-flake.flakeModule
inputs.pre-commit-hooks.flakeModule
];

perSystem = {
config,
pkgs,
...
}: {
pre-commit = {
check.enable = true;
settings.hooks = {
cabal-fmt.enable = true;
stylish-haskell.enable = true;

alejandra.enable = true;
statix.enable = true;
deadnix.enable = true;
};
};
haskellProjects.default = {
packages = {};
settings = {};
devShell.mkShellArgs.shellHook = config.pre-commit.installationScript;
};
haskellProjects.ghc96 = {
packages = {};
settings = {};
devShell.mkShellArgs.shellHook = config.pre-commit.installationScript;
basePackages = pkgs.haskell.packages.ghc96;
};
};
};
}
2 changes: 2 additions & 0 deletions servant-quickcheck/hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cradle:
cabal:

0 comments on commit afdf3fa

Please sign in to comment.