Skip to content

Instantly share code, notes, and snippets.

@prasmalla
Created April 8, 2021 14:58
Show Gist options
  • Save prasmalla/4ec117c4a6b167972d3ce167b9c06ac5 to your computer and use it in GitHub Desktop.
Save prasmalla/4ec117c4a6b167972d3ce167b9c06ac5 to your computer and use it in GitHub Desktop.
getting started with plutus pioneer on osx
#[optional] Installing Libsodium - ONLY if you do not want nix to handle this - otherwise skip
git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout 66f017f1
./autogen.sh
./configure
make
sudo make install && cd ..
#Export and source ~/.bashrc
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
#Install Nix and reload terminal after
sudo curl -L https://nixos.org/nix/install | sh
mkdir ~/.config/nix
nano ~/.config/nix/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=
#save exit restart terminal
#Building Plutus Pioneer
git clone https://github.com/input-output-hk/plutus-pioneer-program.git
cd code/week01
cabal new-build
#Clone Plutus repo/checkout cabal specific tag and start backend
git clone https://github.com/input-output-hk/plutus.git
cd plutus && git checkout 3746610e53654a1167aeb4c6294c6096d16b0502
#Nix build
nix build -f default.nix plutus.haskell.packages.plutus-core.components.library
nix-build -A plutus-playground.client
nix-build -A plutus-playground.server
nix-build -A plutus-playground.generate-purescript
nix-build -A plutus-playground.start-backend
nix-build -A plutus-pab
nix-shell
cd plutus-pab && plutus-pab-generate-purs && cd ..
cd plutus-playground-server && plutus-playground-generate-purs && plutus-playground-server
#Build and start frontend in new terminal session
cd plutus
nix-shell
cd plutus-playground-client && npm run start
#playground available at https://localhost:8009 - ignore security warning and proceed - copy/paste without the module Week01.EnglishAuction header
@acron0
Copy link

acron0 commented Apr 12, 2021

requires GHC 8.10.4 and cabal 3.4.0.0

@yanisurbis
Copy link

cabal update could be helpful as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment