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

Apple M1 issue #355

Closed
anandsuresh opened this issue Aug 5, 2022 · 9 comments
Closed

Apple M1 issue #355

anandsuresh opened this issue Aug 5, 2022 · 9 comments

Comments

@anandsuresh
Copy link

Seeing this error running nix v2.10.3 on an Apple M1 Mac. Please do let me know what additional information I can provide to help debug this issue.

error: cycle detected in build of '/nix/store/m2g27f6hqz71lh9g0sbp2zn5mcdkrqyq-niv-0.2.19.drv' in the references of output 'bin' from output 'out'
@nmattia
Copy link
Owner

nmattia commented Aug 9, 2022

Seems to be the same as #343 and #332 and NixOS/nixpkgs#155722, right?

@thedavidmeister
Copy link

yeah i get that too, and heard others with it

setting the system to x86_64-darwin helps with niv but then causes other issues for me because the system is really aarch64-darwin

@purcell
Copy link

purcell commented Jan 13, 2023

Odd, I had niv working fine on this arch until a few weeks ago, then presumably as the result of a routine nixpkgs (unstable) bump in my config, I started getting this issue.

@nmattia
Copy link
Owner

nmattia commented Jan 21, 2023

Same here, recent nixpkgs update causes this again

@nmattia
Copy link
Owner

nmattia commented Feb 8, 2023

This is an upstream issue in nixpkgs:

And here's a workaround:

  niv =
    let
      # Workaround for https://github.com/NixOS/nixpkgs/issues/140774
      fixCyclicReference = drv:
        pkgs.haskell.lib.overrideCabal drv (_: {
          enableSeparateBinOutput = false;
        });
    in
    fixCyclicReference pkgs.haskellPackages.niv;

I'll close this ticket but please go and make some noise on the ticket upstream!

@nmattia nmattia closed this as completed Feb 8, 2023
@ostrolucky
Copy link

I'm nix beginner and I have no idea where to put that snippet of code

@anandsuresh
Copy link
Author

I assume the intent is to use this code as an overlay when instantiating nixpkgs?

@nmattia
Copy link
Owner

nmattia commented Feb 10, 2023

Not necessarily, you can use it anywhere you'd normally use pkgs.niv: https://github.com/nmattia/homies/blob/4d2f7828c926bf1a3d9030d967f430a17d3b8048/packages.nix#L44-L52

@ostrolucky
Copy link

I assume the intent is to use this code as an overlay when instantiating nixpkgs?

No, intent is to install niv CLI, so I can run eg. niv add command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants