Nix develop on macbook m1

I am trying to run nix develop on a repository on my m1 equipped macbook. Specifically the https://github.com/rust-skia/rust-skia repository. (according to the commit log it should work with m1)
But when I do I get this error:

error: flake 'git+file:///Users/mbust/Projects/rust-skia' does not provide attribute 'devShells.aarch64-darwin.default', 'devShell.aarch64-darwin', 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin'
       Did you mean devShell?

I have no Idea how to interpret this. Am I missing an input for my system flake?
Or do I need to make changes to their flake.nix?

They are using devShell.$system which has been deprecated with nix 2.7 or so. Might be that 2.9 finally dropped it.

They should use devShells.$system.default instead.

They probably followed the tutorial on the wiki.
https://nixos.wiki/wiki/Flakes#Super_fast_nix-shell

What do I need to change in their flake.nix to make this work?

Which was absolutely correct 16 months ago when the flake.nix got touched for the last time.

And the wiki probably did not got updated in the last 4 weeks since the release of 2.9

edit I adjusted the wikis example and I hope I got the flake utils stuff correct

2 Likes

Removing the flake.lock file finally did the trick.
Now what remains is to see if it builds with the new deps.

1 Like