<p>It may be the case that you edited your nix.conf file after you launched nix-daemon.
You would need to kill and start the daemon again to pick up the updated nix.conf:</p>
<blockquote>
<p>$ sudo pkill nix-daemon</p>
</blockquote>
<p>and then</p>
<blockquote>
<p>$ sudo nix-daemon &amp;</p>
</blockquote>
<p>After that. Your non-root user will use substitutes.</p>
<p>source: <a href="https://docs.cachix.org/faq#why-is-nix-not-picking-up-on-any-of-the-pre-built-artifacts" rel="nofollow noreferrer">https://docs.cachix.org/faq#why-is-nix-not-picking-up-on-any-of-the-pre-built-artifacts</a></p>

CC BY-SA 4.0
2022-01-14T05:14:35.657Z
Welcome to Cardano SE! As a new user be sure to take the [Tour].
gRebel
CC BY-SA 4.0
2022-01-14T09:42:30.293Z
Thanks for your comments. I tried to solve this issue with various way so anyway I could solve this issue. But I'm not sure what make it run. anyway thanks for your help.
Tae Euy
CC BY-SA 4.0
2022-06-30T06:33:46.987Z
If your systems uses systemd to run services you can restart the daemon using
`sudo systemctrl restart nix-daemon.service`
Skelli
CC BY-SA 4.0
2022-01-13T17:57:54.240Z
2022-01-13T17:57:54.240Z
Sophos
<p>I'm preparing the Plutus Pioneer program and installing the environment.</p>
<p>After installing <code>nix</code> and updating the &quot;IOHK binary cache&quot;, I tried to do <code>nix build</code> but it seems that it is building and compiling <code>ghc</code> as shown below and it takes a very long time.</p>
<pre><code>MyMac$ nix build -f default.nix plutus.haskell.packages.plutus-core
trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
[1/1/619 built] building ghc-8.6.5 (buildPhase): clang-7: warning: argument unu
</code></pre>
<p>Current <strong>nix.conf</strong></p>
<pre><code>substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

sandbox = true
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env
extra-experimental-features = nix-command
build-users-group = nixbld
</code></pre>
<p>I found the following warning message:</p>
<blockquote>
<p>If you want to use Nix with this project, make sure to set up the IOHK
binary cache. If you do not do this, you will end up building GHC,
which takes several hours. If you find yourself building GHC, STOP and
fix the cache.</p>
</blockquote>
<p>Could you guide me how I can fix the cache?</p>
<p>Thanks in advance.</p>

CC BY-SA 4.0
2022-01-12T13:55:39.747Z
Is this on an m1 Mac? Binary cache doesn't have Mac arm binaries.
Samuel Leathers
CC BY-SA 4.0
2022-01-12T22:39:17.613Z
Thanks for your comment, please see below spec of mine. (1.1 GHz Intel Core M, MacBook (Retina, 12-inch, Early 2015) it is a little older one. I've remove all nix installation and install again, found something different log as below but still it is trying to building ghc-8.6.5
Tae Euy
CC BY-SA 4.0
2022-01-12T22:42:33.007Z
MyMac$ nix build -f default.nix docs.site
[1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: : [1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: [1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
[1/109/730 built, 434 copied (1193.3 MiB), 438.4 MiB DL] building ghc-8.6.5
(buildPhase): "inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_
Tae Euy
CC BY-SA 4.0
2022-02-21T23:05:22.560Z
I also saw `warning: ignoring untrusted substituter 'https://hydra.iohk.io'` with Nix in multi-user mode. It was fixed by specifying these substituters in `/etc/nix/nix.conf` rather than `~/.config/nix/nix.conf`. It appears Nix reads both of these configuration files, but does not trust the substituters in the latter.
Peter Becich
<nix><install>
Nix is building ghc during on nix build command (How to fix the cache?)
# Nix is building ghc during on nix build command (How to fix the cache?)

(Asked by: username_0 on 2022-01-12)

I'm preparing the Plutus Pioneer program and installing the environment.
After installing nix and updating the "IOHK binary cache", I tried to do nix build but it seems that it is building and compiling ghc as shown below and it takes a very long time.
MyMac$ nix build -f default.nix plutus.haskell.packages.plutus-core
trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
[1/1/619 built] building ghc-8.6.5 (buildPhase): clang-7: warning: argument unu

Current nix.conf
substituters        = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=

sandbox = true
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env
extra-experimental-features = nix-command
build-users-group = nixbld

I found the following warning message:

If you want to use Nix with this project, make sure to set up the IOHK
binary cache. If you do not do this, you will end up building GHC,
which takes several hours. If you find yourself building GHC, STOP and
fix the cache.

Could you guide me how I can fix the cache?
Thanks in advance.

**Tags:** nix, install
> **Comments:**
> **username_1**: Is this on an m1 Mac? Binary cache doesn't have Mac arm binaries.  
> **username_0**: Thanks for your comment, please see below spec of mine. (1.1 GHz Intel Core M, MacBook (Retina, 12-inch, Early 2015) it is a little older one. I've remove all nix installation and install again, found something different log as below but still it is trying to building ghc-8.6.5  
> **username_0**: MyMac$ nix build -f default.nix docs.site [1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: : [1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: [1/3/4 built, 134 copied (207.2 MiB), 185.9 MiB DL] building old-ghc-nix: trace: To materialize project.plan-nix for Agda entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'. [1/109/730 built, 434 copied (1193.3 MiB), 438.4 MiB DL] building ghc-8.6.5 (buildPhase): "inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_  
> **username_2**: I also saw `warning: ignoring untrusted substituter 'https://hydra.iohk.io'` with Nix in multi-user mode. It was fixed by specifying these substituters in `/etc/nix/nix.conf` rather than `~/.config/nix/nix.conf`. It appears Nix reads both of these configuration files, but does not trust the substituters in the latter.  

---

## 1 answers

### Answer by username_3 on 2022-01-13. Score: 4

It may be the case that you edited your nix.conf file after you launched nix-daemon.
You would need to kill and start the daemon again to pick up the updated nix.conf:

> $ sudo pkill nix-daemon

and then

> $ sudo nix-daemon &

After that. Your non-root user will use substitutes.

source: <https://docs.cachix.org/faq#why-is-nix-not-picking-up-on-any-of-the-pre-built-artifacts>

> **Comments:**
> **username_4**: Welcome to Cardano SE! As a new user be sure to take the [Tour].  
> **username_0**: Thanks for your comments. I tried to solve this issue with various way so anyway I could solve this issue. But I'm not sure what make it run. anyway thanks for your help.  
> **username_5**: If your systems uses systemd to run services you can restart the daemon using `sudo systemctrl restart nix-daemon.service`  

---

