Skip to content

Commit

Permalink
Merge pull request #56 from Liqwid-Labs/emiflake/hercules
Browse files Browse the repository at this point in the history
Hercules configuration support
  • Loading branch information
emiflake authored Mar 22, 2023
2 parents c2631a1 + 94b6c12 commit c763f91
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This format is based on [Keep A Changelog](https://keepachangelog.com/en/1.0.0).

## 2.7.2 - 2023-03-22

- Enable Hercules CI support.

## 2.7.1 - 2023-03-17

- Remove uses of `ifEnable`.
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

16 changes: 4 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};

outputs = inputs@{ flake-parts, ... }:
outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./nix/templates.nix
Expand Down Expand Up @@ -66,18 +66,10 @@
find -name '*.nix' -not -path './dist*/*' -not -path './haddock/*' | xargs nixpkgs-fmt
'';
};
flake = { self, ... }: {
config.hydraJobs = {
packages = self.packages.x86_64-linux;
checks = self.checks.x86_64-linux;
devShells = self.devShells.x86_64-linux;
};
config.herculesCI = { ... }: {
onPush.default = {
outputs = { ... }:
self.checks.x86_64-linux;
};
flake = { ... }: {
config.herculesCI = {
ciSystems = [ "x86_64-linux" ];
onPush.default.outputs = self.checks.x86_64-linux;
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion nix/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
onchain = ./onchain.nix;
offchain = ./offchain.nix;
run = ./run.nix;
ci = ./ci.nix;
ci = ./ci-config.nix;
};
in
{
Expand Down
11 changes: 11 additions & 0 deletions nix/ci.nix → nix/ci-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ in
);
};
config = {
# NOTE(Emily, 22 Mar 2023): Here we provide sensible defaults for working with liqwid-nix.
# These can be overwritten by the user, though. In the future, we may want some out-of-the-
# -box implementation for enabling this somehow.
flake = { ... }: {
# Added in: 2.7.2.
config.herculesCI = {
ciSystems = [ "x86_64-linux" ];
onPush.default.outputs = self.checks.x86_64-linux;
onPush.required.outputs = self.checks.x86_64-linux.required;
};
};
perSystem = { config, self', inputs', pkgs, system, ... }:
let
pkgs = import self.inputs.nixpkgs {
Expand Down

0 comments on commit c763f91

Please sign in to comment.