Skip to content

Commit 3d1c63b

Browse files
committed
Adds explicit "systems" input to flake.nix
* Enables building on supported architectures. * Prevents github from breaking due to unsupported systems by limiting the nix flake check to the current system architecture.
1 parent 3164887 commit 3d1c63b

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.github/workflows/ci-nix.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ jobs:
5555
nix build --accept-flake-config .#cip-143-cli
5656
nix build --accept-flake-config .#regulated-stablecoin-cli
5757
- name: nix flake check
58-
run: nix flake --accept-flake-config check
58+
run: nix flake check --accept-flake-config --override-input systems github:nix-systems/$(nix eval --impure --raw --expr 'builtins.currentSystem')
5959
- name: Check aiken
60-
run: nix develop --accept-flake-config --command bash -c "cd src/examples/aiken/aiken && aiken build && aiken check"
60+
run: nix develop --accept-flake-config --command bash -c "cd src/examples/aiken/aiken && aiken build && aiken check"

flake.lock

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@
4343
url = "github:aiken-lang/aiken/v1.1.16";
4444
inputs.nixpkgs.follows = "nixpkgs";
4545
};
46+
47+
systems.url = "github:nix-systems/default";
4648
};
4749

48-
outputs = inputs: inputs.iogx.lib.mkFlake {
50+
outputs = inputs@{systems, ...}: inputs.iogx.lib.mkFlake {
4951
inherit inputs;
5052
repoRoot = ./.;
5153
outputs = import ./nix/outputs.nix;
52-
systems = [ "x86_64-linux" ]; # "x86_64-darwin" ];
54+
systems = (import systems);
5355
};
5456

5557
nixConfig = {

0 commit comments

Comments
 (0)