Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
pab-nami updates (#303)
Browse files Browse the repository at this point in the history
* nix: export pab-setup-invoker from pab-nami/client/default.nix

* pab-nami: add argonaut to spago.dhall

* pab-nami: spago2nix

* pab-nami: generate purescript Ord instance for DemoContract
  • Loading branch information
sorki authored Feb 9, 2022
1 parent e70c5cb commit 3412d47
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 69 deletions.
2 changes: 1 addition & 1 deletion plutus-pab-executables/demo/pab-nami/client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ let
});
in
{
inherit client pab-nami-demo-invoker pab-nami-demo-generator generate-purescript generated-purescript start-backend;
inherit client pab-nami-demo-invoker pab-nami-demo-generator pab-setup-invoker generate-purescript generated-purescript start-backend;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ data DemoContract = DemoContract

derive instance Eq DemoContract

derive instance Ord DemoContract

instance Show DemoContract where
show a = genericShow a

Expand Down
132 changes: 66 additions & 66 deletions plutus-pab-executables/demo/pab-nami/client/spago-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ let
installPhase = "ln -s $src $out";
};

"argonaut" = pkgs.stdenv.mkDerivation {
name = "argonaut";
version = "v8.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-contrib/purescript-argonaut.git";
rev = "e5137df76065c14e5de70c4e2820222bd7c78fc2";
sha256 = "05sq1102rl1phm2gadx0gp966yvk9q1r492bb30q1m0nz762q4v2";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"argonaut-codecs" = pkgs.stdenv.mkDerivation {
name = "argonaut-codecs";
version = "v8.1.0";
Expand All @@ -77,6 +89,18 @@ let
installPhase = "ln -s $src $out";
};

"argonaut-traversals" = pkgs.stdenv.mkDerivation {
name = "argonaut-traversals";
version = "v9.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-contrib/purescript-argonaut-traversals.git";
rev = "36f2e368ceea1ed681bd8e2884eaca451945fc44";
sha256 = "0bj88s7rz50jfhyawq4h97lvbr3h7pksbqnz4lmh714f5fda6ncx";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"arraybuffer" = pkgs.stdenv.mkDerivation {
name = "arraybuffer";
version = "v11.0.1";
Expand Down Expand Up @@ -785,54 +809,6 @@ let
installPhase = "ln -s $src $out";
};

"node-fs" = pkgs.stdenv.mkDerivation {
name = "node-fs";
version = "v6.1.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-node/purescript-node-fs.git";
rev = "09a2b71a3a86f0cd19c46f4b6c40310cc1648909";
sha256 = "1w97m2afn7yn757niknkbk7w6nyg4n5dabxr7gzfz368z1nkf45s";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"node-path" = pkgs.stdenv.mkDerivation {
name = "node-path";
version = "v4.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-node/purescript-node-path.git";
rev = "a2d7cf05e40b607ef7d048a3684cda788cd42890";
sha256 = "1384qyf4v84wbahafzvqdxjllqy8qkd5dpkhsl3js444vsm2aplr";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"node-process" = pkgs.stdenv.mkDerivation {
name = "node-process";
version = "v8.2.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-node/purescript-node-process.git";
rev = "e1e807ac7831d1a8a15e242964f7e5005e42f76b";
sha256 = "0nl9r271s8f71a9wqfkadq9b490h8phwgqc61jbzhm4ags23pqpg";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"node-streams" = pkgs.stdenv.mkDerivation {
name = "node-streams";
version = "v5.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-node/purescript-node-streams.git";
rev = "886bb2045685e3b9031687d69ccfed29972147bb";
sha256 = "1jc3d4x0v77h8qcwq7hpwprsdr3gqmdfiyr1ph0kiy7r9bbrqwfx";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"nonempty" = pkgs.stdenv.mkDerivation {
name = "nonempty";
version = "v6.0.0";
Expand Down Expand Up @@ -953,18 +929,6 @@ let
installPhase = "ln -s $src $out";
};

"posix-types" = pkgs.stdenv.mkDerivation {
name = "posix-types";
version = "v5.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-node/purescript-posix-types.git";
rev = "e562680fce64b67e26741a61a51160a04fd3e7fb";
sha256 = "1knhdnnmxx77qsjz3gk1ga7n713l303dxyn8zs46qh7p2hnkalkc";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"precise" = pkgs.stdenv.mkDerivation {
name = "precise";
version = "v5.1.0";
Expand Down Expand Up @@ -1037,6 +1001,18 @@ let
installPhase = "ln -s $src $out";
};

"quickcheck-laws" = pkgs.stdenv.mkDerivation {
name = "quickcheck-laws";
version = "v6.0.1";
src = pkgs.fetchgit {
url = "https://github.com/purescript-contrib/purescript-quickcheck-laws.git";
rev = "464597522e5e001adc2619676584871f423b9ea0";
sha256 = "1m397bh2w5a0wvms8rjgfxh71m7krmfkgk11j5krhz86b72k3izd";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"random" = pkgs.stdenv.mkDerivation {
name = "random";
version = "v5.0.0";
Expand Down Expand Up @@ -1099,11 +1075,11 @@ let

"servant-support" = pkgs.stdenv.mkDerivation {
name = "servant-support";
version = "78a0693a9409bce31bf538a8f2aa54adb8200733";
version = "1fcf4e93723f7f5d36476735b76888938ced871e";
src = pkgs.fetchgit {
url = "https://github.com/input-output-hk/purescript-servant-support";
rev = "78a0693a9409bce31bf538a8f2aa54adb8200733";
sha256 = "11x6lzv6a9yp5ccdi6fay931brm8cfacg3kmi4rphgdg01037cn6";
rev = "1fcf4e93723f7f5d36476735b76888938ced871e";
sha256 = "1p16vp5yfc9xffbmcv7rdg9s1q1nn5mxp6pgyxkz67v527gdj625";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
Expand Down Expand Up @@ -1169,6 +1145,18 @@ let
installPhase = "ln -s $src $out";
};

"these" = pkgs.stdenv.mkDerivation {
name = "these";
version = "v5.0.0";
src = pkgs.fetchgit {
url = "https://github.com/purescript-contrib/purescript-these.git";
rev = "38dcf86a9bd772091e1153f2f1c13223703599b7";
sha256 = "0d6yg3lwgralh1kcm5cd4myyz66k9qzld61hc5dg3z92d96zbvlr";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"transformers" = pkgs.stdenv.mkDerivation {
name = "transformers";
version = "v5.2.0";
Expand Down Expand Up @@ -1289,6 +1277,18 @@ let
installPhase = "ln -s $src $out";
};

"uri" = pkgs.stdenv.mkDerivation {
name = "uri";
version = "v8.0.1";
src = pkgs.fetchgit {
url = "https://github.com/purescript-contrib/purescript-uri.git";
rev = "d56b9c24933e40b523a0d64e272f3b9f603a1f7c";
sha256 = "095svp82ik9574klx8s7vjsw34d4psda1hniqnhb75jkycspmqzw";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
};

"uuid" = pkgs.stdenv.mkDerivation {
name = "uuid";
version = "v8.0.0";
Expand Down Expand Up @@ -1339,11 +1339,11 @@ let

"web-common" = pkgs.stdenv.mkDerivation {
name = "web-common";
version = "v1.1.3";
version = "v2.0.1";
src = pkgs.fetchgit {
url = "https://github.com/input-output-hk/purescript-web-common";
rev = "f6ba33c8543e5c830592f86e94b3e89ca117e602";
sha256 = "10hsvndlvag0c89gwn6hmiiar45cifl1416b0psbvqjdjqbmhvv0";
rev = "fa101cd785ef6aa2f7aa908b38c2195aa2c2ff3d";
sha256 = "0sbngaydgrmn948hyvx1ifdanvph1wchsdmjmvc1b25z2zrdc74q";
};
phases = "installPhase";
installPhase = "ln -s $src $out";
Expand Down
1 change: 1 addition & 0 deletions plutus-pab-executables/demo/pab-nami/client/spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[ "aff"
, "aff-promise"
, "affjax"
, "argonaut"
, "argonaut-codecs"
, "argonaut-core"
, "arraybuffer"
Expand Down
4 changes: 2 additions & 2 deletions plutus-pab-executables/demo/pab-nami/pab/app/DemoContract.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Data.Aeson (FromJSON, ToJSON)
import Data.OpenApi qualified as OpenApi
import Data.Void (Void)
import GHC.Generics (Generic)
import Language.PureScript.Bridge (argonaut, equal, genericShow, mkSumType)
import Language.PureScript.Bridge (argonaut, equal, genericShow, mkSumType, order)
import Ledger (PaymentPubKeyHash, StakePubKeyHash, Value)
import Ledger.Constraints (adjustUnbalancedTx, mustPayToPubKeyAddress)
import Playground.Types (FunctionSchema)
Expand All @@ -39,7 +39,7 @@ instance Pretty DemoContract where

instance HasPSTypes DemoContract where
psTypes =
[ equal . genericShow . argonaut $ mkSumType @DemoContract
[ order . equal . genericShow . argonaut $ mkSumType @DemoContract
]


Expand Down

0 comments on commit 3412d47

Please sign in to comment.