NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.4k stars 13.62k forks source link

nim missing arm64 aupport #208466

Closed shish closed 1 year ago

shish commented 1 year ago

Steps To Reproduce

Steps to reproduce the behavior: nix-shell -p nim

Build log

these 4 derivations will be built:
  /nix/store/7d115dfnys4yd7va7iv3pl62gv7k0v20-nim-bootstrap-1.6.10.drv
  /nix/store/bd1lkqdwskaj79najb842y5m6v16kab3-nim-unwrapped-1.6.10.drv
  /nix/store/s7svza8wg2hqq3yav3haacr2yz4s8gpa-nimble-unwrapped-0.13.1.drv
  /nix/store/bn8h3f3mha4v15wvvhnvcphcpn16d7zb-aarch64-apple-darwin-nim-wrapper-1.6.10.drv
building '/nix/store/7d115dfnys4yd7va7iv3pl62gv7k0v20-nim-bootstrap-1.6.10.drv'...
unpacking sources
unpacking source archive /nix/store/56m48614j3lxn4g76il53khw06rcdhcr-nim-1.6.10.tar.xz
source root is nim-1.6.10
setting SOURCE_DATE_EPOCH to timestamp 1668992661 of file nim-1.6.10/doc/nimdoc.css
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: -j10 SHELL=/nix/store/49wn01k9yikhjlxc1ym5b6civ29zz3gv-bash-5.1-p16/bin/bash
makefile:167: *** unknown CPU architecture: arm64 See makefile.nimf.  Stop.

Additional context

MacBook M1

Somehow the 1.6.10 in homebrew works, and the 1.6.10 installed via choosenim works, but 1.6.10 installed via nix fails

The v1.6.10 git tag is indeed missing support for arm64, so I'm not sure how the other two manage to work, but it looks like the devel branch has added this code:

https://github.com/nim-lang/Nim/blob/v1.6.10/tools/niminst/makefile.nimf https://github.com/nim-lang/Nim/blob/devel/tools/niminst/makefile.nimf

ifeq ($(ucpu),arm64)
  mycpu = arm64
endif

Notify maintainers

@ehmry I think? The instructions say to use meta.maintainers but it doesn't tell me how to find that information...

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.2.0, macOS 13.1, Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000, noversion, nobuild`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixpkgs"`
 - channels(shish2k): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
wegank commented 1 year ago

This should have been resolved by #204028, as indicated on Hydra. Have you updated your nixpkgs channel?

shish commented 1 year ago

nix-channel --update fixed it, I didn't realise that that was a necessary or useful thing to do - sorry for the noise :)