2

I'm trying to get the exercises for week 1 of the plutus pioneer program working. I've installed nix and have set the IOHK caches.

When I try to run nix build -f default.nix plutus.haskell.packages.plutus-core in the plutus repo I get the following error:

 ❮❮❮ 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'.
builder for '/nix/store/gpkkaj0mcs6wxaknfjm0jh389x8l4gwb-plutus-core-0.1.0.0-coverage-report.drv' failed with exit code 65; last 1 log lines:
  sandbox-exec: pattern serialization length 71571 exceeds maximum (65535)
[0 built (1 failed), 0.0 MiB DL]

I'm running this command on commit ea0ca4e9f9821a9dbfc5255fa0f42b6f2b3887c4.

I've looked through the plutus community docs but haven't found any mention of this error.

Has anyone run into this before? What does this mean? Is there a known fix?

EDIT: this also happens on master at commit 8ce0d58c0a169f4c8a1104757502f342e750c863

3 Answers 3

1

I found this /etc/nix/nix.conf to work for my macOS i7 Monterey (v12.1).

It was recommended to turn the sandbox FALSE because 'not recommended' per Ref #1 below.

    build-users-group = nixbld
    
    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=volume
    
    sandbox = false
    extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env
    experimental-features = nix-command
    extra-experimental-features = flakes

References:

  1. CSE, @angerman, on macOS Monterey i7, what is the best nix.conf file to use?
  2. Github: Status of macOS support in Nixpkgs
  3. https://github.com/Til-D/cardano-plutus
  4. https://github.com/renzwo/cardano-plutus-apps-install-m1/blob/main/README.md
3
  • 1
    Answer could be improved by following these guidelines: How to reference material written by others
    – gRebel
    Jan 23, 2022 at 0:17
  • tracked down reference source and updated per comment.
    – TheStophe
    Jan 23, 2022 at 1:18
  • 1
    Well done, you get a whole upvote from me! Sorry I can't do more.
    – gRebel
    Jan 23, 2022 at 1:20
0

Figured it out. I'm on MacOS and some docs that I followed mentioned turning on the sandbox feature by adding

sandbox = true
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib /private/tmp /private/var/tmp /usr/bin/env

to /etc/nix/nix.conf.

Removing these two lines eliminated the error.

1
0

on debian distro, it works fine with all the details mentioned in developers forum. I built it on VS code debian distro with WSL2. its tricky as sometime u need to execute chmod command as it wont let u access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.