From 4d371a93fe6d40521b590b738f2c5f656229c5b8 Mon Sep 17 00:00:00 2001 From: Christian Hoener zu Siederdissen Date: Fri, 21 Nov 2025 18:51:31 +0100 Subject: [PATCH] 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. Fixes #103 --- .github/workflows/ci-nix.yaml | 4 ++-- flake.lock | 18 +++++++++++++++++- flake.nix | 6 ++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-nix.yaml b/.github/workflows/ci-nix.yaml index 07d6f820..b242d8f4 100644 --- a/.github/workflows/ci-nix.yaml +++ b/.github/workflows/ci-nix.yaml @@ -55,6 +55,6 @@ jobs: nix build --accept-flake-config .#cip-143-cli nix build --accept-flake-config .#regulated-stablecoin-cli - name: nix flake check - run: nix flake --accept-flake-config check + run: nix flake check --accept-flake-config --override-input systems github:nix-systems/$(nix eval --impure --raw --expr 'builtins.currentSystem') - name: Check aiken - run: nix develop --accept-flake-config --command bash -c "cd src/examples/aiken/aiken && aiken build && aiken check" \ No newline at end of file + run: nix develop --accept-flake-config --command bash -c "cd src/examples/aiken/aiken && aiken build && aiken check" diff --git a/flake.lock b/flake.lock index 587574af..063cdb32 100644 --- a/flake.lock +++ b/flake.lock @@ -1745,7 +1745,8 @@ "nixpkgs": [ "haskell-nix", "nixpkgs" - ] + ], + "systems": "systems_7" } }, "rust-overlay": { @@ -1971,6 +1972,21 @@ "repo": "default", "type": "github" } + }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c8193199..a4acef8e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,13 +43,15 @@ url = "github:aiken-lang/aiken/v1.1.16"; inputs.nixpkgs.follows = "nixpkgs"; }; + + systems.url = "github:nix-systems/default"; }; - outputs = inputs: inputs.iogx.lib.mkFlake { + outputs = inputs@{systems, ...}: inputs.iogx.lib.mkFlake { inherit inputs; repoRoot = ./.; outputs = import ./nix/outputs.nix; - systems = [ "x86_64-linux" ]; # "x86_64-darwin" ]; + systems = (import systems); }; nixConfig = {