The command
nix run git+https://codeberg.org/jacg/rust-darwin-flake#hdf
gives inconsistent results.
When successful, it prints
Managed to write and read an HDF5 table.
on standard out.
-
On (a particular machine using) apple silicon running Big Sur, it fails with
error: cannot find flake attribute 'git+https://codeberg.org/jacg/rust-darwin-flake#hdf'
but it succeeds on apple silicon running Monterey. I’m not saying that the difference between OSes is responsible, but I’ve tried to eliminate all other differences, such as Nix versions. The machine where it fails, was originally running Nix 2.4, but that was wiped completely and replaced with Nix 2.6, to match the two Monterey M1s on which I tried it.
edit: This machine has no problem running flakes via the
github
protocol.edit 2: This appears to have been caused by Rosetta implicitly picking
x86_64-darwin
while the flake only supportedx86_64-linux
andaarch64-darwin
. Addingx86_64-darwin
to the flake makes this problem go away. -
On non-NixOS Linux running nix 2.4, it errors with
error: store path '/nix/store/djgknz8041ckabqfsz335vwlgx4n0jap-nixified-rust-project-crate2nix' is not allowed to have references
The
crate2nix
-not allowed to have references
combination seems to be a bug innixpkgs-21.11
that has been torturing me quite a bit recently. I am not aware of any workaround besides usingnixpkgs-unstable
. I do not have admin rights on this machine, but I would hope that usingnixpkgs-unstable
in the flake itself would suffice.edit: This machine, too, has no problem running flakes via the
github
protocol.
Can you give any insight into what might be going on here?