From b8908dc6c9a1f684f9fb0f2ccaaeb05560554407 Mon Sep 17 00:00:00 2001 From: Hongrui Fang Date: Fri, 13 May 2022 16:39:12 +0800 Subject: [PATCH 1/7] add purescript-bridge --- flake.lock | 1507 +++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 11 +- 2 files changed, 1516 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 00c46fe..5beefa9 100644 --- a/flake.lock +++ b/flake.lock @@ -48,6 +48,54 @@ "type": "github" } }, + "HTTP_4": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "HTTP_5": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "HTTP_6": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, "Shrinker": { "flake": false, "locked": { @@ -64,6 +112,23 @@ "type": "github" } }, + "Win32-network": { + "flake": false, + "locked": { + "lastModified": 1627315969, + "narHash": "sha256-Hesb5GXSx0IwKSIi42ofisVELcQNX6lwHcoZcbaDiqc=", + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + } + }, "apropos": { "inputs": { "flake-compat": "flake-compat", @@ -117,6 +182,50 @@ "type": "github" } }, + "bot-plutus-interface": { + "inputs": { + "Win32-network": "Win32-network", + "cardano-addresses": "cardano-addresses", + "cardano-base": "cardano-base_2", + "cardano-config": "cardano-config", + "cardano-crypto": "cardano-crypto_2", + "cardano-ledger": "cardano-ledger", + "cardano-node": "cardano-node", + "cardano-prelude": "cardano-prelude_2", + "cardano-wallet": "cardano-wallet", + "flake-compat": "flake-compat_5", + "flat": "flat_2", + "goblins": "goblins", + "haskell-nix": "haskell-nix_6", + "iohk-monitoring-framework": "iohk-monitoring-framework", + "iohk-nix": "iohk-nix_4", + "nixpkgs": [ + "purescript-bridge", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "optparse-applicative": "optparse-applicative", + "ouroboros-network": "ouroboros-network", + "plutus": "plutus_3", + "plutus-apps": "plutus-apps", + "purescript-bridge": "purescript-bridge_2", + "servant-purescript": "servant-purescript" + }, + "locked": { + "lastModified": 1649173221, + "narHash": "sha256-QbGtipYZ2oVsjHnIhx+e4TJD34kJBR3svGdwR6onRR4=", + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "rev": "ea23586df347d60533384351374fde2605e694cf", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "type": "github" + } + }, "cabal-32": { "flake": false, "locked": { @@ -168,6 +277,57 @@ "type": "github" } }, + "cabal-32_4": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", + "owner": "haskell", + "repo": "cabal", + "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, + "cabal-32_5": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, + "cabal-32_6": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, "cabal-34": { "flake": false, "locked": { @@ -219,6 +379,57 @@ "type": "github" } }, + "cabal-34_4": { + "flake": false, + "locked": { + "lastModified": 1622475795, + "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", + "owner": "haskell", + "repo": "cabal", + "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-34_5": { + "flake": false, + "locked": { + "lastModified": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-34_6": { + "flake": false, + "locked": { + "lastModified": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, "cabal-36": { "flake": false, "locked": { @@ -253,6 +464,57 @@ "type": "github" } }, + "cabal-36_3": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cabal-36_4": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cardano-addresses": { + "flake": false, + "locked": { + "lastModified": 1639584472, + "narHash": "sha256-Eyu7PVYk1oQLp/Hd43S2PW+PojyAT/Rr48Xng6sbtIU=", + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + } + }, "cardano-base": { "flake": false, "locked": { @@ -269,6 +531,40 @@ "type": "github" } }, + "cardano-base_2": { + "flake": false, + "locked": { + "lastModified": 1635841753, + "narHash": "sha256-OXKsJ1UTj5kJ9xaThM54ZmxFAiFINTPKd4JQa4dPmEU=", + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + } + }, + "cardano-config": { + "flake": false, + "locked": { + "lastModified": 1634339627, + "narHash": "sha256-jQbwcfNJ8am7Q3W+hmTFmyo3wp3QItquEH//klNiofI=", + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + } + }, "cardano-crypto": { "flake": false, "locked": { @@ -286,6 +582,69 @@ "type": "github" } }, + "cardano-crypto_2": { + "flake": false, + "locked": { + "lastModified": 1604244485, + "narHash": "sha256-2Fipex/WjIRMrvx6F3hjJoAeMtFd2wGnZECT0kuIB9k=", + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + } + }, + "cardano-ledger": { + "flake": false, + "locked": { + "lastModified": 1639498285, + "narHash": "sha256-lRNfkGMHnpPO0T19FZY5BnuRkr0zTRZIkxZVgHH0fys=", + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + } + }, + "cardano-node": { + "inputs": { + "customConfig": "customConfig", + "haskellNix": "haskellNix", + "iohkNix": "iohkNix", + "nixpkgs": [ + "purescript-bridge", + "bot-plutus-interface", + "cardano-node", + "haskellNix", + "nixpkgs-2105" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1640022647, + "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + } + }, "cardano-prelude": { "flake": false, "locked": { @@ -303,6 +662,23 @@ "type": "github" } }, + "cardano-prelude_2": { + "flake": false, + "locked": { + "lastModified": 1617089317, + "narHash": "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI=", + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + } + }, "cardano-repo-tool": { "flake": false, "locked": { @@ -383,6 +759,71 @@ "type": "github" } }, + "cardano-shell_4": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-shell_5": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-shell_6": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-wallet": { + "flake": false, + "locked": { + "lastModified": 1642494510, + "narHash": "sha256-A3im2IkoumUx3NzgPooaXGC18/iYxbEooMa9ho93/6o=", + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + } + }, "cryptonite": { "flake": false, "locked": { @@ -400,6 +841,37 @@ "type": "github" } }, + "customConfig": { + "locked": { + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "empty-flake", + "type": "github" + } + }, + "easy-ps": { + "flake": false, + "locked": { + "lastModified": 1649768932, + "narHash": "sha256-T96xGZV2AEP07smv/L2s5U7jY1LTdJEiTnA90gJ3Fco=", + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "rev": "d56c436a66ec2a8a93b309c83693cef1507dca7a", + "type": "github" + }, + "original": { + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -495,6 +967,22 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1644229661, @@ -540,6 +1028,66 @@ "type": "github" } }, + "flake-utils_4": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1631561581, + "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flat": { "flake": false, "locked": { @@ -557,6 +1105,23 @@ "type": "github" } }, + "flat_2": { + "flake": false, + "locked": { + "lastModified": 1628771504, + "narHash": "sha256-lRFND+ZnZvAph6ZYkr9wl9VAx41pb3uSFP8Wc7idP9M=", + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + } + }, "foundation": { "flake": false, "locked": { @@ -625,6 +1190,57 @@ "type": "github" } }, + "ghc-8.6.5-iohk_4": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "ghc-8.6.5-iohk_5": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "ghc-8.6.5-iohk_6": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, "gitignore-nix": { "flake": false, "locked": { @@ -657,6 +1273,23 @@ "type": "github" } }, + "goblins": { + "flake": false, + "locked": { + "lastModified": 1598362523, + "narHash": "sha256-z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=", + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + } + }, "hackage": { "flake": false, "locked": { @@ -737,6 +1370,54 @@ "type": "github" } }, + "hackage_4": { + "flake": false, + "locked": { + "lastModified": 1639098768, + "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "hackage_5": { + "flake": false, + "locked": { + "lastModified": 1644887696, + "narHash": "sha256-o4gltv4npUl7+1gEQIcrRqZniwqC9kK8QsPaftlrawc=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "6ff64aa49b88e75dd6e0bbd2823c2a92c9174fa5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "hackage_6": { + "flake": false, + "locked": { + "lastModified": 1650157984, + "narHash": "sha256-hitutrIIn+qINGi6oef53f87we+cp3QNmXSBiCzVU90=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "2290fdc4d135407896f41ba518a0eae8efaae9c5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, "haskell-language-server": { "flake": false, "locked": { @@ -931,6 +1612,123 @@ "type": "github" } }, + "haskell-nix_6": { + "inputs": { + "HTTP": "HTTP_5", + "cabal-32": "cabal-32_5", + "cabal-34": "cabal-34_5", + "cabal-36": "cabal-36_3", + "cardano-shell": "cardano-shell_5", + "flake-utils": "flake-utils_5", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_5", + "hackage": "hackage_5", + "hpc-coveralls": "hpc-coveralls_5", + "nix-tools": "nix-tools_5", + "nixpkgs": [ + "purescript-bridge", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003_5", + "nixpkgs-2105": "nixpkgs-2105_5", + "nixpkgs-2111": "nixpkgs-2111_7", + "nixpkgs-unstable": "nixpkgs-unstable_5", + "old-ghc-nix": "old-ghc-nix_5", + "stackage": "stackage_5" + }, + "locked": { + "lastModified": 1644944726, + "narHash": "sha256-jJWdP/3Ne1y1akC3m9rSO5ItRoBc4UTdVQZBCuPmmrM=", + "owner": "L-as", + "repo": "haskell.nix", + "rev": "45c583b5580c130487eb5a342679f0bdbc2b23fc", + "type": "github" + }, + "original": { + "owner": "L-as", + "repo": "haskell.nix", + "type": "github" + } + }, + "haskell-nix_7": { + "inputs": { + "HTTP": "HTTP_6", + "cabal-32": "cabal-32_6", + "cabal-34": "cabal-34_6", + "cabal-36": "cabal-36_4", + "cardano-shell": "cardano-shell_6", + "flake-utils": "flake-utils_7", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_6", + "hackage": "hackage_6", + "hpc-coveralls": "hpc-coveralls_6", + "hydra": "hydra", + "nix-tools": "nix-tools_6", + "nixpkgs": [ + "purescript-bridge", + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003_6", + "nixpkgs-2105": "nixpkgs-2105_6", + "nixpkgs-2111": "nixpkgs-2111_8", + "nixpkgs-unstable": "nixpkgs-unstable_6", + "old-ghc-nix": "old-ghc-nix_6", + "stackage": "stackage_6" + }, + "locked": { + "lastModified": 1648809935, + "narHash": "sha256-aPt5vmDSvoZZvGcoG2n6z05NQYsS5Rf8tnwslFwmsYI=", + "owner": "mlabs-haskell", + "repo": "haskell.nix", + "rev": "2b4c58932d6c19a0c6b4bcde0a8c0581574c0d25", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "haskell.nix", + "rev": "2b4c58932d6c19a0c6b4bcde0a8c0581574c0d25", + "type": "github" + } + }, + "haskellNix": { + "inputs": { + "HTTP": "HTTP_4", + "cabal-32": "cabal-32_4", + "cabal-34": "cabal-34_4", + "cardano-shell": "cardano-shell_4", + "flake-utils": "flake-utils_4", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_4", + "hackage": "hackage_4", + "hpc-coveralls": "hpc-coveralls_4", + "nix-tools": "nix-tools_4", + "nixpkgs": [ + "purescript-bridge", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" + ], + "nixpkgs-2003": "nixpkgs-2003_4", + "nixpkgs-2105": "nixpkgs-2105_4", + "nixpkgs-2111": "nixpkgs-2111_6", + "nixpkgs-unstable": "nixpkgs-unstable_4", + "old-ghc-nix": "old-ghc-nix_4", + "stackage": "stackage_4" + }, + "locked": { + "lastModified": 1639098904, + "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "type": "github" + } + }, "hercules-ci-agent": { "inputs": { "flake-compat": "flake-compat_4", @@ -1023,6 +1821,54 @@ "type": "github" } }, + "hpc-coveralls_4": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, + "hpc-coveralls_5": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, + "hpc-coveralls_6": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, "hs-memory": { "flake": false, "locked": { @@ -1089,6 +1935,47 @@ "type": "github" } }, + "hydra": { + "inputs": { + "nix": "nix", + "nixpkgs": [ + "purescript-bridge", + "haskell-nix", + "hydra", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1646878427, + "narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=", + "owner": "NixOS", + "repo": "hydra", + "rev": "28b682b85b7efc5cf7974065792a1f22203a5927", + "type": "github" + }, + "original": { + "id": "hydra", + "type": "indirect" + } + }, + "iohk-monitoring-framework": { + "flake": false, + "locked": { + "lastModified": 1624367860, + "narHash": "sha256-QE3QRpIHIABm+qCP/wP4epbUx0JmSJ9BMePqWEd3iMY=", + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + } + }, "iohk-nix": { "flake": false, "locked": { @@ -1137,6 +2024,98 @@ "type": "github" } }, + "iohk-nix_4": { + "flake": false, + "locked": { + "lastModified": 1643251385, + "narHash": "sha256-Czbd69lg0ARSZfC18V6h+gtPMioWDAEVPbiHgL2x9LM=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "9d6ee3dcb3482f791e40ed991ad6fc649b343ad4", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iohk-nix_5": { + "flake": false, + "locked": { + "lastModified": 1649070135, + "narHash": "sha256-UFKqcOSdPWk3TYUCPHF22p1zf7aXQpCmmgf7UMg7fWA=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "cecab9c71d1064f05f1615eead56ac0b9196bc20", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iohkNix": { + "inputs": { + "nixpkgs": [ + "purescript-bridge", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1633964277, + "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs_5", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1643066034, + "narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=", + "owner": "NixOS", + "repo": "nix", + "rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "2.6.0", + "repo": "nix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": "nixpkgs_2" @@ -1203,6 +2182,54 @@ "type": "github" } }, + "nix-tools_4": { + "flake": false, + "locked": { + "lastModified": 1636018067, + "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nix-tools_5": { + "flake": false, + "locked": { + "lastModified": 1644395812, + "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nix-tools_6": { + "flake": false, + "locked": { + "lastModified": 1649424170, + "narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, "nixos-20_09": { "locked": { "lastModified": 1623585158, @@ -1300,6 +2327,54 @@ "type": "github" } }, + "nixpkgs-2003_4": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2003_5": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2003_6": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-2105": { "locked": { "lastModified": 1642244250, @@ -1348,6 +2423,54 @@ "type": "github" } }, + "nixpkgs-2105_4": { + "locked": { + "lastModified": 1630481079, + "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105_5": { + "locked": { + "lastModified": 1642244250, + "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105_6": { + "locked": { + "lastModified": 1645296114, + "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-2111": { "locked": { "lastModified": 1644510859, @@ -1428,6 +2551,54 @@ "type": "github" } }, + "nixpkgs-2111_6": { + "locked": { + "lastModified": 1638410074, + "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111_7": { + "locked": { + "lastModified": 1644510859, + "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111_8": { + "locked": { + "lastModified": 1648744337, + "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0a58eebd8ec65ffdef2ce9562784123a73922052", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-nixops": { "locked": { "lastModified": 1630248577, @@ -1444,6 +2615,21 @@ "type": "github" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "indirect" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1644486793, @@ -1492,6 +2678,54 @@ "type": "github" } }, + "nixpkgs-unstable_4": { + "locked": { + "lastModified": 1635295995, + "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable_5": { + "locked": { + "lastModified": 1644486793, + "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable_6": { + "locked": { + "lastModified": 1648219316, + "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1602411953, @@ -1539,6 +2773,21 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1632864508, + "narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "82891b5e2c2359d7e58d08849e4c89511ab94234", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-21.05-small", + "type": "indirect" + } + }, "old-ghc-nix": { "flake": false, "locked": { @@ -1590,6 +2839,91 @@ "type": "github" } }, + "old-ghc-nix_4": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "old-ghc-nix_5": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "old-ghc-nix_6": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "optparse-applicative": { + "flake": false, + "locked": { + "lastModified": 1628901899, + "narHash": "sha256-uQx+SEYsCH7JcG3xAT0eJck9yq3y0cvx49bvItLLer8=", + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + } + }, + "ouroboros-network": { + "flake": false, + "locked": { + "lastModified": 1639752881, + "narHash": "sha256-fZ6FfG2z6HWDxjIHycLPSQHoYtfUmWZOX7lfAUE+s6M=", + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + } + }, "plutarch": { "inputs": { "Shrinker": "Shrinker", @@ -1665,6 +2999,23 @@ "type": "github" } }, + "plutus-apps": { + "flake": false, + "locked": { + "lastModified": 1644841368, + "narHash": "sha256-OX4+S7fFUqXRz935wQqdcEm1I6aqg0udSdP19XJtSAk=", + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + } + }, "plutus_2": { "inputs": { "cardano-repo-tool": "cardano-repo-tool_2", @@ -1693,6 +3044,23 @@ "type": "github" } }, + "plutus_3": { + "flake": false, + "locked": { + "lastModified": 1642505687, + "narHash": "sha256-Pl3M9rMEoiEKRsTdDr4JwNnRo5Xs4uN66uVpOfaMCfE=", + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + } + }, "pre-commit-hooks-nix": { "flake": false, "locked": { @@ -1758,6 +3126,46 @@ "type": "github" } }, + "purescript-bridge": { + "inputs": { + "bot-plutus-interface": "bot-plutus-interface", + "easy-ps": "easy-ps", + "flake-utils": "flake-utils_6", + "haskell-nix": "haskell-nix_7", + "iohk-nix": "iohk-nix_5", + "servant-purescript": "servant-purescript_2" + }, + "locked": { + "lastModified": 1652305943, + "narHash": "sha256-J1b8WmU4P+R8u50Qwf2BqAFcvAOwnEvO7c8Ib8PEaOE=", + "owner": "mlabs-haskell", + "repo": "purescript-bridge", + "rev": "0d5c11fb220dd2ae2f6ff5b41374c354a3a062a0", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "purescript-bridge", + "type": "github" + } + }, + "purescript-bridge_2": { + "flake": false, + "locked": { + "lastModified": 1642802224, + "narHash": "sha256-/SbnmXrB9Y2rrPd6E79Iu5RDaKAKozIl685HQ4XdQTU=", + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + } + }, "root": { "inputs": { "apropos": "apropos", @@ -1771,7 +3179,41 @@ "nixpkgs" ], "nixpkgs-2111": "nixpkgs-2111_3", - "plutarch": "plutarch" + "plutarch": "plutarch", + "purescript-bridge": "purescript-bridge" + } + }, + "servant-purescript": { + "flake": false, + "locked": { + "lastModified": 1642798070, + "narHash": "sha256-DH9ISydu5gxvN4xBuoXVv1OhYCaqGOtzWlACdJ0H64I=", + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" + } + }, + "servant-purescript_2": { + "flake": false, + "locked": { + "lastModified": 1649250430, + "narHash": "sha256-akWM/v0XAe6sAdGUFKgq6j0YTwsY3fjgbr/cErMwaLk=", + "owner": "mlabs-haskell", + "repo": "servant-purescript", + "rev": "956027374c6f8f79909ca9bfab1eb78150eb7b88", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "servant-purescript", + "type": "github" } }, "sized-functors": { @@ -1903,6 +3345,54 @@ "type": "github" } }, + "stackage_4": { + "flake": false, + "locked": { + "lastModified": 1639012797, + "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "stackage_5": { + "flake": false, + "locked": { + "lastModified": 1644887829, + "narHash": "sha256-tjUXJpqB7MMnqM4FF5cdtZipfratUcTKRQVA6F77sEQ=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "db8bdef6588cf4f38e6069075ba76f0024381f68", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "stackage_6": { + "flake": false, + "locked": { + "lastModified": 1650158092, + "narHash": "sha256-uQ/TEFcce0bKmYcoBziDhYYzCDmhPsjC5WgsJjpd9wA=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "adc7f942e756b382a7a833520ebef6dfc859af8e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, "th-extras": { "flake": false, "locked": { @@ -1919,6 +3409,21 @@ "rev": "787ed752c1e5d41b5903b74e171ed087de38bffa", "type": "github" } + }, + "utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 3da51ee..6881e20 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,9 @@ inputs.apropos.inputs.nixpkgs.follows = "plutarch/haskell-nix/nixpkgs-unstable"; - outputs = inputs@{ self, nixpkgs, haskell-nix, plutarch, ... }: + inputs.purescript-bridge.url = "github:mlabs-haskell/purescript-bridge"; + + outputs = inputs@{ self, nixpkgs, haskell-nix, plutarch, purescript-bridge, ... }: let supportedSystems = with nixpkgs.lib.systems.supported; tier1 ++ tier2 ++ tier3; @@ -77,6 +79,12 @@ src = inputs.apropos; subdirs = [ "." ]; } + { + src = inputs.purescript-bridge; + subdirs = [ + "." + ]; + } ]; modules = [ (plutarch.haskellModule system) ]; shell = { @@ -110,6 +118,7 @@ ps.plutarch-safemoney ps.plutarch-test ps.apropos + ps.purescript-bridge ]; }; }; From 0a31f935b3454ee1fcf0adc2b2bb3c02c34b8129 Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 17:36:04 +0800 Subject: [PATCH 2/7] pin `purescript-bridge` so that it builds --- flake.lock | 1111 ++-------------------------------------------------- flake.nix | 3 +- 2 files changed, 29 insertions(+), 1085 deletions(-) diff --git a/flake.lock b/flake.lock index 5beefa9..910ca2e 100644 --- a/flake.lock +++ b/flake.lock @@ -64,38 +64,6 @@ "type": "github" } }, - "HTTP_5": { - "flake": false, - "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "HTTP", - "type": "github" - } - }, - "HTTP_6": { - "flake": false, - "locked": { - "lastModified": 1451647621, - "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", - "owner": "phadej", - "repo": "HTTP", - "rev": "9bc0996d412fef1787449d841277ef663ad9a915", - "type": "github" - }, - "original": { - "owner": "phadej", - "repo": "HTTP", - "type": "github" - } - }, "Shrinker": { "flake": false, "locked": { @@ -112,23 +80,6 @@ "type": "github" } }, - "Win32-network": { - "flake": false, - "locked": { - "lastModified": 1627315969, - "narHash": "sha256-Hesb5GXSx0IwKSIi42ofisVELcQNX6lwHcoZcbaDiqc=", - "owner": "input-output-hk", - "repo": "Win32-network", - "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "Win32-network", - "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", - "type": "github" - } - }, "apropos": { "inputs": { "flake-compat": "flake-compat", @@ -182,50 +133,6 @@ "type": "github" } }, - "bot-plutus-interface": { - "inputs": { - "Win32-network": "Win32-network", - "cardano-addresses": "cardano-addresses", - "cardano-base": "cardano-base_2", - "cardano-config": "cardano-config", - "cardano-crypto": "cardano-crypto_2", - "cardano-ledger": "cardano-ledger", - "cardano-node": "cardano-node", - "cardano-prelude": "cardano-prelude_2", - "cardano-wallet": "cardano-wallet", - "flake-compat": "flake-compat_5", - "flat": "flat_2", - "goblins": "goblins", - "haskell-nix": "haskell-nix_6", - "iohk-monitoring-framework": "iohk-monitoring-framework", - "iohk-nix": "iohk-nix_4", - "nixpkgs": [ - "purescript-bridge", - "bot-plutus-interface", - "haskell-nix", - "nixpkgs-unstable" - ], - "optparse-applicative": "optparse-applicative", - "ouroboros-network": "ouroboros-network", - "plutus": "plutus_3", - "plutus-apps": "plutus-apps", - "purescript-bridge": "purescript-bridge_2", - "servant-purescript": "servant-purescript" - }, - "locked": { - "lastModified": 1649173221, - "narHash": "sha256-QbGtipYZ2oVsjHnIhx+e4TJD34kJBR3svGdwR6onRR4=", - "owner": "mlabs-haskell", - "repo": "bot-plutus-interface", - "rev": "ea23586df347d60533384351374fde2605e694cf", - "type": "github" - }, - "original": { - "owner": "mlabs-haskell", - "repo": "bot-plutus-interface", - "type": "github" - } - }, "cabal-32": { "flake": false, "locked": { @@ -278,40 +185,6 @@ } }, "cabal-32_4": { - "flake": false, - "locked": { - "lastModified": 1603716527, - "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", - "owner": "haskell", - "repo": "cabal", - "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", - "type": "github" - } - }, - "cabal-32_5": { - "flake": false, - "locked": { - "lastModified": 1603716527, - "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", - "owner": "haskell", - "repo": "cabal", - "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.2", - "repo": "cabal", - "type": "github" - } - }, - "cabal-32_6": { "flake": false, "locked": { "lastModified": 1603716527, @@ -380,40 +253,6 @@ } }, "cabal-34_4": { - "flake": false, - "locked": { - "lastModified": 1622475795, - "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", - "owner": "haskell", - "repo": "cabal", - "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34_5": { - "flake": false, - "locked": { - "lastModified": 1640353650, - "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", - "owner": "haskell", - "repo": "cabal", - "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.4", - "repo": "cabal", - "type": "github" - } - }, - "cabal-34_6": { "flake": false, "locked": { "lastModified": 1640353650, @@ -481,40 +320,6 @@ "type": "github" } }, - "cabal-36_4": { - "flake": false, - "locked": { - "lastModified": 1641652457, - "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", - "owner": "haskell", - "repo": "cabal", - "rev": "f27667f8ec360c475027dcaee0138c937477b070", - "type": "github" - }, - "original": { - "owner": "haskell", - "ref": "3.6", - "repo": "cabal", - "type": "github" - } - }, - "cardano-addresses": { - "flake": false, - "locked": { - "lastModified": 1639584472, - "narHash": "sha256-Eyu7PVYk1oQLp/Hd43S2PW+PojyAT/Rr48Xng6sbtIU=", - "owner": "input-output-hk", - "repo": "cardano-addresses", - "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-addresses", - "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", - "type": "github" - } - }, "cardano-base": { "flake": false, "locked": { @@ -531,40 +336,6 @@ "type": "github" } }, - "cardano-base_2": { - "flake": false, - "locked": { - "lastModified": 1635841753, - "narHash": "sha256-OXKsJ1UTj5kJ9xaThM54ZmxFAiFINTPKd4JQa4dPmEU=", - "owner": "input-output-hk", - "repo": "cardano-base", - "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-base", - "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", - "type": "github" - } - }, - "cardano-config": { - "flake": false, - "locked": { - "lastModified": 1634339627, - "narHash": "sha256-jQbwcfNJ8am7Q3W+hmTFmyo3wp3QItquEH//klNiofI=", - "owner": "input-output-hk", - "repo": "cardano-config", - "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-config", - "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", - "type": "github" - } - }, "cardano-crypto": { "flake": false, "locked": { @@ -582,69 +353,6 @@ "type": "github" } }, - "cardano-crypto_2": { - "flake": false, - "locked": { - "lastModified": 1604244485, - "narHash": "sha256-2Fipex/WjIRMrvx6F3hjJoAeMtFd2wGnZECT0kuIB9k=", - "owner": "input-output-hk", - "repo": "cardano-crypto", - "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-crypto", - "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", - "type": "github" - } - }, - "cardano-ledger": { - "flake": false, - "locked": { - "lastModified": 1639498285, - "narHash": "sha256-lRNfkGMHnpPO0T19FZY5BnuRkr0zTRZIkxZVgHH0fys=", - "owner": "input-output-hk", - "repo": "cardano-ledger", - "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-ledger", - "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", - "type": "github" - } - }, - "cardano-node": { - "inputs": { - "customConfig": "customConfig", - "haskellNix": "haskellNix", - "iohkNix": "iohkNix", - "nixpkgs": [ - "purescript-bridge", - "bot-plutus-interface", - "cardano-node", - "haskellNix", - "nixpkgs-2105" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1640022647, - "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-node", - "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", - "type": "github" - } - }, "cardano-prelude": { "flake": false, "locked": { @@ -662,23 +370,6 @@ "type": "github" } }, - "cardano-prelude_2": { - "flake": false, - "locked": { - "lastModified": 1617089317, - "narHash": "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI=", - "owner": "input-output-hk", - "repo": "cardano-prelude", - "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-prelude", - "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", - "type": "github" - } - }, "cardano-repo-tool": { "flake": false, "locked": { @@ -775,55 +466,6 @@ "type": "github" } }, - "cardano-shell_5": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-shell_6": { - "flake": false, - "locked": { - "lastModified": 1608537748, - "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", - "owner": "input-output-hk", - "repo": "cardano-shell", - "rev": "9392c75087cb9a3d453998f4230930dea3a95725", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-shell", - "type": "github" - } - }, - "cardano-wallet": { - "flake": false, - "locked": { - "lastModified": 1642494510, - "narHash": "sha256-A3im2IkoumUx3NzgPooaXGC18/iYxbEooMa9ho93/6o=", - "owner": "input-output-hk", - "repo": "cardano-wallet", - "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-wallet", - "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", - "type": "github" - } - }, "cryptonite": { "flake": false, "locked": { @@ -841,21 +483,6 @@ "type": "github" } }, - "customConfig": { - "locked": { - "lastModified": 1630400035, - "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", - "owner": "input-output-hk", - "repo": "empty-flake", - "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "empty-flake", - "type": "github" - } - }, "easy-ps": { "flake": false, "locked": { @@ -967,22 +594,6 @@ "type": "github" } }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { "lastModified": 1644229661, @@ -1029,36 +640,6 @@ } }, "flake-utils_4": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_6": { "locked": { "lastModified": 1631561581, "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", @@ -1073,7 +654,7 @@ "type": "github" } }, - "flake-utils_7": { + "flake-utils_5": { "locked": { "lastModified": 1644229661, "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", @@ -1105,23 +686,6 @@ "type": "github" } }, - "flat_2": { - "flake": false, - "locked": { - "lastModified": 1628771504, - "narHash": "sha256-lRFND+ZnZvAph6ZYkr9wl9VAx41pb3uSFP8Wc7idP9M=", - "owner": "input-output-hk", - "repo": "flat", - "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "flat", - "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", - "type": "github" - } - }, "foundation": { "flake": false, "locked": { @@ -1207,40 +771,6 @@ "type": "github" } }, - "ghc-8.6.5-iohk_5": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, - "ghc-8.6.5-iohk_6": { - "flake": false, - "locked": { - "lastModified": 1600920045, - "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", - "owner": "input-output-hk", - "repo": "ghc", - "rev": "95713a6ecce4551240da7c96b6176f980af75cae", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "ref": "release/8.6.5-iohk", - "repo": "ghc", - "type": "github" - } - }, "gitignore-nix": { "flake": false, "locked": { @@ -1273,23 +803,6 @@ "type": "github" } }, - "goblins": { - "flake": false, - "locked": { - "lastModified": 1598362523, - "narHash": "sha256-z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=", - "owner": "input-output-hk", - "repo": "goblins", - "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "goblins", - "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", - "type": "github" - } - }, "hackage": { "flake": false, "locked": { @@ -1373,43 +886,11 @@ "hackage_4": { "flake": false, "locked": { - "lastModified": 1639098768, - "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", + "lastModified": 1652404611, + "narHash": "sha256-yfRc3lkxA7k3McDC6uqkj1VLPtl8XmrCJD6UiLm+rbw=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_5": { - "flake": false, - "locked": { - "lastModified": 1644887696, - "narHash": "sha256-o4gltv4npUl7+1gEQIcrRqZniwqC9kK8QsPaftlrawc=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "6ff64aa49b88e75dd6e0bbd2823c2a92c9174fa5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "hackage.nix", - "type": "github" - } - }, - "hackage_6": { - "flake": false, - "locked": { - "lastModified": 1650157984, - "narHash": "sha256-hitutrIIn+qINGi6oef53f87we+cp3QNmXSBiCzVU90=", - "owner": "input-output-hk", - "repo": "hackage.nix", - "rev": "2290fdc4d135407896f41ba518a0eae8efaae9c5", + "rev": "d1d2ce6bb4bf964e43e015409432748a30960d8d", "type": "github" }, "original": { @@ -1612,101 +1093,23 @@ "type": "github" } }, - "haskell-nix_6": { - "inputs": { - "HTTP": "HTTP_5", - "cabal-32": "cabal-32_5", - "cabal-34": "cabal-34_5", - "cabal-36": "cabal-36_3", - "cardano-shell": "cardano-shell_5", - "flake-utils": "flake-utils_5", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_5", - "hackage": "hackage_5", - "hpc-coveralls": "hpc-coveralls_5", - "nix-tools": "nix-tools_5", - "nixpkgs": [ - "purescript-bridge", - "bot-plutus-interface", - "haskell-nix", - "nixpkgs-unstable" - ], - "nixpkgs-2003": "nixpkgs-2003_5", - "nixpkgs-2105": "nixpkgs-2105_5", - "nixpkgs-2111": "nixpkgs-2111_7", - "nixpkgs-unstable": "nixpkgs-unstable_5", - "old-ghc-nix": "old-ghc-nix_5", - "stackage": "stackage_5" - }, - "locked": { - "lastModified": 1644944726, - "narHash": "sha256-jJWdP/3Ne1y1akC3m9rSO5ItRoBc4UTdVQZBCuPmmrM=", - "owner": "L-as", - "repo": "haskell.nix", - "rev": "45c583b5580c130487eb5a342679f0bdbc2b23fc", - "type": "github" - }, - "original": { - "owner": "L-as", - "repo": "haskell.nix", - "type": "github" - } - }, - "haskell-nix_7": { - "inputs": { - "HTTP": "HTTP_6", - "cabal-32": "cabal-32_6", - "cabal-34": "cabal-34_6", - "cabal-36": "cabal-36_4", - "cardano-shell": "cardano-shell_6", - "flake-utils": "flake-utils_7", - "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_6", - "hackage": "hackage_6", - "hpc-coveralls": "hpc-coveralls_6", - "hydra": "hydra", - "nix-tools": "nix-tools_6", - "nixpkgs": [ - "purescript-bridge", - "haskell-nix", - "nixpkgs-unstable" - ], - "nixpkgs-2003": "nixpkgs-2003_6", - "nixpkgs-2105": "nixpkgs-2105_6", - "nixpkgs-2111": "nixpkgs-2111_8", - "nixpkgs-unstable": "nixpkgs-unstable_6", - "old-ghc-nix": "old-ghc-nix_6", - "stackage": "stackage_6" - }, - "locked": { - "lastModified": 1648809935, - "narHash": "sha256-aPt5vmDSvoZZvGcoG2n6z05NQYsS5Rf8tnwslFwmsYI=", - "owner": "mlabs-haskell", - "repo": "haskell.nix", - "rev": "2b4c58932d6c19a0c6b4bcde0a8c0581574c0d25", - "type": "github" - }, - "original": { - "owner": "mlabs-haskell", - "repo": "haskell.nix", - "rev": "2b4c58932d6c19a0c6b4bcde0a8c0581574c0d25", - "type": "github" - } - }, "haskellNix": { "inputs": { "HTTP": "HTTP_4", "cabal-32": "cabal-32_4", "cabal-34": "cabal-34_4", + "cabal-36": "cabal-36_3", "cardano-shell": "cardano-shell_4", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_4", "hackage": "hackage_4", "hpc-coveralls": "hpc-coveralls_4", + "hydra": "hydra", "nix-tools": "nix-tools_4", "nixpkgs": [ "purescript-bridge", - "bot-plutus-interface", - "cardano-node", - "nixpkgs" + "haskellNix", + "nixpkgs-unstable" ], "nixpkgs-2003": "nixpkgs-2003_4", "nixpkgs-2105": "nixpkgs-2105_4", @@ -1716,11 +1119,11 @@ "stackage": "stackage_4" }, "locked": { - "lastModified": 1639098904, - "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", + "lastModified": 1652433679, + "narHash": "sha256-sJgwRYdMn4jq4BpRWEvOjEAJ+68Ncrwv32IHdjQAYTU=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", + "rev": "b66b0445ebec8842270d91d945227898265a114a", "type": "github" }, "original": { @@ -1837,38 +1240,6 @@ "type": "github" } }, - "hpc-coveralls_5": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, - "hpc-coveralls_6": { - "flake": false, - "locked": { - "lastModified": 1607498076, - "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", - "type": "github" - }, - "original": { - "owner": "sevanspowell", - "repo": "hpc-coveralls", - "type": "github" - } - }, "hs-memory": { "flake": false, "locked": { @@ -1940,7 +1311,7 @@ "nix": "nix", "nixpkgs": [ "purescript-bridge", - "haskell-nix", + "haskellNix", "hydra", "nix", "nixpkgs" @@ -1959,23 +1330,6 @@ "type": "indirect" } }, - "iohk-monitoring-framework": { - "flake": false, - "locked": { - "lastModified": 1624367860, - "narHash": "sha256-QE3QRpIHIABm+qCP/wP4epbUx0JmSJ9BMePqWEd3iMY=", - "owner": "input-output-hk", - "repo": "iohk-monitoring-framework", - "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-monitoring-framework", - "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", - "type": "github" - } - }, "iohk-nix": { "flake": false, "locked": { @@ -2024,61 +1378,6 @@ "type": "github" } }, - "iohk-nix_4": { - "flake": false, - "locked": { - "lastModified": 1643251385, - "narHash": "sha256-Czbd69lg0ARSZfC18V6h+gtPMioWDAEVPbiHgL2x9LM=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "9d6ee3dcb3482f791e40ed991ad6fc649b343ad4", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohk-nix_5": { - "flake": false, - "locked": { - "lastModified": 1649070135, - "narHash": "sha256-UFKqcOSdPWk3TYUCPHF22p1zf7aXQpCmmgf7UMg7fWA=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "cecab9c71d1064f05f1615eead56ac0b9196bc20", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, - "iohkNix": { - "inputs": { - "nixpkgs": [ - "purescript-bridge", - "bot-plutus-interface", - "cardano-node", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1633964277, - "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", - "owner": "input-output-hk", - "repo": "iohk-nix", - "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "iohk-nix", - "type": "github" - } - }, "lowdown-src": { "flake": false, "locked": { @@ -2183,38 +1482,6 @@ } }, "nix-tools_4": { - "flake": false, - "locked": { - "lastModified": 1636018067, - "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_5": { - "flake": false, - "locked": { - "lastModified": 1644395812, - "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, - "nix-tools_6": { "flake": false, "locked": { "lastModified": 1649424170, @@ -2343,38 +1610,6 @@ "type": "github" } }, - "nixpkgs-2003_5": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2003_6": { - "locked": { - "lastModified": 1620055814, - "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-20.03-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-2105": { "locked": { "lastModified": 1642244250, @@ -2424,38 +1659,6 @@ } }, "nixpkgs-2105_4": { - "locked": { - "lastModified": 1630481079, - "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_5": { - "locked": { - "lastModified": 1642244250, - "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.05-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2105_6": { "locked": { "lastModified": 1645296114, "narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=", @@ -2552,38 +1755,6 @@ } }, "nixpkgs-2111_6": { - "locked": { - "lastModified": 1638410074, - "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_7": { - "locked": { - "lastModified": 1644510859, - "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-21.11-darwin", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-2111_8": { "locked": { "lastModified": 1648744337, "narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=", @@ -2679,38 +1850,6 @@ } }, "nixpkgs-unstable_4": { - "locked": { - "lastModified": 1635295995, - "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_5": { - "locked": { - "lastModified": 1644486793, - "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_6": { "locked": { "lastModified": 1648219316, "narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=", @@ -2856,74 +1995,6 @@ "type": "github" } }, - "old-ghc-nix_5": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "old-ghc-nix_6": { - "flake": false, - "locked": { - "lastModified": 1631092763, - "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", - "owner": "angerman", - "repo": "old-ghc-nix", - "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", - "type": "github" - }, - "original": { - "owner": "angerman", - "ref": "master", - "repo": "old-ghc-nix", - "type": "github" - } - }, - "optparse-applicative": { - "flake": false, - "locked": { - "lastModified": 1628901899, - "narHash": "sha256-uQx+SEYsCH7JcG3xAT0eJck9yq3y0cvx49bvItLLer8=", - "owner": "input-output-hk", - "repo": "optparse-applicative", - "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "optparse-applicative", - "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", - "type": "github" - } - }, - "ouroboros-network": { - "flake": false, - "locked": { - "lastModified": 1639752881, - "narHash": "sha256-fZ6FfG2z6HWDxjIHycLPSQHoYtfUmWZOX7lfAUE+s6M=", - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "d2d219a86cda42787325bb8c20539a75c2667132", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "ouroboros-network", - "rev": "d2d219a86cda42787325bb8c20539a75c2667132", - "type": "github" - } - }, "plutarch": { "inputs": { "Shrinker": "Shrinker", @@ -2999,23 +2070,6 @@ "type": "github" } }, - "plutus-apps": { - "flake": false, - "locked": { - "lastModified": 1644841368, - "narHash": "sha256-OX4+S7fFUqXRz935wQqdcEm1I6aqg0udSdP19XJtSAk=", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", - "type": "github" - } - }, "plutus_2": { "inputs": { "cardano-repo-tool": "cardano-repo-tool_2", @@ -3044,23 +2098,6 @@ "type": "github" } }, - "plutus_3": { - "flake": false, - "locked": { - "lastModified": 1642505687, - "narHash": "sha256-Pl3M9rMEoiEKRsTdDr4JwNnRo5Xs4uN66uVpOfaMCfE=", - "owner": "input-output-hk", - "repo": "plutus", - "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "plutus", - "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", - "type": "github" - } - }, "pre-commit-hooks-nix": { "flake": false, "locked": { @@ -3128,41 +2165,27 @@ }, "purescript-bridge": { "inputs": { - "bot-plutus-interface": "bot-plutus-interface", "easy-ps": "easy-ps", - "flake-utils": "flake-utils_6", - "haskell-nix": "haskell-nix_7", - "iohk-nix": "iohk-nix_5", - "servant-purescript": "servant-purescript_2" + "flake-utils": "flake-utils_4", + "haskellNix": "haskellNix", + "nixpkgs": [ + "purescript-bridge", + "haskellNix", + "nixpkgs-unstable" + ] }, "locked": { - "lastModified": 1652305943, - "narHash": "sha256-J1b8WmU4P+R8u50Qwf2BqAFcvAOwnEvO7c8Ib8PEaOE=", + "lastModified": 1649710083, + "narHash": "sha256-jd+HN/FUmmXnRy+VXT5G0y9l4YThHCIWuluxWFIffnE=", "owner": "mlabs-haskell", "repo": "purescript-bridge", - "rev": "0d5c11fb220dd2ae2f6ff5b41374c354a3a062a0", + "rev": "8e6251e8b1f489748f5bbd9ca6384bcf8cefbbef", "type": "github" }, "original": { "owner": "mlabs-haskell", "repo": "purescript-bridge", - "type": "github" - } - }, - "purescript-bridge_2": { - "flake": false, - "locked": { - "lastModified": 1642802224, - "narHash": "sha256-/SbnmXrB9Y2rrPd6E79Iu5RDaKAKozIl685HQ4XdQTU=", - "owner": "input-output-hk", - "repo": "purescript-bridge", - "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "purescript-bridge", - "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "rev": "8e6251e8b1f489748f5bbd9ca6384bcf8cefbbef", "type": "github" } }, @@ -3183,39 +2206,6 @@ "purescript-bridge": "purescript-bridge" } }, - "servant-purescript": { - "flake": false, - "locked": { - "lastModified": 1642798070, - "narHash": "sha256-DH9ISydu5gxvN4xBuoXVv1OhYCaqGOtzWlACdJ0H64I=", - "owner": "input-output-hk", - "repo": "servant-purescript", - "rev": "44e7cacf109f84984cd99cd3faf185d161826963", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "servant-purescript", - "rev": "44e7cacf109f84984cd99cd3faf185d161826963", - "type": "github" - } - }, - "servant-purescript_2": { - "flake": false, - "locked": { - "lastModified": 1649250430, - "narHash": "sha256-akWM/v0XAe6sAdGUFKgq6j0YTwsY3fjgbr/cErMwaLk=", - "owner": "mlabs-haskell", - "repo": "servant-purescript", - "rev": "956027374c6f8f79909ca9bfab1eb78150eb7b88", - "type": "github" - }, - "original": { - "owner": "mlabs-haskell", - "repo": "servant-purescript", - "type": "github" - } - }, "sized-functors": { "flake": false, "locked": { @@ -3348,43 +2338,11 @@ "stackage_4": { "flake": false, "locked": { - "lastModified": 1639012797, - "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", + "lastModified": 1652404704, + "narHash": "sha256-RAi3IebJ508ceEVisDjsSYJPNUbQbLPHs1SD+L08OYw=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", - "type": "github" - } - }, - "stackage_5": { - "flake": false, - "locked": { - "lastModified": 1644887829, - "narHash": "sha256-tjUXJpqB7MMnqM4FF5cdtZipfratUcTKRQVA6F77sEQ=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "db8bdef6588cf4f38e6069075ba76f0024381f68", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "stackage.nix", - "type": "github" - } - }, - "stackage_6": { - "flake": false, - "locked": { - "lastModified": 1650158092, - "narHash": "sha256-uQ/TEFcce0bKmYcoBziDhYYzCDmhPsjC5WgsJjpd9wA=", - "owner": "input-output-hk", - "repo": "stackage.nix", - "rev": "adc7f942e756b382a7a833520ebef6dfc859af8e", + "rev": "947645a2ded85ae0e7d1098314f37c44a0227b98", "type": "github" }, "original": { @@ -3409,21 +2367,6 @@ "rev": "787ed752c1e5d41b5903b74e171ed087de38bffa", "type": "github" } - }, - "utils": { - "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6881e20..d23cd9e 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,8 @@ inputs.apropos.inputs.nixpkgs.follows = "plutarch/haskell-nix/nixpkgs-unstable"; - inputs.purescript-bridge.url = "github:mlabs-haskell/purescript-bridge"; + inputs.purescript-bridge.url = + "github:mlabs-haskell/purescript-bridge?rev=8e6251e8b1f489748f5bbd9ca6384bcf8cefbbef"; outputs = inputs@{ self, nixpkgs, haskell-nix, plutarch, purescript-bridge, ... }: let From 9a264393970ed7657032d9883006f6a22dd9ce04 Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 18:08:57 +0800 Subject: [PATCH 3/7] setup bridge target --- agora-purescript-bridge/Bridge.hs | 4 ++++ agora.cabal | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 agora-purescript-bridge/Bridge.hs diff --git a/agora-purescript-bridge/Bridge.hs b/agora-purescript-bridge/Bridge.hs new file mode 100644 index 0000000..c8dbf9f --- /dev/null +++ b/agora-purescript-bridge/Bridge.hs @@ -0,0 +1,4 @@ +module Main (main) where + +main :: IO () +main = return () diff --git a/agora.cabal b/agora.cabal index 60d7935..c8c4b5c 100644 --- a/agora.cabal +++ b/agora.cabal @@ -120,6 +120,9 @@ common test-deps , tasty-hedgehog , tasty-hunit +common exe-opts + ghc-options: -threaded -rtsopts -with-rtsopts=-N -O0 + library import: lang, deps exposed-modules: @@ -197,3 +200,13 @@ benchmark agora-bench main-is: Main.hs type: exitcode-stdio-1.0 build-depends: agora + +executable agora-purescript-bridge + import: lang, deps, exe-opts + main-is: Bridge.hs + build-depends: + , agora + , optparse-applicative + , purescript-bridge + + hs-source-dirs: agora-purescript-bridge From 538e809d2c97cbb3def2334abcc0742c3c69a3a0 Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 20:03:17 +0800 Subject: [PATCH 4/7] add all agora types --- agora-purescript-bridge/AgoraTypes.hs | 51 +++++++++++++++++++++++++++ agora-purescript-bridge/Bridge.hs | 26 +++++++++++++- agora-purescript-bridge/Options.hs | 51 +++++++++++++++++++++++++++ agora.cabal | 4 +++ agora/Agora/AuthorityToken.hs | 10 ++++-- agora/Agora/Governor.hs | 4 +++ agora/Agora/Proposal.hs | 4 +-- agora/Agora/Stake.hs | 2 +- 8 files changed, 145 insertions(+), 7 deletions(-) create mode 100644 agora-purescript-bridge/AgoraTypes.hs create mode 100644 agora-purescript-bridge/Options.hs diff --git a/agora-purescript-bridge/AgoraTypes.hs b/agora-purescript-bridge/AgoraTypes.hs new file mode 100644 index 0000000..e56d4d8 --- /dev/null +++ b/agora-purescript-bridge/AgoraTypes.hs @@ -0,0 +1,51 @@ +module AgoraTypes (agoraTypes) where + +-------------------------------------------------------------------------------- + +import Language.PureScript.Bridge ( + Language (Haskell), + SumType, + mkSumType, + ) + +-------------------------------------------------------------------------------- + +import Agora.AuthorityToken qualified as AuthorityToken +import Agora.Effect.TreasuryWithdrawal qualified as TreasuryWithdrawalEffect +import Agora.Governor qualified as Governor +import Agora.MultiSig qualified as MultiSig +import Agora.Proposal qualified as Proposal +import Agora.Stake qualified as Stake +import Agora.Treasury qualified as Treasury + +-------------------------------------------------------------------------------- + +agoraTypes :: [SumType 'Haskell] +agoraTypes = + [ -- Proposal + mkSumType @Proposal.ProposalId + , mkSumType @Proposal.ResultTag + , mkSumType @Proposal.ProposalStatus + , mkSumType @Proposal.ProposalThresholds + , mkSumType @Proposal.ProposalVotes + , mkSumType @Proposal.ProposalDatum + , mkSumType @Proposal.ProposalRedeemer + , mkSumType @Proposal.Proposal + , -- Governor + mkSumType @Governor.GovernorDatum + , mkSumType @Governor.GovernorRedeemer + , mkSumType @Governor.Governor + , -- MultiSig + mkSumType @MultiSig.MultiSig + , -- Stake + mkSumType @Stake.Stake + , mkSumType @Stake.ProposalLock + , mkSumType @Stake.StakeRedeemer + , mkSumType @Stake.StakeDatum + , -- Treasury + mkSumType @Treasury.TreasuryRedeemer + , -- AuthorityToken + mkSumType @AuthorityToken.AuthorityToken + , -- Effects + mkSumType @TreasuryWithdrawalEffect.TreasuryWithdrawalDatum + ] diff --git a/agora-purescript-bridge/Bridge.hs b/agora-purescript-bridge/Bridge.hs index c8dbf9f..686d21a 100644 --- a/agora-purescript-bridge/Bridge.hs +++ b/agora-purescript-bridge/Bridge.hs @@ -1,4 +1,28 @@ module Main (main) where +import Language.PureScript.Bridge ( + buildBridge, + defaultBridge, + writePSTypes, + ) + +-------------------------------------------------------------------------------- + +import Control.Monad (unless) + +-------------------------------------------------------------------------------- + +import AgoraTypes (agoraTypes) +import Options (Options (..), parseOptions) + +-------------------------------------------------------------------------------- + main :: IO () -main = return () +main = do + options <- parseOptions + + unless options.quiet $ do + putStrLn $ "Writing purescript stuff to " <> options.output + putStrLn "" + + writePSTypes options.output (buildBridge defaultBridge) agoraTypes diff --git a/agora-purescript-bridge/Options.hs b/agora-purescript-bridge/Options.hs new file mode 100644 index 0000000..cd1d1cc --- /dev/null +++ b/agora-purescript-bridge/Options.hs @@ -0,0 +1,51 @@ +module Options (Options (..), parseOptions) where + +import Options.Applicative ((<**>)) +import Options.Applicative qualified as Opt + +import Data.Maybe (fromJust) +import Path (fromRelDir, parseRelDir, ()) + +data Options = Options + { output :: FilePath + , quiet :: Bool + } + +outputOpt :: Opt.Parser FilePath +outputOpt = + srcFilePath + <$> ( Opt.strOption $ + Opt.long "output-path" + <> Opt.short 'o' + <> Opt.metavar "OUTPUT_PATH" + <> Opt.value "./" + <> Opt.help "Output purescripts will be in OUTPUT_PATH/src" + ) + +quietOpt :: Opt.Parser Bool +quietOpt = + Opt.switch $ + Opt.long "quiet" + <> Opt.short 'q' + <> Opt.help "Disable verbose log messages" + +bridgeOpt :: Opt.Parser Options +bridgeOpt = Options <$> outputOpt <*> quietOpt + +parseOptions :: IO Options +parseOptions = Opt.execParser p + where + p = + Opt.info + (bridgeOpt <**> Opt.helper) + ( Opt.fullDesc + <> Opt.progDesc "Generate purescript types of Agora types" + ) + +-- Give a directory path, return the path of its src subdirectory. +srcFilePath :: FilePath -> FilePath +srcFilePath path = fromRelDir $ + fromJust $ do + dir <- parseRelDir $ path + srcSubDir <- parseRelDir "src" + return $ dir srcSubDir diff --git a/agora.cabal b/agora.cabal index c8c4b5c..e5fd3b6 100644 --- a/agora.cabal +++ b/agora.cabal @@ -207,6 +207,10 @@ executable agora-purescript-bridge build-depends: , agora , optparse-applicative + , path , purescript-bridge hs-source-dirs: agora-purescript-bridge + other-modules: + AgoraTypes + Options diff --git a/agora/Agora/AuthorityToken.hs b/agora/Agora/AuthorityToken.hs index 4e286e2..cac8869 100644 --- a/agora/Agora/AuthorityToken.hs +++ b/agora/Agora/AuthorityToken.hs @@ -11,6 +11,8 @@ module Agora.AuthorityToken ( AuthorityToken (..), ) where +-------------------------------------------------------------------------------- + import Plutarch.Api.V1 ( PAddress (..), PCredential (..), @@ -25,8 +27,11 @@ import Plutarch.Api.V1.AssocMap (PMap (PMap)) import Plutarch.Api.V1.Value (PValue (PValue)) import Plutarch.Builtin (pforgetData) import Plutus.V1.Ledger.Value (AssetClass (AssetClass)) +import Plutarch.Api.V1.Extra (passetClass, passetClassValueOf) -import Prelude +-------------------------------------------------------------------------------- + +import GHC.Generics qualified as GHC -------------------------------------------------------------------------------- @@ -38,7 +43,6 @@ import Agora.Utils ( tcassert, tcmatch, ) -import Plutarch.Api.V1.Extra (passetClass, passetClassValueOf) -------------------------------------------------------------------------------- @@ -51,7 +55,7 @@ import Plutarch.Api.V1.Extra (passetClass, passetClassValueOf) newtype AuthorityToken = AuthorityToken { authority :: AssetClass -- ^ Token that must move in order for minting this to be valid. - } + } deriving stock (GHC.Generic) -------------------------------------------------------------------------------- diff --git a/agora/Agora/Governor.hs b/agora/Agora/Governor.hs index d2923e6..bf35726 100644 --- a/agora/Agora/Governor.hs +++ b/agora/Agora/Governor.hs @@ -21,6 +21,7 @@ module Agora.Governor ( ) where import Agora.Proposal (ProposalId, ProposalThresholds) +import GHC.Generics qualified as GHC import Plutarch.Api.V1 (PMintingPolicy, PValidator) import PlutusTx qualified @@ -31,6 +32,7 @@ data GovernorDatum = GovernorDatum , nextProposalId :: ProposalId -- ^ What tag the next proposal will get upon creating. } + deriving stock (GHC.Generic) PlutusTx.makeIsDataIndexed ''GovernorDatum [('GovernorDatum, 0)] @@ -46,12 +48,14 @@ data GovernorRedeemer | -- | Checks that a SINGLE proposal finished correctly, -- and allows minting GATs for each effect script. MintGATs + deriving stock (GHC.Generic) PlutusTx.makeIsDataIndexed ''GovernorRedeemer [('CreateProposal, 0), ('MintGATs, 1)] -- | Parameters for creating Governor scripts. data Governor = Governor + deriving stock (GHC.Generic) -------------------------------------------------------------------------------- diff --git a/agora/Agora/Proposal.hs b/agora/Agora/Proposal.hs index 494d206..b0f0bb0 100644 --- a/agora/Agora/Proposal.hs +++ b/agora/Agora/Proposal.hs @@ -82,7 +82,7 @@ newtype ProposalId = ProposalId {proposalTag :: Integer} @ -} newtype ResultTag = ResultTag {getResultTag :: Integer} - deriving stock (Eq, Show, Ord) + deriving stock (Eq, Show, Ord, GHC.Generic) deriving newtype (PlutusTx.ToData, PlutusTx.FromData, PlutusTx.UnsafeFromData) {- | The "status" of the proposal. This is only useful for state transitions that @@ -247,7 +247,7 @@ data Proposal = Proposal , maximumCosigners :: Integer -- ^ Arbitrary limit for maximum amount of cosigners on a proposal. } - deriving stock (Show, Eq) + deriving stock (Show, Eq, GHC.Generic) -------------------------------------------------------------------------------- -- Plutarch-land diff --git a/agora/Agora/Stake.hs b/agora/Agora/Stake.hs index 2ce89d7..351eab6 100644 --- a/agora/Agora/Stake.hs +++ b/agora/Agora/Stake.hs @@ -81,7 +81,7 @@ data Stake = Stake { gtClassRef :: Tagged GTTag AssetClass -- ^ Used when inlining the AssetClass of a 'PDiscrete' in the script code. , proposalSTClass :: AssetClass - } + } deriving stock (GHC.Generic) {- | A lock placed on a Stake datum in order to prevent depositing and withdrawing when votes are in place. From b04817b86704cdb72f8ae9fbbdfdf9f71226fc02 Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 20:08:48 +0800 Subject: [PATCH 5/7] generate purescript stuff --- .../src/Agora/AuthorityToken.purs | 24 +++ .../src/Agora/Effect/TreasuryWithdrawal.purs | 29 +++ .../src/Agora/Governor.purs | 77 ++++++++ .../src/Agora/MultiSig.purs | 28 +++ .../src/Agora/Proposal.purs | 186 ++++++++++++++++++ agora-purescript-bridge/src/Agora/Stake.purs | 103 ++++++++++ .../src/Agora/Treasury.purs | 31 +++ 7 files changed, 478 insertions(+) create mode 100644 agora-purescript-bridge/src/Agora/AuthorityToken.purs create mode 100644 agora-purescript-bridge/src/Agora/Effect/TreasuryWithdrawal.purs create mode 100644 agora-purescript-bridge/src/Agora/Governor.purs create mode 100644 agora-purescript-bridge/src/Agora/MultiSig.purs create mode 100644 agora-purescript-bridge/src/Agora/Proposal.purs create mode 100644 agora-purescript-bridge/src/Agora/Stake.purs create mode 100644 agora-purescript-bridge/src/Agora/Treasury.purs diff --git a/agora-purescript-bridge/src/Agora/AuthorityToken.purs b/agora-purescript-bridge/src/Agora/AuthorityToken.purs new file mode 100644 index 0000000..ad02237 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/AuthorityToken.purs @@ -0,0 +1,24 @@ +-- File auto generated by purescript-bridge! -- +module Agora.AuthorityToken where + +import Prelude + +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Plutus.V1.Ledger.Value (AssetClass) +import Type.Proxy (Proxy(Proxy)) + +newtype AuthorityToken = AuthorityToken { authority :: AssetClass } + +derive instance Generic AuthorityToken _ + +derive instance Newtype AuthorityToken _ + +-------------------------------------------------------------------------------- + +_AuthorityToken :: Iso' AuthorityToken {authority :: AssetClass} +_AuthorityToken = _Newtype diff --git a/agora-purescript-bridge/src/Agora/Effect/TreasuryWithdrawal.purs b/agora-purescript-bridge/src/Agora/Effect/TreasuryWithdrawal.purs new file mode 100644 index 0000000..23a9e53 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/Effect/TreasuryWithdrawal.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Agora.Effect.TreasuryWithdrawal where + +import Prelude + +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple) +import Plutus.V1.Ledger.Credential (Credential) +import Plutus.V1.Ledger.Value (Value) +import Type.Proxy (Proxy(Proxy)) + +newtype TreasuryWithdrawalDatum = TreasuryWithdrawalDatum + { receivers :: Array (Tuple Credential Value) + , treasuries :: Array Credential + } + +derive instance Generic TreasuryWithdrawalDatum _ + +derive instance Newtype TreasuryWithdrawalDatum _ + +-------------------------------------------------------------------------------- + +_TreasuryWithdrawalDatum :: Iso' TreasuryWithdrawalDatum {receivers :: Array (Tuple Credential Value), treasuries :: Array Credential} +_TreasuryWithdrawalDatum = _Newtype diff --git a/agora-purescript-bridge/src/Agora/Governor.purs b/agora-purescript-bridge/src/Agora/Governor.purs new file mode 100644 index 0000000..e8f5384 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/Governor.purs @@ -0,0 +1,77 @@ +-- File auto generated by purescript-bridge! -- +module Agora.Governor where + +import Prelude + +import Agora.Proposal (ProposalId, ProposalThresholds) +import Data.Bounded.Generic (genericBottom, genericTop) +import Data.Enum (class Enum) +import Data.Enum.Generic (genericPred, genericSucc) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Type.Proxy (Proxy(Proxy)) + +newtype GovernorDatum = GovernorDatum + { proposalThresholds :: ProposalThresholds + , nextProposalId :: ProposalId + } + +derive instance Generic GovernorDatum _ + +derive instance Newtype GovernorDatum _ + +-------------------------------------------------------------------------------- + +_GovernorDatum :: Iso' GovernorDatum {proposalThresholds :: ProposalThresholds, nextProposalId :: ProposalId} +_GovernorDatum = _Newtype + +-------------------------------------------------------------------------------- + +data GovernorRedeemer + = CreateProposal + | MintGATs + +derive instance Generic GovernorRedeemer _ + +instance Enum GovernorRedeemer where + succ = genericSucc + pred = genericPred + +instance Bounded GovernorRedeemer where + bottom = genericBottom + top = genericTop + +-------------------------------------------------------------------------------- + +_CreateProposal :: Prism' GovernorRedeemer Unit +_CreateProposal = prism' (const CreateProposal) case _ of + CreateProposal -> Just unit + _ -> Nothing + +_MintGATs :: Prism' GovernorRedeemer Unit +_MintGATs = prism' (const MintGATs) case _ of + MintGATs -> Just unit + _ -> Nothing + +-------------------------------------------------------------------------------- + +data Governor = Governor + +derive instance Generic Governor _ + +instance Enum Governor where + succ = genericSucc + pred = genericPred + +instance Bounded Governor where + bottom = genericBottom + top = genericTop + +-------------------------------------------------------------------------------- + +_Governor :: Iso' Governor Unit +_Governor = iso (const unit) (const Governor) diff --git a/agora-purescript-bridge/src/Agora/MultiSig.purs b/agora-purescript-bridge/src/Agora/MultiSig.purs new file mode 100644 index 0000000..0ae74d8 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/MultiSig.purs @@ -0,0 +1,28 @@ +-- File auto generated by purescript-bridge! -- +module Agora.MultiSig where + +import Prelude + +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import GHC.Num.Integer (Integer) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Type.Proxy (Proxy(Proxy)) + +newtype MultiSig = MultiSig + { keys :: Array PubKeyHash + , minSigs :: Integer + } + +derive instance Generic MultiSig _ + +derive instance Newtype MultiSig _ + +-------------------------------------------------------------------------------- + +_MultiSig :: Iso' MultiSig {keys :: Array PubKeyHash, minSigs :: Integer} +_MultiSig = _Newtype diff --git a/agora-purescript-bridge/src/Agora/Proposal.purs b/agora-purescript-bridge/src/Agora/Proposal.purs new file mode 100644 index 0000000..317987c --- /dev/null +++ b/agora-purescript-bridge/src/Agora/Proposal.purs @@ -0,0 +1,186 @@ +-- File auto generated by purescript-bridge! -- +module Agora.Proposal where + +import Prelude + +import Agora.SafeMoney (GTTag) +import Data.Bounded.Generic (genericBottom, genericTop) +import Data.Enum (class Enum) +import Data.Enum.Generic (genericPred, genericSucc) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tagged (Tagged) +import Data.Tuple (Tuple) +import GHC.Num.Integer (Integer) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.Scripts (DatumHash, ValidatorHash) +import Plutus.V1.Ledger.Value (AssetClass) +import PlutusTx.AssocMap (Map) +import Type.Proxy (Proxy(Proxy)) + +newtype ProposalId = ProposalId { proposalTag :: Integer } + +derive instance Generic ProposalId _ + +derive instance Newtype ProposalId _ + +-------------------------------------------------------------------------------- + +_ProposalId :: Iso' ProposalId {proposalTag :: Integer} +_ProposalId = _Newtype + +-------------------------------------------------------------------------------- + +newtype ResultTag = ResultTag { getResultTag :: Integer } + +derive instance Generic ResultTag _ + +derive instance Newtype ResultTag _ + +-------------------------------------------------------------------------------- + +_ResultTag :: Iso' ResultTag {getResultTag :: Integer} +_ResultTag = _Newtype + +-------------------------------------------------------------------------------- + +data ProposalStatus + = Draft + | VotingReady + | Locked + | Finished + +derive instance Generic ProposalStatus _ + +instance Enum ProposalStatus where + succ = genericSucc + pred = genericPred + +instance Bounded ProposalStatus where + bottom = genericBottom + top = genericTop + +-------------------------------------------------------------------------------- + +_Draft :: Prism' ProposalStatus Unit +_Draft = prism' (const Draft) case _ of + Draft -> Just unit + _ -> Nothing + +_VotingReady :: Prism' ProposalStatus Unit +_VotingReady = prism' (const VotingReady) case _ of + VotingReady -> Just unit + _ -> Nothing + +_Locked :: Prism' ProposalStatus Unit +_Locked = prism' (const Locked) case _ of + Locked -> Just unit + _ -> Nothing + +_Finished :: Prism' ProposalStatus Unit +_Finished = prism' (const Finished) case _ of + Finished -> Just unit + _ -> Nothing + +-------------------------------------------------------------------------------- + +newtype ProposalThresholds = ProposalThresholds + { countVoting :: Tagged GTTag Integer + , create :: Tagged GTTag Integer + , startVoting :: Tagged GTTag Integer + } + +derive instance Generic ProposalThresholds _ + +derive instance Newtype ProposalThresholds _ + +-------------------------------------------------------------------------------- + +_ProposalThresholds :: Iso' ProposalThresholds {countVoting :: Tagged GTTag Integer, create :: Tagged GTTag Integer, startVoting :: Tagged GTTag Integer} +_ProposalThresholds = _Newtype + +-------------------------------------------------------------------------------- + +newtype ProposalVotes = ProposalVotes { getProposalVotes :: Map ResultTag Integer } + +derive instance Generic ProposalVotes _ + +derive instance Newtype ProposalVotes _ + +-------------------------------------------------------------------------------- + +_ProposalVotes :: Iso' ProposalVotes {getProposalVotes :: Map ResultTag Integer} +_ProposalVotes = _Newtype + +-------------------------------------------------------------------------------- + +newtype ProposalDatum = ProposalDatum + { proposalId :: ProposalId + , effects :: Map ResultTag (Array (Tuple ValidatorHash DatumHash)) + , status :: ProposalStatus + , cosigners :: Array PubKeyHash + , thresholds :: ProposalThresholds + , votes :: ProposalVotes + } + +derive instance Generic ProposalDatum _ + +derive instance Newtype ProposalDatum _ + +-------------------------------------------------------------------------------- + +_ProposalDatum :: Iso' ProposalDatum {proposalId :: ProposalId, effects :: Map ResultTag (Array (Tuple ValidatorHash DatumHash)), status :: ProposalStatus, cosigners :: Array PubKeyHash, thresholds :: ProposalThresholds, votes :: ProposalVotes} +_ProposalDatum = _Newtype + +-------------------------------------------------------------------------------- + +data ProposalRedeemer + = Vote ResultTag + | Cosign (Array PubKeyHash) + | Unlock ResultTag + | AdvanceProposal + +derive instance Generic ProposalRedeemer _ + +-------------------------------------------------------------------------------- + +_Vote :: Prism' ProposalRedeemer ResultTag +_Vote = prism' Vote case _ of + (Vote a) -> Just a + _ -> Nothing + +_Cosign :: Prism' ProposalRedeemer (Array PubKeyHash) +_Cosign = prism' Cosign case _ of + (Cosign a) -> Just a + _ -> Nothing + +_Unlock :: Prism' ProposalRedeemer ResultTag +_Unlock = prism' Unlock case _ of + (Unlock a) -> Just a + _ -> Nothing + +_AdvanceProposal :: Prism' ProposalRedeemer Unit +_AdvanceProposal = prism' (const AdvanceProposal) case _ of + AdvanceProposal -> Just unit + _ -> Nothing + +-------------------------------------------------------------------------------- + +newtype Proposal = Proposal + { governorSTAssetClass :: AssetClass + , stakeSTAssetClass :: AssetClass + , maximumCosigners :: Integer + } + +derive instance Generic Proposal _ + +derive instance Newtype Proposal _ + +-------------------------------------------------------------------------------- + +_Proposal :: Iso' Proposal {governorSTAssetClass :: AssetClass, stakeSTAssetClass :: AssetClass, maximumCosigners :: Integer} +_Proposal = _Newtype diff --git a/agora-purescript-bridge/src/Agora/Stake.purs b/agora-purescript-bridge/src/Agora/Stake.purs new file mode 100644 index 0000000..3fcb1d4 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/Stake.purs @@ -0,0 +1,103 @@ +-- File auto generated by purescript-bridge! -- +module Agora.Stake where + +import Prelude + +import Agora.Proposal (ProposalId, ResultTag) +import Agora.SafeMoney (GTTag) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tagged (Tagged) +import GHC.Num.Integer (Integer) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.Value (AssetClass) +import Type.Proxy (Proxy(Proxy)) + +newtype Stake = Stake + { gtClassRef :: Tagged GTTag AssetClass + , proposalSTClass :: AssetClass + } + +derive instance Generic Stake _ + +derive instance Newtype Stake _ + +-------------------------------------------------------------------------------- + +_Stake :: Iso' Stake {gtClassRef :: Tagged GTTag AssetClass, proposalSTClass :: AssetClass} +_Stake = _Newtype + +-------------------------------------------------------------------------------- + +newtype ProposalLock = ProposalLock + { vote :: ResultTag + , proposalId :: ProposalId + } + +derive instance Generic ProposalLock _ + +derive instance Newtype ProposalLock _ + +-------------------------------------------------------------------------------- + +_ProposalLock :: Iso' ProposalLock {vote :: ResultTag, proposalId :: ProposalId} +_ProposalLock = _Newtype + +-------------------------------------------------------------------------------- + +data StakeRedeemer + = DepositWithdraw (Tagged GTTag Integer) + | Destroy + | PermitVote ProposalLock + | RetractVotes (Array ProposalLock) + | WitnessStake + +derive instance Generic StakeRedeemer _ + +-------------------------------------------------------------------------------- + +_DepositWithdraw :: Prism' StakeRedeemer (Tagged GTTag Integer) +_DepositWithdraw = prism' DepositWithdraw case _ of + (DepositWithdraw a) -> Just a + _ -> Nothing + +_Destroy :: Prism' StakeRedeemer Unit +_Destroy = prism' (const Destroy) case _ of + Destroy -> Just unit + _ -> Nothing + +_PermitVote :: Prism' StakeRedeemer ProposalLock +_PermitVote = prism' PermitVote case _ of + (PermitVote a) -> Just a + _ -> Nothing + +_RetractVotes :: Prism' StakeRedeemer (Array ProposalLock) +_RetractVotes = prism' RetractVotes case _ of + (RetractVotes a) -> Just a + _ -> Nothing + +_WitnessStake :: Prism' StakeRedeemer Unit +_WitnessStake = prism' (const WitnessStake) case _ of + WitnessStake -> Just unit + _ -> Nothing + +-------------------------------------------------------------------------------- + +newtype StakeDatum = StakeDatum + { stakedAmount :: Tagged GTTag Integer + , owner :: PubKeyHash + , lockedBy :: Array ProposalLock + } + +derive instance Generic StakeDatum _ + +derive instance Newtype StakeDatum _ + +-------------------------------------------------------------------------------- + +_StakeDatum :: Iso' StakeDatum {stakedAmount :: Tagged GTTag Integer, owner :: PubKeyHash, lockedBy :: Array ProposalLock} +_StakeDatum = _Newtype diff --git a/agora-purescript-bridge/src/Agora/Treasury.purs b/agora-purescript-bridge/src/Agora/Treasury.purs new file mode 100644 index 0000000..df58ff2 --- /dev/null +++ b/agora-purescript-bridge/src/Agora/Treasury.purs @@ -0,0 +1,31 @@ +-- File auto generated by purescript-bridge! -- +module Agora.Treasury where + +import Prelude + +import Data.Bounded.Generic (genericBottom, genericTop) +import Data.Enum (class Enum) +import Data.Enum.Generic (genericPred, genericSucc) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Type.Proxy (Proxy(Proxy)) + +data TreasuryRedeemer = SpendTreasuryGAT + +derive instance Generic TreasuryRedeemer _ + +instance Enum TreasuryRedeemer where + succ = genericSucc + pred = genericPred + +instance Bounded TreasuryRedeemer where + bottom = genericBottom + top = genericTop + +-------------------------------------------------------------------------------- + +_SpendTreasuryGAT :: Iso' TreasuryRedeemer Unit +_SpendTreasuryGAT = iso (const unit) (const SpendTreasuryGAT) From b363b326f3ff0dbcc082bc9f09e5c21074745cfc Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 20:13:18 +0800 Subject: [PATCH 6/7] add `make ps_bridge` subcommand --- Makefile | 7 ++++++- agora-purescript-bridge/Options.hs | 2 +- agora/Agora/AuthorityToken.hs | 5 +++-- agora/Agora/Stake.hs | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3077e0b..dbc3fd6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This really ought to be `/usr/bin/env bash`, but nix flakes don't like that. SHELL := /bin/sh -.PHONY: hoogle format haddock usage tag lint +.PHONY: hoogle format haddock usage tag lint ps_bridge usage: @echo "usage: make [OPTIONS]" @@ -12,6 +12,7 @@ usage: @echo " haddock -- Generate Haddock docs for project" @echo " tag -- Generate CTAGS and ETAGS files for project" @echo " lint -- Get hlint suggestions for project" + @echo " ps_bridge -- Generate purescript bridge files" hoogle: pkill hoogle || true @@ -43,3 +44,7 @@ tag: lint: hlint agora agora-bench agora-test + +PS_BRIDGE_OUTPUT_DIR := agora-purescript-bridge/ +ps_bridge: + cabal run exe:agora-purescript-bridge -- -o $(PS_BRIDGE_OUTPUT_DIR) \ No newline at end of file diff --git a/agora-purescript-bridge/Options.hs b/agora-purescript-bridge/Options.hs index cd1d1cc..f4d2d27 100644 --- a/agora-purescript-bridge/Options.hs +++ b/agora-purescript-bridge/Options.hs @@ -46,6 +46,6 @@ parseOptions = Opt.execParser p srcFilePath :: FilePath -> FilePath srcFilePath path = fromRelDir $ fromJust $ do - dir <- parseRelDir $ path + dir <- parseRelDir path srcSubDir <- parseRelDir "src" return $ dir srcSubDir diff --git a/agora/Agora/AuthorityToken.hs b/agora/Agora/AuthorityToken.hs index cac8869..ae6a7ce 100644 --- a/agora/Agora/AuthorityToken.hs +++ b/agora/Agora/AuthorityToken.hs @@ -24,10 +24,10 @@ import Plutarch.Api.V1 ( PTxOut (..), ) import Plutarch.Api.V1.AssocMap (PMap (PMap)) +import Plutarch.Api.V1.Extra (passetClass, passetClassValueOf) import Plutarch.Api.V1.Value (PValue (PValue)) import Plutarch.Builtin (pforgetData) import Plutus.V1.Ledger.Value (AssetClass (AssetClass)) -import Plutarch.Api.V1.Extra (passetClass, passetClassValueOf) -------------------------------------------------------------------------------- @@ -55,7 +55,8 @@ import Agora.Utils ( newtype AuthorityToken = AuthorityToken { authority :: AssetClass -- ^ Token that must move in order for minting this to be valid. - } deriving stock (GHC.Generic) + } + deriving stock (GHC.Generic) -------------------------------------------------------------------------------- diff --git a/agora/Agora/Stake.hs b/agora/Agora/Stake.hs index 351eab6..a33f632 100644 --- a/agora/Agora/Stake.hs +++ b/agora/Agora/Stake.hs @@ -81,7 +81,8 @@ data Stake = Stake { gtClassRef :: Tagged GTTag AssetClass -- ^ Used when inlining the AssetClass of a 'PDiscrete' in the script code. , proposalSTClass :: AssetClass - } deriving stock (GHC.Generic) + } + deriving stock (GHC.Generic) {- | A lock placed on a Stake datum in order to prevent depositing and withdrawing when votes are in place. From a90b2337dc8d1aff54489b2c78df9d290bda9e6c Mon Sep 17 00:00:00 2001 From: fanghr Date: Fri, 13 May 2022 20:30:11 +0800 Subject: [PATCH 7/7] fix lint/tag; run linter --- Makefile | 6 +++--- agora-purescript-bridge/Options.hs | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index dbc3fd6..887a617 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,11 @@ haddock: cabal haddock --haddock-html --haddock-hoogle --builddir=haddock tag: - hasktags -x agora agora-bench agora-test + hasktags -x agora agora-bench agora-test agora-testlib agora-sample agora-purescript-bridge lint: - hlint agora agora-bench agora-test + hlint agora agora-bench agora-test agora-testlib agora-sample agora-purescript-bridge PS_BRIDGE_OUTPUT_DIR := agora-purescript-bridge/ ps_bridge: - cabal run exe:agora-purescript-bridge -- -o $(PS_BRIDGE_OUTPUT_DIR) \ No newline at end of file + cabal run exe:agora-purescript-bridge -- -o $(PS_BRIDGE_OUTPUT_DIR) diff --git a/agora-purescript-bridge/Options.hs b/agora-purescript-bridge/Options.hs index f4d2d27..b93c50b 100644 --- a/agora-purescript-bridge/Options.hs +++ b/agora-purescript-bridge/Options.hs @@ -14,13 +14,13 @@ data Options = Options outputOpt :: Opt.Parser FilePath outputOpt = srcFilePath - <$> ( Opt.strOption $ - Opt.long "output-path" - <> Opt.short 'o' - <> Opt.metavar "OUTPUT_PATH" - <> Opt.value "./" - <> Opt.help "Output purescripts will be in OUTPUT_PATH/src" - ) + <$> Opt.strOption + ( Opt.long "output-path" + <> Opt.short 'o' + <> Opt.metavar "OUTPUT_PATH" + <> Opt.value "./" + <> Opt.help "Output purescripts will be in OUTPUT_PATH/src" + ) quietOpt :: Opt.Parser Bool quietOpt =