Skip to content

Commit 938e56d

Browse files
authored
Merge pull request #105 from mlabs-haskell/szg251/rust-prelude
Create a Rust runtime for LB Prelude
2 parents c1323f3 + 33959dc commit 938e56d

18 files changed

+1542
-324
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
nix_direnv_watch_file ./pre-commit.nix
12
use flake .#default

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ result
1414
**/.spago
1515
**/.spago2nix
1616
**/dist
17-
**/output
17+
**/output
18+
.DS_Store

extras/pre-commit-hooks-extra.nix

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{ inputs, ... }: {
2+
imports = [
3+
inputs.pre-commit-hooks.flakeModule # Adds perSystem.pre-commit options
4+
];
5+
perSystem = { pkgs, ... }:
6+
let
7+
rustfmt = pkgs.rust-bin.stable.latest.rustfmt;
8+
in
9+
{
10+
pre-commit.settings.hooks = {
11+
rustfmt-monorepo =
12+
{
13+
name = "rustfmt";
14+
description = "Format Rust code.";
15+
entry = "${rustfmt}/bin/rustfmt --color always";
16+
files = "\\.rs$";
17+
};
18+
};
19+
};
20+
}

0 commit comments

Comments
 (0)