Error when using gmic

Hi there!

I am trying to denoise photos. For that I am trying various software and among them, gmic. When using gmic, I get the following error for some of the commands:

gmic -input IMG.jpg -afre_denoise 1 -output IMG_gmic.jpg

[CImg] *** CImgDisplayException *** CImgDisplay(): No display available.
[gmic]-0./ Start G'MIC interpreter.
[gmic]-0./ Input file 'IMG.jpg' at position 0 (1 image 3840x2160x1x3).
[afre]^_^) denoise: Denoise image [0] using radius=1.
[gmic] *** Error in ./afre_denoise/*repeat/*local/*repeat/*repeat/afre_gui0_fast/*repeat/*local/ *** Unknown command or filename 'nm'; did you mean 'm'?

It seems it cannot find the command nm. I tried to install binutils in system packages, to not avail. I am not sure if this is a nix packaging issue or a gmic issue.
Any idea?
Thank you, have a great day!

I could confirm that the error does not come in another distribution, so I created an issue at gmic errors · Issue #218568 · NixOS/nixpkgs · GitHub