-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mlabs-haskell/avnik/scaffolding
scaffolding
- Loading branch information
Showing
14 changed files
with
545 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" | ||
fi | ||
nix_direnv_watch_file ./shell/default.nix flake.lock | ||
use flake -L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
# cardano.nix | ||
|
||
Collection of Cardano related NixOS modules, with a special focus on: | ||
|
||
- autogenerated documentation | ||
- comprehensive (NixOS) tests | ||
- an homogeneous module interface | ||
|
||
## Shell | ||
|
||
`cardano.nix` provides a shell that includes some useful aliases: | ||
|
||
- `fmt` formats the entire repository using [treefmt](https://github.com/numtide/treefmt) | ||
- `build-all` builds all the flake's outputs using [devour-flake](https://github.com/srid/devour-flake) | ||
- `check` simply stands for `nix flake check` | ||
|
||
A `.envrc` is also provided, using [direnv]() and [nix-direnv](https://github.com/nix-community/nix-direnv) is highly suggested. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{inputs, ...}: { | ||
perSystem = { | ||
pkgs, | ||
config, | ||
... | ||
}: { | ||
apps = { | ||
nix-build-all.program = pkgs.writeShellApplication { | ||
name = "nix-build-all"; | ||
runtimeInputs = [ | ||
(pkgs.callPackage inputs.devour-flake {}) | ||
]; | ||
text = '' | ||
# Make sure that flake.lock is sync | ||
nix flake lock --no-update-lock-file | ||
# Do a full nix build (all outputs) | ||
devour-flake . "$@" | ||
''; | ||
}; | ||
}; | ||
|
||
devshells.default.commands = [ | ||
{ | ||
category = "Tools"; | ||
name = "build-all"; | ||
help = "Build all the checks"; | ||
command = config.apps.nix-build-all.program; | ||
} | ||
{ | ||
category = "Tools"; | ||
name = "check"; | ||
help = "Alias of `nix flake check`"; | ||
command = "nix flake check"; | ||
} | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{inputs, ...}: { | ||
imports = [ | ||
inputs.hercules-ci-effects.flakeModule | ||
]; | ||
config.herculesCI.ciSystems = ["x86_64-linux" "x86_64-darwin"]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.