Skip to content

Commit

Permalink
use defaultSystems in simpleFlake.nix
Browse files Browse the repository at this point in the history
Keep the list of systems in sync by passing the list around.

Fixes #54
  • Loading branch information
zimbatm committed May 12, 2022
1 parent a4b154e commit 0d347c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ let
};

# This function tries to capture a common flake pattern.
simpleFlake = import ./simpleFlake.nix { inherit lib; };
simpleFlake = import ./simpleFlake.nix { inherit lib defaultSystems; };

# Helper functions for Nix evaluation
check-utils = import ./check-utils.nix;
Expand Down
6 changes: 4 additions & 2 deletions simpleFlake.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ lib }:
{ lib
, defaultSystems ? [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]
}:
# This function returns a flake outputs-compatible schema.
{
# pass an instance of self
Expand All @@ -18,7 +20,7 @@
, # maps to the devShell output. Pass in a shell.nix file or function.
shell ? null
, # pass the list of supported systems
systems ? [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]
systems ? defaultSystems
}:
let
loadOverlay = obj:
Expand Down

0 comments on commit 0d347c5

Please sign in to comment.