You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a Haskell project built with haskell.nix. We want flake outputs and hydra builds for Linux and Darwin. Flake outputs are fine, just use perSystem or the equivalent functionality in flake-utils. But Hydra presents a problem.
Hydra jobs are evaluated once for all systems, on a Linux machine. So if we have the hydraJobs just build all of the packages, we'll run into a problem with the IFD of haskell.nix: It will require a Darwin builder at evaluation time, which may not be available then and certainly will be slow. haskell.nix does allow you to specify an evalSystem for your project evaluation, but if we set the evalSystem unconditionally to Linux then local darwin users will not be able to evaluate the flake outputs.
My current approach to solving this is to define a function taking systemandevalSystem, with the latter defaulting to the former, then call the function just setting system for each system's packages but call it setting each system but the Linux evalSystem when building hydraJobs.
Could flake-parts give us some general way to do this? Maybe some kind of general way to re-call self with an extra module, or alternatively have perSystem be callable twice somehow?
The text was updated successfully, but these errors were encountered:
Consider a Haskell project built with
haskell.nix
. We want flake outputs and hydra builds for Linux and Darwin. Flake outputs are fine, just useperSystem
or the equivalent functionality inflake-utils
. But Hydra presents a problem.Hydra jobs are evaluated once for all systems, on a Linux machine. So if we have the
hydraJobs
just build all of thepackages
, we'll run into a problem with the IFD ofhaskell.nix
: It will require a Darwin builder at evaluation time, which may not be available then and certainly will be slow.haskell.nix
does allow you to specify anevalSystem
for your project evaluation, but if we set theevalSystem
unconditionally to Linux then local darwin users will not be able to evaluate the flake outputs.My current approach to solving this is to define a function taking
system
andevalSystem
, with the latter defaulting to the former, then call the function just settingsystem
for each system'spackages
but call it setting eachsystem
but the LinuxevalSystem
when buildinghydraJobs
.Could flake-parts give us some general way to do this? Maybe some kind of general way to re-call
self
with an extra module, or alternatively haveperSystem
be callable twice somehow?The text was updated successfully, but these errors were encountered: