Skip to content

Commit

Permalink
Try to fix OS X workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserhkj committed Jul 20, 2024
1 parent 1bae839 commit 6566927
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
# run: nix-shell --run echo

- continue-on-error: false
run: nix flake check --allow-import-from-derivation
run: nix flake check --allow-import-from-derivation --impure
10 changes: 3 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"aarch64-linux"
"aarch64-darwin"
];
# For `nix flake show` and `nix flake check`
# Requires --impure, on pure evaluation we default to x86_64-linux
currentPlatform = builtins.currentSystem or "x86_64-linux";
in
flake-utils.lib.eachSystem supportedSystems (system:
let
Expand All @@ -40,8 +37,6 @@
compiler-nix-name = ghcVersion; # Version of GHC to use
# Use the corresponding stack configuration as well
stackYaml = value;
# For `nix flake show` to work:
evalSystem = currentPlatform;
# Tools to include in the development shell
shell.tools = {
cabal = "latest";
Expand All @@ -61,7 +56,8 @@
# Disable check for doctests
packages.BNFC.components.tests.doctests.doCheck = false;
}];
};
# For `nix flake show --impure` and `nix flake check --impure` to work
} // ( if (builtins ? currentSystem) then {evalSystem = builtins.currentSystem;} else {});
}) supportedGHCStackFile
)
];
Expand All @@ -75,7 +71,7 @@
# defined for all platforms, which can cause check failures (see issue NixOS/nix#6453)
# For `nix flake check` to work, filter out all hydrajobs that are not for the current platform
# Note that on non x86_64-linux platforms --impure is required to pick up the correct platform names
flake = if system == currentPlatform
flake = if system == (builtins.currentSystem or "x86_64-linux")
then allFlake
else builtins.removeAttrs allFlake ["hydraJobs"];
in flake // {
Expand Down

0 comments on commit 6566927

Please sign in to comment.