question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mach-nix flake is not working on my end, an infinite recursion error is being thrown:

See original GitHub issue

Greetings,

I’m currently using mach-nix in a shell.nix setup, which is working great, because I can now use nix to run Python packages that I didn’t have access to before. But, for some reason the mach-nix( https://github.com/DavHau/mach-nix/blob/master/examples.md#use-mach-nix-from-a-flake ) in the examples section is not working on my end, I’m getting an infinite recursion error thrown? So, I’m just checking to see if anyone else is getting this error, if not, then that means that there’s something wrong with my config.

I’m using (direnv+nix-direnv+emacs-direnv), so getting a mach-nix flake working with this setup would be really nice.

nix-shell -p nix-info --run “nix-info -m”

  • system: "aarch64-darwin"
  • host os: Darwin 21.2.0, macOS 12.1
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.4
  • channels(apple): ""
  • channels(root): "darwin, home-manager, nixpkgs-unstable-21.11pre311289.503209808cd, nixpkgs-21.11pre309670.253aecf69ed"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

nix develop
error: infinite recursion encountered

   at /nix/store/vbsi61gndh5p7kc3ngwh672kl0zpv6wh-source/flake.nix:17:20:

       16|         pkgs = nixpkgs.legacyPackages."${system}";
       17|         mach-nix = mach-nix.lib."${system}";
         |                    ^
       18|       in {

(use ‘–show-trace’ to show detailed location information)

Thanks in advance for the help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Nebucatnetzercommented, Jan 31, 2022

I’m glad it worked you 😃 Might be an idea but I’m not experienced enough to tell if it’s just a problem with the packages I’m trying to use or the example is really outdated.

1reaction
Nebucatnetzercommented, Jan 31, 2022

No problem I had to fix another problem #389 but this is the working version. https://github.com/Nebucatnetzer/network_inventory/blob/dev/flake.nix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Infinite recursion encountered when using an overlay #172
Hello! I'm getting an infinite recursion error when using the following overlay: { pkgs ? (import {}), lib ? (import {}).lib, mach-nix ?...
Read more >
Help needed with infinite recursion error : r/NixOS - Reddit
The error comes from the renderSettings function. I evaluated it with nix eval -f test.
Read more >
Infinite recursion when referring to pkgs.system from Nix ...
In order for the module system to construct the configuration, it needs to know which config and options items exist, at least to...
Read more >
Infinite recursion when composing overlays - NixOS Discourse
(I first saw this pattern used in jwiegley's nix-config). I'm running into trouble when I want to compose multiple overlays in a single...
Read more >
Our Roadmap for Nix - Hacker News
Another big thing, Nix has Flakes, which make it trivially to turn all your Git ... But the big problem in the end...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found