8

So I am trying to start a plutus project from scratch, as we are always just editing the .hs source files in the plutus pioneering program homeworks, wondering what are the bare necessary files needed in a repo, and how to set these up? ie cabal.project, hie.yaml, .cabal file, etc.

So far I see this starter. Does anyone have any other resources / tutorials that works on this repo? Would it make sense to have a short lecture on this in the future?

1
  • 1
    I was looking for a template like this when starting a personal project. I'm sure others will appreciate this too. Jul 19 at 18:32
4

I asked Lars the same question in the Q&A, his answer was that your best bet is to copy one of the Plutus Pioneer Program lectures (preferably the last one), remove the unnecessary modules and create your own ones.

So the steps would be:

  • Chose the lecture you prefer (e.g. week06)
  • Copy the hash tag of this lecture and build the Plutus repository, as you would doing a lecture's homework
$ git checkout 8a20664f00d8f396920385947903761a9a897fe0
$ nix build -f default.nix plutus.haskell.packages.plutus-core
  • Copy the chosen lecture directory to your environment
$ cp ./plutus-pioneer-program/code/week06/ ./my-environment/
  • Rename what you want, remove the unnecessary modules (remember to remove it in your cabal file as well) and add your own ones (add it to the cabal file)
3
  • 1
    Just bear in mind that you may want to keep this framework in tune with the Plutus code by updating the Plutus commit in project.cabal. There is still a lot of flux in the code as we are still pre-life. It might be best to compare the project.cabal with one from a later Pioneer lecture.
    – vcwebco
    Aug 2 at 10:26
  • Agreed, I mentioned week06, because that was the last one from the second cohort when I posted the answer
    – Mateus
    Aug 2 at 19:37
  • Okay but this limits the use case since tag version is lecture-specific. But I guess as @vcwebco mentions this will constantly be changing - would be good to have site where plutus tag->use case is continuously updated. For now, I take cabal.project from plutus-starter as-is and update .cabal depending on whats missing when I run cabal build. Afaik these are the only two files needed to build from scratch.
    – Hud
    Aug 5 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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