diff --git a/use-case-2/.gitignore b/use-case-2/.gitignore index be222d187..17a25ac36 100644 --- a/use-case-2/.gitignore +++ b/use-case-2/.gitignore @@ -2,3 +2,4 @@ db ghcid-output.txt static.out .obelisk/impl/.attr-cache +result diff --git a/use-case-2/README.md b/use-case-2/README.md index e176577b0..b60333e59 100644 --- a/use-case-2/README.md +++ b/use-case-2/README.md @@ -14,9 +14,7 @@ By the end of this README you will be able to run the POKE-DEX on your machine l ## Running Plutus Application Backend (PAB) -1. [Unpack plutus-starter GitHub Thunk] - 1. After installing Obelisk, use `./scripts/run-pab.sh` - 1. Followed by `main` when prompted to lauch the PAB and have it listen on port 8080 +1. [Run PAB] After installing Obelisk, use `./scripts/run-pab.sh` to launch the PAB and have it listen on port 8080 ## Starting Obelisk Frontend diff --git a/use-case-2/backend/backend.cabal b/use-case-2/backend/backend.cabal index a07d5f776..4cbb8be94 100644 --- a/use-case-2/backend/backend.cabal +++ b/use-case-2/backend/backend.cabal @@ -31,6 +31,7 @@ library , rhyolite-backend , rhyolite-backend-db , rhyolite-backend-notification-postgres + , text , obelisk-backend , obelisk-route , vector diff --git a/use-case-2/default.nix b/use-case-2/default.nix index 01b9e710b..b793f7f81 100644 --- a/use-case-2/default.nix +++ b/use-case-2/default.nix @@ -28,4 +28,6 @@ p = project ./. ({ pkgs, ... }: { ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal"; ios.bundleName = "Obelisk Minimal Example"; }); -in builtins.removeAttrs p ["ios" "android"] +in builtins.removeAttrs p ["ios" "android"] // { + plutus-starter = import deps.plutus-starter {}; + } diff --git a/use-case-2/frontend/frontend.cabal b/use-case-2/frontend/frontend.cabal index 86c3ea905..112844a66 100644 --- a/use-case-2/frontend/frontend.cabal +++ b/use-case-2/frontend/frontend.cabal @@ -6,6 +6,8 @@ build-type: Simple library hs-source-dirs: src build-depends: base + , aeson + , aeson-gadt-th , common , containers , groom @@ -13,6 +15,8 @@ library , obelisk-route , jsaddle , reflex-dom + , lens + , lens-aeson , obelisk-executable-config-lookup , obelisk-generated-static , rhyolite-frontend @@ -20,6 +24,7 @@ library , scientific , text , unordered-containers + , vector , vessel exposed-modules: Frontend diff --git a/use-case-2/scripts/run-pab.sh b/use-case-2/scripts/run-pab.sh index cf45e3779..4c4d2f616 100755 --- a/use-case-2/scripts/run-pab.sh +++ b/use-case-2/scripts/run-pab.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -ob thunk unpack dep/plutus-starter -cd dep/plutus-starter -nix-shell --run "cabal new-repl exe:plutus-starter-pab" +set -euo pipefail + +DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) + +"$(nix-build "$DIR"/.. -A plutus-starter.haskellNixProject.hsPkgs.plutus-starter.components.exes.plutus-starter-pab --no-out-link)"/bin/plutus-starter-pab