Repository navigation
Description
Nixpkgs version
- Stable (25.05)
Describe the bug
When I try to add the haskellPackages.slugger package as a dependency to ihp in my cabal file (which is consumed via callCabal2nix), I get the following error during build:
�[;1m<no location info>: �[;1m�[31merror�[0m�[0m�[;1m:�[0m�[0m�[;1m
dlopen(/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib, 0x0005): tried: '/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (no such file), '/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (no such file), '/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))�[0m�[0m
[18 of 84] Compiling IHP.Breadcrumb.Types ( IHP/Breadcrumb/Types.hs, dist/build/IHP/Breadcrumb/Types.o, dist/build/IHP/Breadcrumb/Types.dyn_o )
�[;1m<no location info>: �[;1m�[31merror�[0m�[0m�[;1m:�[0m�[0m�[;1m
dlopen(/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib, 0x0005): tried: '/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (no such file), '/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (no such file), '/usr/local/Cellar/icu4c/72.1/lib/libicuuc.72.1.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64e.v1' or 'arm64' or 'arm64'))�[0m�[0m
It seems text-icu (a dependency of slugger) is causing this. Somehow it tries to load a x64 icu on my aarch64 system:
> file /nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib
/nix/store/0p03dg77bwd38gahn9qj68ai8dprq85k-ihp-1.4.0/lib/links/libicuuc.dylib: symbolic link to /usr/local/opt/icu4c/lib/libicuuc.dylib
Interestingly I can build slugger just fine as a standalone package:
cd nixpkgs
nix build .#haskellPackages.slugger
./result/bin/slugger test
It seems that either something is wrong with the text-icu package, or the callCabal2nix is somehow passing the wrong pkgs.icu to the ihp package.
Update: Interestingly the issue doesn't happen on a different Mac. So it's only my machine. But then this means some part of the nix sandboxing/isolation is not working as expected.
Steps to reproduce
Add the slugger to a cabal file and then use cabal2nix.
Expected behaviour
It should work
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
- system:
"aarch64-darwin" - host os:
Darwin 25.1.0, macOS 26.1 - multi-user?:
yes - sandbox:
no - version:
nix-env (Determinate Nix 3.12.1) 2.32.1 - channels(root):
"nixpkgs" - nixpkgs:
/nix/store/ipyw6f3ah05zxy1imaydg5bmr8qmsiyc-source
Are you using nix-darwin?
Yes, I am using nix-darwin.
Notify maintainers
@sternenseemann do you have any ideas what could be causing this?
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Activity
mpscholten commentedon Nov 16, 2025
I figured it out. I had an old home-brew version on my Mac.
text-icuhas a cabal flag that defaults to true that makes it pick uphomebrewpaths for icu:I fixed this by deleting homebrew.
I'll try to fix this by passing homebrew=false when building via nixpkgs.