2

I have finally got the plutus-playground running on 2 separate machines. Each machine is a Mac running Catalina 10.15.7.

After extensive trial and error (some self inflicted) I have identified several points of confusion in the instructions provided, and other tips and suggestions. I hope this is helpful.

There are 3 installation instructions I drew from. None appear to be completely correct.

  • https://docs.plutus-community.com/docs/setup/MacOS.html
  • https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/installing-nix
  • https://www.reddit.com/r/cardano/comments/mmzut6/macos_plutus_playground_build_instructions/

So here is what I learned.
  1. Anywhere you are advised to restart your machine, DO restart your machine. Anywhere you are advised to exit your shell, restart your machine. Ten extra reboots is easier than an unwanted GHC build or a nix-shell fail.
  2. After installing Nix, and after restarting your machine, I suggest running these 3 commands to confirm with a modicum of comfort that all is well.
    nix doctor --verbose
    nix --version
    nix --help > nix_help.txt
    That last one is to retain the help for later review.
  3. The client and server files are NOT in
    https://github.com/input-output-hk/plutus
    but are instead in
    https://github.com/input-output-hk/plutus-apps
    Thank you to nyk and ironhand89 for pointing this out.

    BOTH repositories should be cloned to your local directory, as follows:

    git clone https://github.com/input-output-hk/plutus.git
    git clone https://github.com/input-output-hk/plutus-apps.git
    In addition, I found that then running git pull from within each directory helped. There was a 4-6 hour gap from when I cloned to when I ... did more, so maybe some files were updated during that time.
    cd plutus
    git pull
    cd ../plutus-apps
    git pull
  4. It seems that certain things that failed when invoked from zsh worked correctly when invoked from bash. This especially seems to have gotten me past the
    [$] nix-build -A plutus-pab
    roadblock. I suggest doing all of this work in bash.
  5. I needed to invoke this before I found joy:
    cd plutus-apps
    git checkout 3746610e53654a1167aeb4c6294c6096d16b0502
    I found this command at
    https://tutorials.cardanoacademy.io/plutus-pioneer-program/setting-up-plutus-playground/cloning-plutus-repository
    I suspect this gave me an outdated version, but it seemed to be necessary. Any insight is welcome here.
  6. I ended up editing /etc/nix/nix.conf to have this content (note: this includes the "IOHK binary caches" and double check where the line breaks should or shouldn't be):
    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=

    sandbox = true
    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

    Some of these were based on error messages I got along the way. Any insight from more knowledgeable people is welcome. And RESTART after configuring nix.conf.

  7. When you are ready to invoke nix-shell, WAIT! Pause. Ask yourself if everything else has been set up. Restart your machine. Be certain you are in the correct (cloned repository) directory plutus-apps/. Every time you invoke nix-shell in a different directory you can kiss an hour of your life goodbye and chew up 10GB of hard drive space (which would have cost $3 million in 1983). Pause, take a breath, treat nix-shell like a career decision.
  8. Do not build Haskell from scratch! You will know this is happening if you see a bunch of filenames flashing by with hask, cabal, or .hs in them. Hit ctrl-C ( or command-. which is command and period together ), restart your machine, pause as above, and try again.
  9. I added this to .zshrc but since I switched to bash I don't know if it was necessary.
    source /nix/var/nix/profiles/default/etc/profile.d/nix.sh
1
  • I appreciate that a lot of effort has gone into this but this is not a site for user guides. Please take a look at this article -> help center
    – gRebel
    Jan 27 at 6:13

1 Answer 1

0

I saw the following settings for the nix.conf file instead (in addition to the IOHK binary caches)

sandbox = false

use-sqlite-wal = false

system-features = kvm

Source: https://docs.plutus-community.com/docs/setup/WindowsCohort2.html

3
  • Ill check what's that sandbox param
    – LexTRX
    Jan 13 at 1:55
  • also, I guess that build-users-group = nixbld is not needed in wsl environment
    – LexTRX
    Jan 13 at 2:04
  • Welcome to Cardano SE! As a new user be sure to take the Tour.
    – gRebel
    Jan 14 at 5:20

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