Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac & Linux support of Flake template #1825

Open
peterbecich opened this issue Jan 6, 2023 · 3 comments
Open

Mac & Linux support of Flake template #1825

peterbecich opened this issue Jan 6, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request preserved Keep stale bot away

Comments

@peterbecich
Copy link
Contributor

peterbecich commented Jan 6, 2023

Is your feature request related to a problem? Please describe.
My understanding is that a haskell.nix Flake does not work in exactly the same way on Mac and Linux. Based on this comment #1401 (comment) and some testing, it looks like a haskell.nix Flake can be used on both Mac and Linux by:

  • modifying evalSystem
  • the --impure flag
    or
  • having a system with both Mac and Linux builders

Describe the solution you'd like
The haskell.nix Flake in this project https://github.com/input-output-hk/cicero-pipe appears to use a fourth solution. nix build and nix develop run on Mac and Linux, without using any of the three solutions above. I have tested this on an amd64-linux and amd64-mac.

The key may be the materialization: https://github.com/input-output-hk/cicero-pipe/tree/master/nix/materialized

Can the approach taken in the cicero-pipe Flake be copied into the haskell.nix Flake template, to improve the ease-of-use of the Flake template?

Additional context

Discussion about builtins.currentSystem: #1401

Thank you for this project, haskell.nix has been very useful to me!

@peterbecich
Copy link
Contributor Author

peterbecich commented Jan 24, 2023

I think the materialization in cicero-pipe prevents Mac/Linux errors in nix develop, nix build and nix run.

These issues concern nix flake show and nix flake check:

nix flake show should be filterable by the current system #6985
NixOS/nix#6985

nix flake check is running checks for all systems in checks #6806
NixOS/nix#6806

nix flake check breaks on IFD in multi-platform flake #4265
NixOS/nix#4265

PR:

nix flake show: don't evaluate derivations for foreign systems by default #6988
NixOS/nix#6988

@stale
Copy link

stale bot commented May 29, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 29, 2023
@hamishmack hamishmack added preserved Keep stale bot away and removed wontfix labels Jun 1, 2023
@hamishmack hamishmack self-assigned this Jun 1, 2023
@hamishmack
Copy link
Collaborator

Would it make sense to add ciEvalSystem (like evalSystem, but only for flake hydraJobs)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preserved Keep stale bot away
Projects
None yet
Development

No branches or pull requests

2 participants