From 51db3469a36af3bf9236b3ced018983267e8c5aa Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 3 Feb 2023 15:18:00 +0800 Subject: [PATCH 01/11] Upgrade to plutus-apps v1.1.0 --- cabal.project | 432 +++++++++++++++++++------------------------------- 1 file changed, 163 insertions(+), 269 deletions(-) diff --git a/cabal.project b/cabal.project index f94d18a..bf161dd 100644 --- a/cabal.project +++ b/cabal.project @@ -1,70 +1,117 @@ -index-state: 2022-02-22T20:47:03Z +-- plutus-starter package +packages: + plutus-starter.cabal -packages: ./. - --- You never, ever, want this. -write-ghc-environment-files: never - --- Always build tests and benchmarks. -tests: true -benchmarks: true - --- Plutus apps revision from 2022-04-06 +-- plutus apps release source-repository-package type: git location: https://github.com/input-output-hk/plutus-apps.git - tag: v0.1.0 - subdir: - doc - freer-extras - playground-common - plutus-chain-index - plutus-chain-index-core - plutus-contract - plutus-example - plutus-contract-certification - plutus-ledger - plutus-ledger-constraints - plutus-pab - plutus-pab-executables - plutus-playground-server - plutus-script-utils - plutus-streaming - plutus-tx-constraints - plutus-use-cases - web-ghc + tag: v1.1.0 + subdir: cardano-node-emulator + cardano-streaming + doc + freer-extras + marconi + marconi-mamba + playground-common + pab-blockfrost + plutus-chain-index + plutus-chain-index-core + plutus-contract + plutus-contract-certification + plutus-example + plutus-ledger + plutus-ledger-constraints + plutus-pab + plutus-pab-executables + plutus-script-utils + plutus-tx-constraints + plutus-use-cases + rewindable-index + +-- The following sections are copied from the 'plutus-apps' repository +-- cabal.project at the revision given above. +-- This is necessary because the 'plutus-apps' libraries dependencies +-- come from various sources (e.g. cardano haskell packages repository, github) +-- and cabal constraint solver needs some help choosing a set of +-- compatible versions. + +-- Custom repository for cardano haskell packages +-- See https://github.com/input-output-hk/cardano-haskell-packages on how to use CHaP in a Haskell project. +repository cardano-haskell-packages + url: https://input-output-hk.github.io/cardano-haskell-packages + secure: True + root-keys: + 3e0cce471cf09815f930210f7827266fd09045445d65923e6d0238a6cd15126f + 443abb7fb497a134c343faf52f0b659bd7999bc06b7f63fa76dc99d631f9bea1 + a86a1f6ce86c449c46666bda44268677abf29b5b2d2eb5ec7af903ec2f117a82 + bcec67e8e99cabfa7764d75ad9b158d72bfacf70ca1d0ec8bc6b4406d1bf8413 + c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56 + d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee + +-- because of a limitation in haskell.nix index-state has to be repeated for +-- hackage. +index-state: 2022-12-22T00:00:00Z +index-state: + , hackage.haskell.org 2022-12-22T00:00:00Z + , cardano-haskell-packages 2022-12-22T00:00:00Z + +allow-newer: + -- cardano-ledger packages need aeson >2, the following packages have a + -- too restictive upper bounds on aeson, so we relax them here. The hackage + -- trustees can make a revision to these packages cabal file to solve the + -- issue permanently. + , ekg:aeson + , ekg-json:aeson + , openapi3:aeson + , servant:aeson + , servant-client-core:aeson + , servant-server:aeson +constraints: + -- cardano-prelude-0.1.0.0 needs + , protolude <0.3.1 --- The following sections are copied from the 'plutus-apps' repository cabal.project at the revision --- given above. --- This is necessary because the 'plutus-apps' libraries depend on a number of other libraries which are --- not on Hackage, and so need to be pulled in as `source-repository-package`s themselves. Make sure to --- re-update this section from the template when you do an upgrade. + -- cardano-ledger-byron-0.1.0.0 needs + , cardano-binary <1.5.0.1 --- We never, ever, want this. -write-ghc-environment-files: never + -- plutus-core-1.0.0.1 needs + , cardano-crypto-class >2.0.0.0 + , algebraic-graphs <0.7 --- Always build tests and benchmarks. -tests: true -benchmarks: true + -- cardano-ledger-core-0.1.0.0 needs + , cardano-crypto-class <2.0.0.1 --- The only sensible test display option. -test-show-details: streaming + -- cardano-crypto-class-2.0.0.0.1 needs + , cardano-prelude <0.1.0.1 -allow-newer: - size-based:template-haskell + -- dbvar from cardano-wallet needs + , io-classes <0.3.0.0 -constraints: - -- Because later versions of hedgehog introduce a change which break 'cardano-ledger': - -- Test/Cardano/Chain/Delegation/Model.hs:91:41: error: - -- • Could not deduce (TraversableB SignalSDELEG) - -- TODO: Try to remove on next `cardano-node` version upgrade. - hedgehog >= 1.0.2 && < 1.1 + -- newer typed-protocols need io-classes>=0.3.0.0 which is incompatible with dbvar's constraint above + , typed-protocols==0.1.0.0 + + , aeson >= 2 + + , hedgehog >= 1.1 + +-- The plugin will typically fail when producing Haddock documentation. However, +-- in this instance you can simply tell it to defer any errors to runtime (which +-- will never happen since you're building documentation). +-- +-- So, any package using 'PlutusTx.compile' in the code for which you need to +-- generate haddock documentation should use the following 'haddock-options'. +package plutus-ledger + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" +package plutus-script-utils + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" +package plutus-contract + haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" -- These packages appear in our dependency tree and are very slow to build. -- Empirically, turning off optimization shaves off ~50% build time. -- It also mildly improves recompilation avoidance. --- For deve work we don't care about performance so much, so this is okay. +-- For dev work we don't care about performance so much, so this is okay. package cardano-ledger-alonzo optimization: False package ouroboros-consensus-shelley @@ -84,233 +131,80 @@ package cardano-wallet-launcher package cardano-wallet-core-integration optimization: False --- Direct dependency. --- Are you thinking of updating this tag to some other commit? --- Please ensure that the commit you are about to use is the latest one from --- the *develop* branch of this repo: --- * --- (not master!) --- --- In particular we rely on the code from this PR: --- * --- being merged. source-repository-package - type: git - location: https://github.com/input-output-hk/iohk-monitoring-framework - tag: 46f994e216a1f8b36fe4669b47b2a7011b0e153c - subdir: - contra-tracer - iohk-monitoring - tracer-transformers - plugins/backend-ekg - plugins/backend-aggregation - plugins/backend-monitoring - plugins/backend-trace-forwarder + type: git + location: https://github.com/input-output-hk/cardano-wallet + tag: 18a931648550246695c790578d4a55ee2f10463e + subdir: + lib/cli + lib/core + lib/core-integration + lib/dbvar + lib/launcher + lib/numeric + lib/shelley + lib/strict-non-empty-containers + lib/test-utils + lib/text-class -- Direct dependency. source-repository-package - type: git - location: https://github.com/input-output-hk/plutus - tag: 6d9ac7c2f89363d574dbc10be5c2db4b661c9a43 - subdir: - plutus-core - plutus-ledger-api - plutus-tx - plutus-tx-plugin - prettyprinter-configurable - stubs/plutus-ghc-stub - word-array - --- Should follow plutus. -source-repository-package - type: git - location: https://github.com/Quid2/flat - tag: ee59880f47ab835dbd73bea0847dab7869fc20d8 + type: git + location: https://github.com/input-output-hk/servant-purescript + tag: 44e7cacf109f84984cd99cd3faf185d161826963 -- Direct dependency. source-repository-package - type: git - location: https://github.com/input-output-hk/servant-purescript - tag: 44e7cacf109f84984cd99cd3faf185d161826963 + type: git + location: https://github.com/input-output-hk/purescript-bridge + tag: 47a1f11825a0f9445e0f98792f79172efef66c00 -- Direct dependency. source-repository-package - type: git - location: https://github.com/input-output-hk/purescript-bridge - tag: 47a1f11825a0f9445e0f98792f79172efef66c00 - --- Direct dependency. --- Compared to others, cardano-wallet doesn't bump dependencies very often. --- Making it a good place to start when bumping dependencies. --- As, for example, bumping the node first highly risks breaking API with the wallet. --- Unless early bug fixes are required, this is fine as the wallet tracks stable releases of the node. --- And it is indeed nice for plutus-apps to track stable releases of the node too. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-wallet - tag: f6d4db733c4e47ee11683c343b440552f59beff7 - subdir: - lib/cli - lib/core - lib/core-integration - lib/dbvar - lib/launcher - lib/numeric - lib/shelley - lib/strict-non-empty-containers - lib/test-utils - lib/text-class - + type: git + location: https://github.com/Quviq/quickcheck-contractmodel + tag: 462f8c25bea15f88e179e12ebf4e3a4ffcc92d18 + subdir: + contractmodel -- Should follow cardano-wallet. --- Currently tracking v1.34.1. source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-node - tag: 2b1d18c6c7b7142d9eebfec34da48840ed4409b6 - subdir: - cardano-api - cardano-cli - cardano-git-rev - cardano-node - cardano-testnet - trace-dispatcher - trace-forward - trace-resources - -source-repository-package - type: git - location: https://github.com/input-output-hk/ekg-forward - tag: 297cd9db5074339a2fb2e5ae7d0780debb670c63 - -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-config - tag: e9de7a2cf70796f6ff26eac9f9540184ded0e4e6 - --sha256: 1wm1c99r5zvz22pdl8nhkp13falvqmj8dgkm8fxskwa9ydqz01ld - --- Using a fork until our patches can be merged upstream -source-repository-package - type: git - location: https://github.com/input-output-hk/optparse-applicative - tag: 7497a29cb998721a9068d5725d49461f2bba0e7a - --sha256: 1gvsrg925vynwgqwplgjmp53vj953qyh3wbdf34pw21c8r47w35r - -source-repository-package - type: git - location: https://github.com/input-output-hk/hedgehog-extras - tag: edf6945007177a638fbeb8802397f3a6f4e47c14 - --sha256: 0wc7qzkc7j4ns2rz562h6qrx2f8xyq7yjcb7zidnj7f6j0pcd0i9 - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-ledger - tag: 1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5 - subdir: - eras/alonzo/impl - eras/byron/chain/executable-spec - eras/byron/crypto - eras/byron/crypto/test - eras/byron/ledger/executable-spec - eras/byron/ledger/impl - eras/byron/ledger/impl/test - eras/shelley/impl - eras/shelley/test-suite - eras/shelley-ma/impl - libs/cardano-data - libs/cardano-ledger-core - libs/cardano-ledger-pretty - libs/cardano-protocol-tpraos - libs/compact-map - libs/non-integral - libs/set-algebra - libs/small-steps - libs/small-steps-test - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/ouroboros-network - tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf - subdir: - io-classes - io-sim - monoidal-synchronisation - network-mux - ntp-client - ouroboros-consensus - ouroboros-consensus-byron - ouroboros-consensus-cardano - ouroboros-consensus-protocol - ouroboros-consensus-shelley - ouroboros-network - ouroboros-network-framework - ouroboros-network-testing - strict-stm - typed-protocols - typed-protocols-cborg - typed-protocols-examples - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-base - tag: 41545ba3ac6b3095966316a99883d678b5ab8da8 - subdir: - base-deriving-via - binary - binary/test - cardano-crypto-class - cardano-crypto-praos - measures - orphans-deriving-via - slotting - strict-containers - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-prelude - tag: bb4ed71ba8e587f672d06edf9d2e376f4b055555 - subdir: - cardano-prelude - cardano-prelude-test - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-crypto - tag: f73079303f663e028288f9f4a9e08bcca39a923e - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-addresses - tag: 71006f9eb956b0004022e80aadd4ad50d837b621 - subdir: - command-line - core - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/goblins - tag: cde90a2b27f79187ca8310b6549331e59595e7ba - --- Should follow cardano-wallet. -source-repository-package - type: git - location: https://github.com/input-output-hk/Win32-network - tag: 3825d3abf75f83f406c1f7161883c438dac7277d - --- Temporary indexing -source-repository-package - type: git - location: https://github.com/raduom/hysterical-screams - tag: 4c523469e9efd3f0d10d17da3304923b7b0e0674 - -source-repository-package - type: git - location: https://github.com/input-output-hk/quickcheck-dynamic - tag: c272906361471d684440f76c297e29ab760f6a1e + type: git + location: https://github.com/input-output-hk/cardano-addresses + tag: b7273a5d3c21f1a003595ebf1e1f79c28cd72513 + subdir: + -- cardano-addresses-cli + command-line + -- cardano-addresses + core + +-- This is needed because we rely on an unreleased feature +-- https://github.com/input-output-hk/cardano-ledger/pull/3111 +source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-ledger + tag: da3e9ae10cf9ef0b805a046c84745f06643583c2 + subdir: + eras/alonzo/impl + eras/alonzo/test-suite + eras/babbage/impl + eras/babbage/test-suite + eras/byron/chain/executable-spec + eras/byron/crypto + eras/byron/crypto/test + eras/byron/ledger/executable-spec + eras/byron/ledger/impl + eras/byron/ledger/impl/test + eras/shelley/impl + eras/shelley/test-suite + eras/shelley-ma/impl + eras/shelley-ma/test-suite + libs/cardano-ledger-core + libs/cardano-ledger-pretty + libs/cardano-protocol-tpraos + libs/cardano-data + libs/vector-map + libs/set-algebra + libs/small-steps + libs/small-steps-test + libs/non-integral From c5638fcc0326f943573417b591e60b0ec74fe8e7 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 3 Feb 2023 16:10:25 +0800 Subject: [PATCH 02/11] Simple flake setup --- cabal.project | 127 ++--- default.nix | 35 -- flake.lock | 929 +++++++++++++++++++++++++++++++++ flake.nix | 71 +++ nix/default.nix | 21 - nix/lib/ci.nix | 201 ------- nix/pkgs/default.nix | 30 -- nix/pkgs/haskell/default.nix | 37 -- nix/pkgs/haskell/haskell.nix | 43 -- nix/pkgs/haskell/sha256map.nix | 22 - nix/sources.json | 14 - nix/sources.nix | 174 ------ release.nix | 87 --- shell.nix | 26 - 14 files changed, 1067 insertions(+), 750 deletions(-) delete mode 100644 default.nix create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 nix/default.nix delete mode 100644 nix/lib/ci.nix delete mode 100644 nix/pkgs/default.nix delete mode 100644 nix/pkgs/haskell/default.nix delete mode 100644 nix/pkgs/haskell/haskell.nix delete mode 100644 nix/pkgs/haskell/sha256map.nix delete mode 100644 nix/sources.json delete mode 100644 nix/sources.nix delete mode 100644 release.nix delete mode 100644 shell.nix diff --git a/cabal.project b/cabal.project index bf161dd..f58a200 100644 --- a/cabal.project +++ b/cabal.project @@ -28,6 +28,7 @@ source-repository-package plutus-tx-constraints plutus-use-cases rewindable-index + --sha256: 0x0v5gpkj5f6gy0ivh1f8ky445bb1aplhhjm8s93sxx9asib835f -- The following sections are copied from the 'plutus-apps' repository -- cabal.project at the revision given above. @@ -132,79 +133,85 @@ package cardano-wallet-core-integration optimization: False source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-wallet - tag: 18a931648550246695c790578d4a55ee2f10463e - subdir: - lib/cli - lib/core - lib/core-integration - lib/dbvar - lib/launcher - lib/numeric - lib/shelley - lib/strict-non-empty-containers - lib/test-utils - lib/text-class + type: git + location: https://github.com/input-output-hk/cardano-wallet + tag: 18a931648550246695c790578d4a55ee2f10463e + subdir: + lib/cli + lib/core + lib/core-integration + lib/dbvar + lib/launcher + lib/numeric + lib/shelley + lib/strict-non-empty-containers + lib/test-utils + lib/text-class + --sha256: 0i40hp1mdbljjcj4pn3n6zahblkb2jmpm8l4wnb36bya1pzf66fx -- Direct dependency. source-repository-package - type: git - location: https://github.com/input-output-hk/servant-purescript - tag: 44e7cacf109f84984cd99cd3faf185d161826963 + type: git + location: https://github.com/input-output-hk/servant-purescript + tag: 44e7cacf109f84984cd99cd3faf185d161826963 + --sha256: 10pb0yfp80jhb9ryn65a4rha2lxzsn2vlhcc6xphrrkf4x5lhzqc -- Direct dependency. source-repository-package - type: git - location: https://github.com/input-output-hk/purescript-bridge - tag: 47a1f11825a0f9445e0f98792f79172efef66c00 + type: git + location: https://github.com/input-output-hk/purescript-bridge + tag: 47a1f11825a0f9445e0f98792f79172efef66c00 + --sha256: 0da1vn2l6iyfxcjk58qal1l4755v92zi6yppmjmqvxf1gacyf9px -- Direct dependency. source-repository-package - type: git - location: https://github.com/Quviq/quickcheck-contractmodel - tag: 462f8c25bea15f88e179e12ebf4e3a4ffcc92d18 - subdir: - contractmodel + type: git + location: https://github.com/Quviq/quickcheck-contractmodel + tag: 462f8c25bea15f88e179e12ebf4e3a4ffcc92d18 + subdir: + contractmodel + --sha256: 0ml3avnydsw40yf48hbakcbpimp446rchgzhrzl92by6c9lw3mfh -- Should follow cardano-wallet. source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-addresses - tag: b7273a5d3c21f1a003595ebf1e1f79c28cd72513 - subdir: - -- cardano-addresses-cli - command-line - -- cardano-addresses - core + type: git + location: https://github.com/input-output-hk/cardano-addresses + tag: b7273a5d3c21f1a003595ebf1e1f79c28cd72513 + subdir: + -- cardano-addresses-cli + command-line + -- cardano-addresses + core + --sha256: 129r5kyiw10n2021bkdvnr270aiiwyq58h472d151ph0r7wpslgp -- This is needed because we rely on an unreleased feature -- https://github.com/input-output-hk/cardano-ledger/pull/3111 source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-ledger - tag: da3e9ae10cf9ef0b805a046c84745f06643583c2 - subdir: - eras/alonzo/impl - eras/alonzo/test-suite - eras/babbage/impl - eras/babbage/test-suite - eras/byron/chain/executable-spec - eras/byron/crypto - eras/byron/crypto/test - eras/byron/ledger/executable-spec - eras/byron/ledger/impl - eras/byron/ledger/impl/test - eras/shelley/impl - eras/shelley/test-suite - eras/shelley-ma/impl - eras/shelley-ma/test-suite - libs/cardano-ledger-core - libs/cardano-ledger-pretty - libs/cardano-protocol-tpraos - libs/cardano-data - libs/vector-map - libs/set-algebra - libs/small-steps - libs/small-steps-test - libs/non-integral + type: git + location: https://github.com/input-output-hk/cardano-ledger + tag: da3e9ae10cf9ef0b805a046c84745f06643583c2 + subdir: + eras/alonzo/impl + eras/alonzo/test-suite + eras/babbage/impl + eras/babbage/test-suite + eras/byron/chain/executable-spec + eras/byron/crypto + eras/byron/crypto/test + eras/byron/ledger/executable-spec + eras/byron/ledger/impl + eras/byron/ledger/impl/test + eras/shelley/impl + eras/shelley/test-suite + eras/shelley-ma/impl + eras/shelley-ma/test-suite + libs/cardano-ledger-core + libs/cardano-ledger-pretty + libs/cardano-protocol-tpraos + libs/cardano-data + libs/vector-map + libs/set-algebra + libs/small-steps + libs/small-steps-test + libs/non-integral + --sha256: 1jg1h05gcms119mw7fz798xpj3hr5h426ga934vixmgf88m1jmfx diff --git a/default.nix b/default.nix deleted file mode 100644 index caddd49..0000000 --- a/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ source-repo-override ? { } }: -######################################################################## -# default.nix -- The top-level nix build file for plutus-starter. -# -# This file defines various attributes that are used for building and -# developing plutus-starter. -# -######################################################################## - -let - # Here a some of the various attributes for the variable 'packages': - # - # { pkgs - # plutus-starter: { - # haskell: { - # project # The Haskell project created by haskell-nix.project - # packages # All the packages defined by our project, including dependencies - # projectPackages # Just the packages in the project - # } - # hlint - # cabal-install - # stylish-haskell - # haskell-language-server - # } - # } - packages = import ./nix { inherit source-repo-override; }; - - inherit (packages) pkgs plutus-starter; - project = plutus-starter.haskell.project; -in -{ - inherit pkgs plutus-starter; - - inherit project; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..bd5b4c5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,929 @@ +{ + "nodes": { + "CHaP": { + "flake": false, + "locked": { + "lastModified": 1674756171, + "narHash": "sha256-edcHqVXXg11ueHMYhUzA4Cp9FgrhV/IbvA4XCB8DwFU=", + "owner": "input-output-hk", + "repo": "cardano-haskell-packages", + "rev": "bedbed3bcca19ef64b8a776bceeea052c2b69ea5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "repo", + "repo": "cardano-haskell-packages", + "type": "github" + } + }, + "HTTP": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "blank": { + "locked": { + "lastModified": 1625557891, + "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", + "owner": "divnix", + "repo": "blank", + "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "blank", + "type": "github" + } + }, + "cabal-32": { + "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": { + "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": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cardano-shell": { + "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" + } + }, + "devshell": { + "inputs": { + "flake-utils": [ + "haskell-nix", + "tullia", + "std", + "flake-utils" + ], + "nixpkgs": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1663445644, + "narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=", + "owner": "numtide", + "repo": "devshell", + "rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "dmerge": { + "inputs": { + "nixlib": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ], + "yants": [ + "haskell-nix", + "tullia", + "std", + "yants" + ] + }, + "locked": { + "lastModified": 1659548052, + "narHash": "sha256-fzI2gp1skGA8mQo/FBFrUAtY0GQkAIAaV/V127TJPyY=", + "owner": "divnix", + "repo": "data-merge", + "rev": "d160d18ce7b1a45b88344aa3f13ed1163954b497", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "data-merge", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1672831974, + "narHash": "sha256-z9k3MfslLjWQfnjBtEtJZdq3H7kyi2kQtUThfTgdRk0=", + "owner": "input-output-hk", + "repo": "flake-compat", + "rev": "45f2638735f8cdc40fe302742b79f248d23eb368", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "hkm/gitlab-fix", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "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_2": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "ghc-8.6.5-iohk": { + "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" + } + }, + "gomod2nix": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1655245309, + "narHash": "sha256-d/YPoQ/vFn1+GTmSdvbSBSTOai61FONxB4+Lt6w/IVI=", + "owner": "tweag", + "repo": "gomod2nix", + "rev": "40d32f82fc60d66402eb0972e6e368aeab3faf58", + "type": "github" + }, + "original": { + "owner": "tweag", + "repo": "gomod2nix", + "type": "github" + } + }, + "hackage": { + "flake": false, + "locked": { + "lastModified": 1675299877, + "narHash": "sha256-l2wyfpC0asKw8ZWCn1z8TP+lvBlBh2gGiTzBxVmo7Zg=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "774abe0825f763f5a9efcf02ecbffaf18f27f75d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "haskell-nix": { + "inputs": { + "HTTP": "HTTP", + "cabal-32": "cabal-32", + "cabal-34": "cabal-34", + "cabal-36": "cabal-36", + "cardano-shell": "cardano-shell", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "hackage": "hackage", + "hpc-coveralls": "hpc-coveralls", + "hydra": "hydra", + "iserv-proxy": "iserv-proxy", + "nixpkgs": [ + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003", + "nixpkgs-2105": "nixpkgs-2105", + "nixpkgs-2111": "nixpkgs-2111", + "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-2211": "nixpkgs-2211", + "nixpkgs-unstable": "nixpkgs-unstable", + "old-ghc-nix": "old-ghc-nix", + "stackage": "stackage", + "tullia": "tullia" + }, + "locked": { + "lastModified": 1675385484, + "narHash": "sha256-b+Ep2u0kBolcYlHZT13nDtD9foyT2YcEk5GHkGGXK0g=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "feaf719244aba9ed281948f56b90c06d7a3e3ed3", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "type": "github" + } + }, + "hpc-coveralls": { + "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" + } + }, + "hydra": { + "inputs": { + "nix": "nix", + "nixpkgs": [ + "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-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1675397182, + "narHash": "sha256-uVqKdtxUDSbLJfaHEs+t+wc9K4iMfPVmcYF5psbK4rI=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "03a6755865b7461b3b75dc34c3dd2d5e74920196", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iserv-proxy": { + "flake": false, + "locked": { + "lastModified": 1670983692, + "narHash": "sha256-avLo34JnI9HNyOuauK5R69usJm+GfW3MlyGlYxZhTgY=", + "ref": "hkm/remote-iserv", + "rev": "50d0abb3317ac439a4e7495b185a64af9b7b9300", + "revCount": 10, + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + }, + "original": { + "ref": "hkm/remote-iserv", + "type": "git", + "url": "https://gitlab.haskell.org/hamishmack/iserv-proxy.git" + } + }, + "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" + } + }, + "mdbook-kroki-preprocessor": { + "flake": false, + "locked": { + "lastModified": 1661755005, + "narHash": "sha256-1TJuUzfyMycWlOQH67LR63/ll2GDZz25I3JfScy/Jnw=", + "owner": "JoelCourtney", + "repo": "mdbook-kroki-preprocessor", + "rev": "93adb5716d035829efed27f65f2f0833a7d3e76f", + "type": "github" + }, + "original": { + "owner": "JoelCourtney", + "repo": "mdbook-kroki-preprocessor", + "type": "github" + } + }, + "n2c": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1665039323, + "narHash": "sha256-SAh3ZjFGsaCI8FRzXQyp56qcGdAqgKEfJWPCQ0Sr7tQ=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "b008fe329ffb59b67bf9e7b08ede6ee792f2741a", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs", + "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-nomad": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": [ + "haskell-nix", + "tullia", + "nix2container", + "flake-utils" + ], + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "haskell-nix", + "tullia", + "nixpkgs" + ], + "nixpkgs-lib": [ + "haskell-nix", + "tullia", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1658277770, + "narHash": "sha256-T/PgG3wUn8Z2rnzfxf2VqlR1CBjInPE0l1yVzXxPnt0=", + "owner": "tristanpemble", + "repo": "nix-nomad", + "rev": "054adcbdd0a836ae1c20951b67ed549131fd2d70", + "type": "github" + }, + "original": { + "owner": "tristanpemble", + "repo": "nix-nomad", + "type": "github" + } + }, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1658567952, + "narHash": "sha256-XZ4ETYAMU7XcpEeAFP3NOl9yDXNuZAen/aIJ84G+VgA=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "60bb43d405991c1378baf15a40b5811a53e32ffa", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, + "nixago": { + "inputs": { + "flake-utils": [ + "haskell-nix", + "tullia", + "std", + "flake-utils" + ], + "nixago-exts": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "nixpkgs": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1661824785, + "narHash": "sha256-/PnwdWoO/JugJZHtDUioQp3uRiWeXHUdgvoyNbXesz8=", + "owner": "nix-community", + "repo": "nixago", + "rev": "8c1f9e5f1578d4b2ea989f618588d62a335083c3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixago", + "type": "github" + } + }, + "nixpkgs": { + "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" + } + }, + "nixpkgs-2003": { + "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": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111": { + "locked": { + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2205": { + "locked": { + "lastModified": 1663981975, + "narHash": "sha256-TKaxWAVJR+a5JJauKZqibmaM5e/Pi5tBDx9s8fl/kSE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "309faedb8338d3ae8ad8f1043b3ccf48c9cc2970", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2211": { + "locked": { + "lastModified": 1669997163, + "narHash": "sha256-vhjC0kZMFoN6jzK0GR+tBzKi5KgBXgehadfidW8+Va4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6f87491a54d8d64d30af6663cb3bf5d2ee7db958", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-22.11-darwin", + "repo": "nixpkgs", + "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": 1663905476, + "narHash": "sha256-0CSwRKaYravh9v6qSlBpM0gNg0UhKT2lL7Yn6Zbx7UM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e14f9fb57315f0d4abde222364f19f88c77d2b79", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1653581809, + "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1654807842, + "narHash": "sha256-ADymZpr6LuTEBXcy6RtFHcUZdjKTBRTMYwu19WOx17E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fc909087cc3386955f21b4665731dbdaceefb1d8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1665087388, + "narHash": "sha256-FZFPuW9NWHJteATOf79rZfwfRn5fE0wi9kRzvGfDHPA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "95fda953f6db2e9496d2682c4fc7b82f959878f7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "old-ghc-nix": { + "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" + } + }, + "root": { + "inputs": { + "CHaP": "CHaP", + "flake-utils": [ + "haskell-nix", + "flake-utils" + ], + "haskell-nix": "haskell-nix", + "iohk-nix": "iohk-nix", + "nixpkgs": [ + "haskell-nix", + "nixpkgs-unstable" + ] + } + }, + "stackage": { + "flake": false, + "locked": { + "lastModified": 1675384838, + "narHash": "sha256-F1SaHbZmE6DAHT27j28+UKrLyFRE6V+x1P/R1HZmuvg=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "15d23950aec4a0cd4358a69d6cdfda2f031e444a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "std": { + "inputs": { + "blank": "blank", + "devshell": "devshell", + "dmerge": "dmerge", + "flake-utils": "flake-utils_3", + "makes": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "mdbook-kroki-preprocessor": "mdbook-kroki-preprocessor", + "microvm": [ + "haskell-nix", + "tullia", + "std", + "blank" + ], + "n2c": "n2c", + "nixago": "nixago", + "nixpkgs": "nixpkgs_4", + "yants": "yants" + }, + "locked": { + "lastModified": 1665513321, + "narHash": "sha256-D6Pacw9yf/HMs84KYuCxHXnNDL7v43gtcka5URagFqE=", + "owner": "divnix", + "repo": "std", + "rev": "94a90eedb9cfc115b12ae8f6622d9904788559e4", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "std", + "type": "github" + } + }, + "tullia": { + "inputs": { + "nix-nomad": "nix-nomad", + "nix2container": "nix2container", + "nixpkgs": [ + "haskell-nix", + "nixpkgs" + ], + "std": "std" + }, + "locked": { + "lastModified": 1668711738, + "narHash": "sha256-CBjky16o9pqsGE1bWu6nRlRajgSXMEk+yaFQLibqXcE=", + "owner": "input-output-hk", + "repo": "tullia", + "rev": "ead1f515c251f0e060060ef0e2356a51d3dfe4b0", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "tullia", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "yants": { + "inputs": { + "nixpkgs": [ + "haskell-nix", + "tullia", + "std", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660507851, + "narHash": "sha256-BKjq7JnVuUR/xDtcv6Vm9GYGKAblisXrAgybor9hT/s=", + "owner": "divnix", + "repo": "yants", + "rev": "0b895ca02a8fa72bad50b454cb3e7d8a66407c96", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "yants", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..41d06bf --- /dev/null +++ b/flake.nix @@ -0,0 +1,71 @@ +{ + inputs = { + nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; + haskell-nix.url = "github:input-output-hk/haskell.nix"; + flake-utils.follows = "haskell-nix/flake-utils"; + CHaP = { + url = "github:input-output-hk/cardano-haskell-packages?ref=repo"; + flake = false; + }; + iohk-nix = { + url = "github:input-output-hk/iohk-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, flake-utils, haskell-nix, CHaP, iohk-nix }: + + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + inherit (haskell-nix) config; + overlays = [ + haskell-nix.overlay + iohk-nix.overlays.crypto + ]; + }; + + inherit (pkgs) lib; + + project = pkgs.haskell-nix.cabalProject' { + src = ./.; + compiler-nix-name = "ghc8107"; + + inputMap = { + "https://input-output-hk.github.io/cardano-haskell-packages" = CHaP; + }; + + modules = [ + { + packages = { + # Broken due to haddock errors. Refer to https://github.com/input-output-hk/plutus/blob/master/nix/pkgs/haskell/haskell.nix + plutus-ledger.doHaddock = false; + plutus-use-cases.doHaddock = false; + + # See https://github.com/input-output-hk/iohk-nix/pull/488 + cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ]; + cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ]; + }; + } + ]; + + }; + + flake = project.flake { }; + + in + flake + ); + + nixConfig = { + extra-substituters = [ + "https://cache.iog.io" + "https://cache.zw3rk.com" + ]; + extra-trusted-public-keys = [ + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + "loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=" + ]; + }; +} diff --git a/nix/default.nix b/nix/default.nix deleted file mode 100644 index b2a5b30..0000000 --- a/nix/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ source-repo-override }: -let - # Pratically, the only needed dependency is the plutus repository. - sources = import ./sources.nix { inherit pkgs; }; - - # We're going to get everything from the main plutus repository. This ensures - # we're using the same version of multiple dependencies such as nipxkgs, - # haskell-nix, cabal-install, compiler-nix-name, etc. - plutus = import sources.plutus-apps {}; - pkgs = plutus.pkgs; - - haskell-nix = pkgs.haskell-nix; - - plutus-starter = import ./pkgs { - inherit pkgs haskell-nix sources plutus source-repo-override; - }; - -in -{ - inherit pkgs plutus-starter; -} diff --git a/nix/lib/ci.nix b/nix/lib/ci.nix deleted file mode 100644 index 80794a7..0000000 --- a/nix/lib/ci.nix +++ /dev/null @@ -1,201 +0,0 @@ -{ pkgs }: - -let - # Generic nixpkgs, use *only* for lib functions that are stable across versions - lib = pkgs.lib; -in -rec { - # Borrowed from https://github.com/cachix/ghcide-nix/pull/4/files#diff-70bfff902f4dec33e545cac10ee5844d - # Tweaked to use builtins.mapAttrs instead of needing the one from nixpkgs lib - /* - dimension: name -> attrs -> function -> attrs - where - function: keyText -> value -> attrsOf package - - WARNING: Attribute names must not contain periods ("."). - See https://github.com/NixOS/nix/issues/3088 - - NOTE: The dimension name will be picked up by agent and web ui soon. - - Specifies a dimension of the build matrix. For example - - dimension "Example" { - withP = { p = true; } - withoutP = { p = false; } - } (key: # either "withP" or "withoutP" - { p }: # either p = true or p = false - myProject p - ) - - evaluates roughly to - - { - withP = myProject true; - withoutP = myProject false; - } - - Use nested calls for multiple dimensions. - - Example: - - dimension "System" { - "x86_64-linux" = {}; - # ... - }: (system: {}: - - dimension "Nixpkgs release" ( - { - "nixpkgs-19_03".nixpkgs = someSource - } // optionalAttrs (system != "...") { - "nixpkgs-unstable".nixpkgs = someOtherSource - } - ) (_key: { nixpkgs }: - - myProject system nixpkgs - - ) - ) - - evaluates roughly to - - { - x86_64-linux.nixpkgs-19_03 = myProject "x86_64-linux" someSource; - x86_64-linux.nixpkgs-unstable = myProject "x86_64-linux" someOtherSource; - ... - } - - If you need to make references across attributes, you can do so by binding - the result. Wherever you write - - dimension "My dimension" {} (key: value: f1 key value) - - You can also write - - let - myDimension = dimension "My dimension" {} (key: value: f2 key value myDimension) - in - myDimension - - This example builds a single test runner to reuse across releases: - - let - overlay = - testRunnerPkgs: self: super: { - # ... - }; - myProject = - { nixpkgs, - pkgs ? import nixpkgs { overlays = [ overlay ]; }, - testRunnerPkgs ? pkgs - }: pkgs; - in - - let - latest = "nixpkgs-19_03"; - releases = - dimension "Nixpkgs release" - { - nixpkgs-18_09.nixpkgs = someSource - nixpkgs-19_03.nixpkgs = someOtherSource - } - (_key: { nixpkgs }: - - myProject { - inherit nixpkgs; - testRunnerPkgs = releases."${latest}"; - } - - ); - in releases; - - */ - dimension = name: attrs: f: - builtins.mapAttrs - (k: v: - let o = f k v; - in o // { recurseForDerivations = o.recurseForDerivations or true; } - ) - attrs - // { meta.dimension.name = name; }; - - /* - Takes an attribute set and returns all the paths to derivations within it, i.e. - derivationPaths { a = { b = ; }; c = ; } == [ "a.b" "c" ] - This can be used with 'attrByPath' or the 'constitutents' of an aggregate Hydra job. - */ - derivationPaths = - let - names = x: lib.filter (n: n != "recurseForDerivations" && n != "meta") (builtins.attrNames x); - go = nameSections: attrs: - builtins.concatMap - (n: - let - v = builtins.getAttr n attrs; - newNameSections = nameSections ++ [ n ]; - in - if pkgs.lib.isDerivation v - then [ (builtins.concatStringsSep "." newNameSections) ] - else if builtins.isAttrs v - then go newNameSections v - else [ ] - ) - (names attrs); - in - go [ ]; - - # Creates an aggregate job with the given name from every derivation in the attribute set. - derivationAggregate = name: attrs: pkgs.releaseTools.aggregate { - inherit name; - constituents = derivationPaths attrs; - }; - - # A filter for removing packages that aren't supported on the current platform - # according to 'meta.platforms'. - platformFilterGeneric = pkgs: system: - # This needs to use the correct nixpkgs version so all the systems line up - let - lib = pkgs.lib; - platform = lib.systems.elaborate { inherit system; }; - # Can't just default to [] for platforms, since no meta.platforms - # means "all platforms" not "no platforms" - in - drv: - if drv ? meta && drv.meta ? platforms then - lib.any (lib.meta.platformMatch platform) drv.meta.platforms - else true; - - # Hydra doesn't like these attributes hanging around in "jobsets": it thinks they're jobs! - stripAttrsForHydra = filterAttrsOnlyRecursive (n: _: n != "recurseForDerivations" && n != "dimension"); - - # Keep derivations and attrsets with 'recurseForDerivations'. This ensures that we match the - # derivations that Hercules will see, and prevents Hydra from trying to pick up all sorts of bad stuff - # (like attrsets that contain themselves!). - filterDerivations = filterAttrsOnlyRecursive (n: attrs: lib.isDerivation attrs || attrs.recurseForDerivations or false); - - # A version of 'filterAttrsRecursive' that doesn't recurse into derivations. This prevents us from going into an infinite - # loop with the 'out' attribute on derivations. - # TODO: Surely this shouldn't be necessary. I think normal 'filterAttrsRecursive' will effectively cause infinite loops - # if you keep derivations and your predicate forces the value of the attribute, as this then triggers a loop on the - # 'out' attribute. Weird. - filterAttrsOnlyRecursive = pred: set: - lib.listToAttrs ( - lib.concatMap - (name: - let v = set.${name}; in - if pred name v then [ - (lib.nameValuePair name ( - if builtins.isAttrs v && !lib.isDerivation v then filterAttrsOnlyRecursive pred v - else v - )) - ] else [ ] - ) - (builtins.attrNames set) - ); - - # Takes an array of systems and returns a `name: system` AttrSet - # filterSystems :: [ string ] -> AttrSet - filterSystems = systems: lib.filterAttrs (_: v: builtins.elem v systems) { - linux = "x86_64-linux"; - darwin = "x86_64-darwin"; - }; -} diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix deleted file mode 100644 index 3a6b9a7..0000000 --- a/nix/pkgs/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ pkgs -, sources -, plutus -, haskell-nix -, source-repo-override -}: -let - gitignore-nix = pkgs.callPackage plutus."gitignore.nix" { }; - - compiler-nix-name = plutus.plutus-apps.haskell.compiler-nix-name; - - haskell = pkgs.callPackage ./haskell { - inherit gitignore-nix sources haskell-nix source-repo-override; - inherit compiler-nix-name; # Use the same GHC version as plutus - inherit (pkgs) libsodium-vrf; - }; - - hlint = plutus.plutus-apps.hlint; - - cabal-install = plutus.plutus-apps.cabal-install; - - stylish-haskell = plutus.plutus-apps.stylish-haskell; - - haskell-language-server = plutus.plutus-apps.haskell-language-server; - - cardano-repo-tool = plutus.plutus-apps.cardano-repo-tool; -in -{ - inherit haskell hlint cabal-install stylish-haskell haskell-language-server cardano-repo-tool; -} diff --git a/nix/pkgs/haskell/default.nix b/nix/pkgs/haskell/default.nix deleted file mode 100644 index b8d2144..0000000 --- a/nix/pkgs/haskell/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib -, haskell-nix -, gitignore-nix -, sources -, compiler-nix-name -, libsodium-vrf -, source-repo-override -}: -let - # The Hackage index-state from cabal.project - index-state = - let - parseIndexState = rawCabalProject: - let - indexState = lib.lists.concatLists ( - lib.lists.filter (l: l != null) - (map (l: builtins.match "^index-state: *(.*)" l) - (lib.splitString "\n" rawCabalProject))); - in - lib.lists.head (indexState ++ [ null ]); - in - parseIndexState (builtins.readFile ../../../cabal.project); - - # The haskell project created by haskell-nix.cabalProject' - project = import ./haskell.nix { - inherit lib haskell-nix compiler-nix-name gitignore-nix libsodium-vrf source-repo-override; - }; - - # All the packages defined by our project, including dependencies - packages = project.hsPkgs; - - # Just the packages in the project - projectPackages = haskell-nix.haskellLib.selectProjectPackages packages; -in -rec { - inherit project projectPackages packages; -} diff --git a/nix/pkgs/haskell/haskell.nix b/nix/pkgs/haskell/haskell.nix deleted file mode 100644 index d1a46cd..0000000 --- a/nix/pkgs/haskell/haskell.nix +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################ -# Builds Haskell packages with Haskell.nix -############################################################################ -{ haskell-nix -, gitignore-nix -, compiler-nix-name -, lib -, libsodium-vrf -, source-repo-override -}: - -let - project = haskell-nix.project { - # 'cleanGit' cleans a source directory based on the files known by git - src = haskell-nix.haskellLib.cleanGit { - name = "plutus-starter"; - src = ../../../.; - }; - - inherit compiler-nix-name; - - # If using materialization, be sure to disable it when source-repo-override is set or it won't take effect. - - sha256map = import ./sha256map.nix; - - modules = [ - { - packages = { - # Broken due to haddock errors. Refer to https://github.com/input-output-hk/plutus/blob/master/nix/pkgs/haskell/haskell.nix - plutus-ledger.doHaddock = false; - plutus-use-cases.doHaddock = false; - - # See https://github.com/input-output-hk/iohk-nix/pull/488 - cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ libsodium-vrf ] ]; - cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ libsodium-vrf ] ]; - }; - } - ]; - - inherit source-repo-override; - }; -in - project diff --git a/nix/pkgs/haskell/sha256map.nix b/nix/pkgs/haskell/sha256map.nix deleted file mode 100644 index a78e0c4..0000000 --- a/nix/pkgs/haskell/sha256map.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - "https://github.com/input-output-hk/plutus-apps.git"."v0.1.0" = "1pcxv8l4rgwi0sa3ygq1ag1hyxj61rh03ij5mws78hax09p16vl4"; - "https://github.com/input-output-hk/ekg-forward"."297cd9db5074339a2fb2e5ae7d0780debb670c63" = "1zcwry3y5rmd9lgxy89wsb3k4kpffqji35dc7ghzbz603y1gy24g"; - "https://github.com/input-output-hk/cardano-addresses"."71006f9eb956b0004022e80aadd4ad50d837b621" = "11dl3fmq7ry5wdmz8kw07ji8yvrxnrsf7pgilw5q9mi4aqyvnaqk"; - "https://github.com/input-output-hk/cardano-base"."41545ba3ac6b3095966316a99883d678b5ab8da8" = "0icq9y3nnl42fz536da84414av36g37894qnyw4rk3qkalksqwir"; - "https://github.com/input-output-hk/cardano-config"."e9de7a2cf70796f6ff26eac9f9540184ded0e4e6" = "1wm1c99r5zvz22pdl8nhkp13falvqmj8dgkm8fxskwa9ydqz01ld"; - "https://github.com/input-output-hk/cardano-crypto"."f73079303f663e028288f9f4a9e08bcca39a923e" = "1n87i15x54s0cjkh3nsxs4r1x016cdw1fypwmr68936n3xxsjn6q"; - "https://github.com/input-output-hk/cardano-ledger"."1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5" = "0avzyiqq0m8njd41ck9kpn992yq676b1az9xs77977h7cf85y4wm"; - "https://github.com/input-output-hk/cardano-node"."2b1d18c6c7b7142d9eebfec34da48840ed4409b6" = "102pj525ysvj27h9nb8gidxm1cmwp8vpdyfnpwm1ywz3zkpk2mjp"; - "https://github.com/input-output-hk/cardano-prelude"."bb4ed71ba8e587f672d06edf9d2e376f4b055555" = "00h10l5mmiza9819p9v5q5749nb9pzgi20vpzpy1d34zmh6gf1cj"; - "https://github.com/input-output-hk/cardano-wallet"."f6d4db733c4e47ee11683c343b440552f59beff7" = "0gb3zyv3q5v5sd8r29s02yc0brwq5a01is9c0n528391n2r8g1yy"; - "https://github.com/input-output-hk/goblins"."cde90a2b27f79187ca8310b6549331e59595e7ba" = "17c88rbva3iw82yg9srlxjv2ia5wjb9cyqw44hik565f5v9svnyg"; - "https://github.com/input-output-hk/iohk-monitoring-framework"."46f994e216a1f8b36fe4669b47b2a7011b0e153c" = "1il8fx3misp3650ryj368b3x95ksz01zz3x0z9k00807j93d0ka0"; - "https://github.com/input-output-hk/ouroboros-network"."4fac197b6f0d2ff60dc3486c593b68dc00969fbf" = "1b43vbdsr9m3ry1kgag2p2ixpv54gw7a4vvmndxl6knqg8qbsb8b"; - "https://github.com/input-output-hk/plutus"."6d9ac7c2f89363d574dbc10be5c2db4b661c9a43" = "1678c7fgd7sn8wfd8bpv60wqnfla3vijyb9n6x6d2d2mfiri6p9c"; - "https://github.com/input-output-hk/purescript-bridge"."47a1f11825a0f9445e0f98792f79172efef66c00" = "0da1vn2l6iyfxcjk58qal1l4755v92zi6yppmjmqvxf1gacyf9px"; - "https://github.com/input-output-hk/servant-purescript"."44e7cacf109f84984cd99cd3faf185d161826963" = "10pb0yfp80jhb9ryn65a4rha2lxzsn2vlhcc6xphrrkf4x5lhzqc"; - "https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d" = "19wahfv726fa3mqajpqdqhnl9ica3xmf68i254q45iyjcpj1psqx"; - "https://github.com/Quid2/flat"."ee59880f47ab835dbd73bea0847dab7869fc20d8" = "1lrzknw765pz2j97nvv9ip3l1mcpf2zr4n56hwlz0rk7wq7ls4cm"; - "https://github.com/raduom/hysterical-screams"."4c523469e9efd3f0d10d17da3304923b7b0e0674" = "0w118v4vffrsjxfmwfv8qcn2qxmxpd1gxwcjnda91qz09jnpg0vp"; - "https://github.com/input-output-hk/quickcheck-dynamic"."c272906361471d684440f76c297e29ab760f6a1e" = "sha256-TioJQASNrQX6B3n2Cv43X2olyT67//CFQqcpvNW7N60="; -} diff --git a/nix/sources.json b/nix/sources.json deleted file mode 100644 index d46022d..0000000 --- a/nix/sources.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plutus-apps": { - "branch": "v0.1.0", - "description": "The Plutus Application Platform", - "homepage": "", - "owner": "input-output-hk", - "repo": "plutus-apps", - "rev": "v0.1.0", - "sha256": "1pcxv8l4rgwi0sa3ygq1ag1hyxj61rh03ij5mws78hax09p16vl4", - "type": "tarball", - "url": "https://github.com/input-output-hk/plutus-apps/archive/v0.1.0.tar.gz", - "url_template": "https://github.com///archive/.tar.gz" - } -} diff --git a/nix/sources.nix b/nix/sources.nix deleted file mode 100644 index 1938409..0000000 --- a/nix/sources.nix +++ /dev/null @@ -1,174 +0,0 @@ -# This file has been generated by Niv. - -let - - # - # The fetchers. fetch_ fetches specs of type . - # - - fetch_file = pkgs: name: spec: - let - name' = sanitizeName name + "-src"; - in - if spec.builtin or true then - builtins_fetchurl { inherit (spec) url sha256; name = name'; } - else - pkgs.fetchurl { inherit (spec) url sha256; name = name'; }; - - fetch_tarball = pkgs: name: spec: - let - name' = sanitizeName name + "-src"; - in - if spec.builtin or true then - builtins_fetchTarball { name = name'; inherit (spec) url sha256; } - else - pkgs.fetchzip { name = name'; inherit (spec) url sha256; }; - - fetch_git = name: spec: - let - ref = - if spec ? ref then spec.ref else - if spec ? branch then "refs/heads/${spec.branch}" else - if spec ? tag then "refs/tags/${spec.tag}" else - abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"; - in - builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; }; - - fetch_local = spec: spec.path; - - fetch_builtin-tarball = name: throw - ''[${name}] The niv type "builtin-tarball" is deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=tarball -a builtin=true''; - - fetch_builtin-url = name: throw - ''[${name}] The niv type "builtin-url" will soon be deprecated. You should instead use `builtin = true`. - $ niv modify ${name} -a type=file -a builtin=true''; - - # - # Various helpers - # - - # https://github.com/NixOS/nixpkgs/pull/83241/files#diff-c6f540a4f3bfa4b0e8b6bafd4cd54e8bR695 - sanitizeName = name: - ( - concatMapStrings (s: if builtins.isList s then "-" else s) - ( - builtins.split "[^[:alnum:]+._?=-]+" - ((x: builtins.elemAt (builtins.match "\\.*(.*)" x) 0) name) - ) - ); - - # The set of packages used when specs are fetched using non-builtins. - mkPkgs = sources: system: - let - sourcesNixpkgs = - import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) { inherit system; }; - hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; - hasThisAsNixpkgsPath = == ./.; - in - if builtins.hasAttr "nixpkgs" sources - then sourcesNixpkgs - else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then - import {} - else - abort - '' - Please specify either (through -I or NIX_PATH=nixpkgs=...) or - add a package called "nixpkgs" to your sources.json. - ''; - - # The actual fetching function. - fetch = pkgs: name: spec: - - if ! builtins.hasAttr "type" spec then - abort "ERROR: niv spec ${name} does not have a 'type' attribute" - else if spec.type == "file" then fetch_file pkgs name spec - else if spec.type == "tarball" then fetch_tarball pkgs name spec - else if spec.type == "git" then fetch_git name spec - else if spec.type == "local" then fetch_local spec - else if spec.type == "builtin-tarball" then fetch_builtin-tarball name - else if spec.type == "builtin-url" then fetch_builtin-url name - else - abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}"; - - # If the environment variable NIV_OVERRIDE_${name} is set, then use - # the path directly as opposed to the fetched source. - replace = name: drv: - let - saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name; - ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}"; - in - if ersatz == "" then drv else - # this turns the string into an actual Nix path (for both absolute and - # relative paths) - if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}"; - - # Ports of functions for older nix versions - - # a Nix version of mapAttrs if the built-in doesn't exist - mapAttrs = builtins.mapAttrs or ( - f: set: with builtins; - listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)) - ); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 - range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 - stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); - - # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 - stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); - concatMapStrings = f: list: concatStrings (map f list); - concatStrings = builtins.concatStringsSep ""; - - # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331 - optionalAttrs = cond: as: if cond then as else {}; - - # fetchTarball version that is compatible between all the versions of Nix - builtins_fetchTarball = { url, name ? null, sha256 }@attrs: - let - inherit (builtins) lessThan nixVersion fetchTarball; - in - if lessThan nixVersion "1.12" then - fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchTarball attrs; - - # fetchurl version that is compatible between all the versions of Nix - builtins_fetchurl = { url, name ? null, sha256 }@attrs: - let - inherit (builtins) lessThan nixVersion fetchurl; - in - if lessThan nixVersion "1.12" then - fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; })) - else - fetchurl attrs; - - # Create the final "sources" from the config - mkSources = config: - mapAttrs ( - name: spec: - if builtins.hasAttr "outPath" spec - then abort - "The values in sources.json should not have an 'outPath' attribute" - else - spec // { outPath = replace name (fetch config.pkgs name spec); } - ) config.sources; - - # The "config" used by the fetchers - mkConfig = - { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null - , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile) - , system ? builtins.currentSystem - , pkgs ? mkPkgs sources system - }: rec { - # The sources, i.e. the attribute set of spec name to spec - inherit sources; - - # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers - inherit pkgs; - }; - -in -mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } diff --git a/release.nix b/release.nix deleted file mode 100644 index f50b05a..0000000 --- a/release.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ plutus-apps ? null -}: - -# The content of this file was partially copied from the equivalent file in the plutus repository. -# It is used by IOHK's Hydra for CI (building the project, running the tests, etc.) -# -# Therefore, do not worry too much about the structure. -let - # If hydra passed us a plutus-apps checkout, we want to override the - # plutus-apps used by haskell.nix - source-repo-override = if plutus-apps == null then {} else { - # Overwrite the source-repository-package entry with this URL - "https://github.com/input-output-hk/plutus-apps.git" = orig: { - url = plutus-apps.uri; - ref = plutus-apps.rev; - # Nix needs the sha256 of the checked-out source, but hydra - # gives us the path itself, not its hash. This uses the - # exportReferencesGraph feature of Nix to introspect properties - # of a given store path (in this case, its sha256), creates - # a Nix expression containing that hash, and imports that Nix - # expression into the current evaluation to get the hash - sha256 = import (pkgs.stdenv.mkDerivation { - name = "plutus-apps-sha.nix"; - exportReferencesGraph.plutus-apps = plutus-apps; - __structuredAttrs = true; - PATH = pkgs.lib.makeBinPath [ pkgs.coreutils pkgs.jq ]; - builder = builtins.toFile "builder" '' - . .attrs.sh - jq '."plutus-apps"[0].narHash' < .attrs.json > "$(jq -r .outputs.out < .attrs.json)" - ''; - }); - # We assume the new version has the same subpackages we did - # originally. - inherit (orig) subdirs; - }; - }; - packages = import ./. { - inherit source-repo-override; - }; - - pkgs = packages.pkgs; - haskellNix = pkgs.haskell-nix; - - # Just the packages in the project - projectPackages = haskellNix.haskellLib.selectProjectPackages packages.project.hsPkgs; - - inherit (import ./nix/lib/ci.nix { inherit pkgs; }) dimension filterAttrsOnlyRecursive filterDerivations stripAttrsForHydra derivationAggregate; - - # Collects haskell derivations and builds an attrset: - # - # { library = { ... } - # , tests = { ... } - # , benchmarks = { ... } - # , exes = { ... } - # , checks = { ... } - # } - # Where each attribute contains an attribute set - # with all haskell components of that type - mkHaskellDimension = pkgs: haskellProjects: - let - # retrieve all checks from a Haskell package - collectChecks = _: ps: pkgs.haskell-nix.haskellLib.collectChecks' ps; - # retrieve all components of a Haskell package - collectComponents = type: ps: pkgs.haskell-nix.haskellLib.collectComponents' type ps; - # Given a component type and the retrieve function, retrieve components from haskell packages - select = type: selector: (selector type) haskellProjects; - # { component-type : retriever-fn } - attrs = { - "library" = collectComponents; - "tests" = collectComponents; - "benchmarks" = collectComponents; - "exes" = collectComponents; - "checks" = collectChecks; - }; - in - dimension "Haskell component" attrs select; - - ciJobsets = stripAttrsForHydra (filterDerivations { - shell = (import ./shell.nix { inherit source-repo-override; }); - - pureShell = (import ./shell.nix { pure = true; inherit source-repo-override; }); - - build = pkgs.recurseIntoAttrs (mkHaskellDimension pkgs projectPackages); - }); -in - ciJobsets // { required = derivationAggregate "required-plutus-starter" ciJobsets; } - diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 00c9cba..0000000 --- a/shell.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pure ? false, source-repo-override ? { } }: -let - packages = import ./. { inherit source-repo-override; }; - inherit (packages) pkgs plutus-starter project; - -in - project.shellFor { - withHoogle = false; - - nativeBuildInputs = with plutus-starter; [ - hlint - cabal-install - haskell-language-server - stylish-haskell - pkgs.niv - cardano-repo-tool - pkgs.ghcid - # HACK: This shouldn't need to be here. - pkgs.lzma.dev - ] ++ (pkgs.lib.optionals pure [ - pkgs.git - pkgs.cacert - pkgs.curl - pkgs.jq - ]); - } From 2e43abef687fda39e089b900e0fd564b01576c5a Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Fri, 3 Feb 2023 16:22:45 +0800 Subject: [PATCH 03/11] Add flake-compat --- default.nix | 10 ++++++++++ flake.lock | 23 ++++++++++++++++++++--- flake.nix | 6 +++++- shell.nix | 10 ++++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 default.nix create mode 100644 shell.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..2cccff2 --- /dev/null +++ b/default.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).defaultNix diff --git a/flake.lock b/flake.lock index bd5b4c5..6e280aa 100644 --- a/flake.lock +++ b/flake.lock @@ -174,6 +174,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1672831974, @@ -190,7 +206,7 @@ "type": "github" } }, - "flake-compat_2": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1650374568, @@ -325,7 +341,7 @@ "cabal-34": "cabal-34", "cabal-36": "cabal-36", "cardano-shell": "cardano-shell", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", @@ -515,7 +531,7 @@ }, "nix-nomad": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-utils": [ "haskell-nix", "tullia", @@ -795,6 +811,7 @@ "root": { "inputs": { "CHaP": "CHaP", + "flake-compat": "flake-compat", "flake-utils": [ "haskell-nix", "flake-utils" diff --git a/flake.nix b/flake.nix index 41d06bf..b2f2f81 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,13 @@ url = "github:input-output-hk/iohk-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; }; - outputs = { self, nixpkgs, flake-utils, haskell-nix, CHaP, iohk-nix }: + outputs = { self, nixpkgs, flake-utils, haskell-nix, CHaP, iohk-nix, ... }: flake-utils.lib.eachDefaultSystem (system: let diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6234bb4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).shellNix From 20fff8c435859503354e13bb8cfad7ba5556bfb8 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Tue, 7 Feb 2023 16:08:49 +0800 Subject: [PATCH 04/11] Add missing secp256k1 --- flake.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index b2f2f81..3fa79dc 100644 --- a/flake.nix +++ b/flake.nix @@ -47,9 +47,8 @@ plutus-ledger.doHaddock = false; plutus-use-cases.doHaddock = false; - # See https://github.com/input-output-hk/iohk-nix/pull/488 - cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ]; - cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ]; + cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf pkgs.secp256k1 ] ]; + cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf pkgs.secp256k1 ] ]; }; } ]; From 9a0747aaa26967ce929a67ca485647fcdd7c2058 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Wed, 8 Feb 2023 08:45:53 +0800 Subject: [PATCH 05/11] Restrict to x86_64 linux and darwin --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 3fa79dc..b501f01 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ outputs = { self, nixpkgs, flake-utils, haskell-nix, CHaP, iohk-nix, ... }: - flake-utils.lib.eachDefaultSystem (system: + flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system: let pkgs = import nixpkgs { inherit system; From 38c0f1c3662b49a0143a48fe1ad13074eb443d39 Mon Sep 17 00:00:00 2001 From: Andrea Bedini Date: Wed, 8 Feb 2023 13:56:22 +0800 Subject: [PATCH 06/11] Restore shell tools Note that more recent versions of hls and hlint do not work on GHC 8.10.7. --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index b501f01..d0e7a51 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,12 @@ "https://input-output-hk.github.io/cardano-haskell-packages" = CHaP; }; + shell.tools = { + cabal.version = "latest"; + hlint.version = "3.4.1"; + haskell-language-server.version = "1.8.0.0"; + }; + modules = [ { packages = { From 6972eab08e9dc543fe1b68085659cfe11e368427 Mon Sep 17 00:00:00 2001 From: Nicolas Biri Date: Wed, 8 Feb 2023 12:02:41 +0100 Subject: [PATCH 07/11] Fix the game example --- examples/src/Plutus/Contracts/Game.hs | 34 ++++++++++++++++----------- examples/test/Spec/Game.hs | 3 ++- pab/Main.hs | 1 - plutus-starter.cabal | 20 +--------------- 4 files changed, 23 insertions(+), 35 deletions(-) diff --git a/examples/src/Plutus/Contracts/Game.hs b/examples/src/Plutus/Contracts/Game.hs index 37041e6..e2303a7 100644 --- a/examples/src/Plutus/Contracts/Game.hs +++ b/examples/src/Plutus/Contracts/Game.hs @@ -39,16 +39,18 @@ module Plutus.Contracts.Game , correctGuessTrace ) where +import Cardano.Node.Emulator.Params (testnet) +import Control.Lens (_2, (^?)) import Control.Monad (void) import qualified Data.ByteString.Char8 as C import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (catMaybes) -import Plutus.V1.Ledger.Api (Address, ScriptContext, Validator, Value, Datum(Datum)) -import qualified Ledger +import Plutus.V2.Ledger.Api (ScriptContext, Validator, Value, Datum(Datum)) +import Ledger (CardanoAddress, DecoratedTxOut) import qualified Ledger.Ada as Ada import qualified Ledger.Constraints as Constraints -import Ledger.Tx (ChainIndexTxOut (..)) +import qualified Ledger import Playground.Contract import Plutus.Contract import Plutus.Contract.Trace as X @@ -57,7 +59,10 @@ import PlutusTx.Prelude hiding (pure, (<$>)) import qualified Prelude as Haskell import Plutus.Trace.Emulator (EmulatorTrace) import qualified Plutus.Trace.Emulator as Trace -import qualified Plutus.Script.Utils.V1.Typed.Scripts as Scripts +import qualified Plutus.Script.Utils.V2.Address as Address +import qualified Plutus.Script.Utils.V2.Typed.Scripts as Scripts +import qualified Plutus.Script.Utils.V1.Typed.Scripts as V1 +import qualified Ledger.Typed.Scripts as Script newtype HashedString = HashedString BuiltinByteString deriving newtype (PlutusTx.ToData, PlutusTx.FromData, PlutusTx.UnsafeFromData) @@ -80,7 +85,7 @@ gameInstance :: Scripts.TypedValidator Game gameInstance = Scripts.mkTypedValidator @Game $$(PlutusTx.compile [|| validateGuess ||]) $$(PlutusTx.compile [|| wrap ||]) where - wrap = Scripts.mkUntypedValidator @HashedString @ClearString + wrap = V1.mkUntypedValidator @ScriptContext @HashedString @ClearString -- create a data script for the guessing game by hashing the string -- and lifting the hash to its on-chain representation @@ -104,13 +109,13 @@ gameValidator :: Validator gameValidator = Scripts.validatorScript gameInstance -- | The address of the game (the hash of its validator script) -gameAddress :: Address -gameAddress = Ledger.scriptAddress gameValidator +gameAddress :: CardanoAddress +gameAddress = Address.mkValidatorCardanoAddress testnet $ Script.validatorScript gameInstance -- | Parameters for the "lock" endpoint data LockParams = LockParams - { secretWord :: Haskell.String - , amount :: Value + { secretWord :: !Haskell.String + , amount :: !Value } deriving stock (Haskell.Eq, Haskell.Show, Generic) deriving anyclass (FromJSON, ToJSON, ToSchema, ToArgument) @@ -126,7 +131,7 @@ newtype GuessParams = GuessParams lock :: AsContractError e => Promise () GameSchema e () lock = endpoint @"lock" @LockParams $ \(LockParams secret amt) -> do logInfo @Haskell.String $ "Pay " <> Haskell.show amt <> " to the script" - let tx = Constraints.mustPayToTheScript (hashString secret) amt + let tx = Constraints.mustPayToTheScriptWithDatumInTx (hashString secret) amt void (submitTxConstraints gameInstance tx) -- | The "guess" contract endpoint. See note [Contract endpoints] @@ -137,7 +142,7 @@ guess = endpoint @"guess" @GuessParams $ \(GuessParams theGuess) -> do utxos <- fundsAtAddressGeq gameAddress (Ada.lovelaceValueOf 1) let redeemer = clearString theGuess - tx = collectFromScript utxos redeemer + tx = Constraints.collectFromTheScript utxos redeemer -- Log a message saying if the secret word was correctly guessed let hashedSecretWord = findSecretWordValue utxos @@ -153,14 +158,15 @@ guess = endpoint @"guess" @GuessParams $ \(GuessParams theGuess) -> do void (submitTxConstraintsSpending gameInstance utxos tx) -- | Find the secret word in the Datum of the UTxOs -findSecretWordValue :: Map TxOutRef ChainIndexTxOut -> Maybe HashedString +-- | Find the secret word in the Datum of the UTxOs +findSecretWordValue :: Map TxOutRef DecoratedTxOut -> Maybe HashedString findSecretWordValue = listToMaybe . catMaybes . Map.elems . Map.map secretWordValue -- | Extract the secret word in the Datum of a given transaction output is possible -secretWordValue :: ChainIndexTxOut -> Maybe HashedString +secretWordValue :: DecoratedTxOut -> Maybe HashedString secretWordValue o = do - Datum d <- either (const Nothing) Just (_ciTxOutDatum o) + Datum d <- o ^? Ledger.decoratedTxOutDatum . _2 . Ledger.datumInDatumFromQuery PlutusTx.fromBuiltinData d game :: AsContractError e => Contract () GameSchema e () diff --git a/examples/test/Spec/Game.hs b/examples/test/Spec/Game.hs index c5a2092..39de531 100644 --- a/examples/test/Spec/Game.hs +++ b/examples/test/Spec/Game.hs @@ -37,9 +37,10 @@ tests = testGroup "game" $ void $ Trace.activateContractWallet w1 (lock @ContractError) , checkPredicate "'lock' endpoint submits a transaction" - (anyTx theContract t1) + (anyUnbalancedTx theContract t1) $ do hdl <- Trace.activateContractWallet w1 theContract + void $ Trace.waitNSlots 1 Trace.callEndpoint @"lock" hdl (LockParams "secret" (Ada.adaValueOf 10)) , checkPredicate "'guess' endpoint is available after locking funds" diff --git a/pab/Main.hs b/pab/Main.hs index a733c8a..c33e273 100644 --- a/pab/Main.hs +++ b/pab/Main.hs @@ -28,7 +28,6 @@ import qualified Plutus.PAB.Webserver.Server as PAB.Server import Plutus.Contracts.Game as Game import Plutus.Trace.Emulator.Extract (writeScriptsTo, ScriptsConfig (..), Command (..)) import Prettyprinter (Pretty (..), viaShow) -import Ledger.Index (ValidatorMode(..)) import qualified Wallet.Emulator.Wallet as Wallet main :: IO () diff --git a/plutus-starter.cabal b/plutus-starter.cabal index 0ead343..486d0f4 100644 --- a/plutus-starter.cabal +++ b/plutus-starter.cabal @@ -47,6 +47,7 @@ library base >= 4.9 && < 5, aeson -any, bytestring -any, + cardano-node-emulator -any, containers -any, freer-extras -any, playground-common -any, @@ -82,22 +83,3 @@ test-suite plutus-example-projects-test text -any, tasty-hedgehog >=0.2.0.0 - -executable plutus-starter-pab - import: lang - main-is: Main.hs - hs-source-dirs: pab - ghc-options: - -threaded - build-depends: - base >= 4.9 && < 5, - data-default -any, - plutus-contract -any, - plutus-pab -any, - plutus-starter -any, - aeson -any, - freer-simple -any, - prettyprinter -any, - freer-extras -any, - plutus-ledger -any, - openapi3 -any, From 158be957d6f5e6b0588c4325a8e78b3649b6185f Mon Sep 17 00:00:00 2001 From: Nicolas Biri Date: Wed, 8 Feb 2023 12:11:48 +0100 Subject: [PATCH 08/11] Fix contributing --- CONTRIBUTING.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56d6408..c3b62dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,9 +8,15 @@ - `nix/sources.json` - `nix/pkgs/haskell/sha256map.nix` - `cabal.project` - 3. Copy over most of https://github.com/input-output-hk/plutus-apps/blob/main/cabal.project into `cabal.project` - 4. Copy over the `sha256map` values from https://github.com/input-output-hk/plutus-apps/blob/main/nix/pkgs/haskell/sha256map.nix into `nix/pkgs/haskell/sha256map.nix` (but leave the first line that you just changed in step 2). To get the right hash value for `plutus-apps`, change one digit, then run `nix-shell`. You will get an error that shows the correct hash. - 5. It’s likely that the code for the guessing game needs to be changed; luckily, you can copy the source from https://github.com/input-output-hk/plutus-apps/blob/main/plutus-playground-server/usecases/Game.hs roughly, and it should work. + 3. Copy over most of https://github.com/input-output-hk/plutus-apps/blob/main/cabal.project into + `cabal.project`. + 4. Copy over the `sha256map` values from + https://github.com/input-output-hk/plutus-apps/blob/main/nix/pkgs/haskell/sha256map.nix into + `nix/pkgs/haskell/sha256map.nix` (but leave the first line that you just changed in step 2). + To get the right hash value for `plutus-apps`, change one digit, then run `nix develop`. + You will get an error that shows the correct hash. + 5. It’s likely that the code for the guessing game needs to be changed; + the example is not sync with plutus-apps anymore, so it has to be fixed locally. 6. Test the different parts: - VSCode * You need to make sure to rebuild the image From de5e53070e1a29f54bdfab5741f79df8844d6298 Mon Sep 17 00:00:00 2001 From: Nicolas Biri Date: Wed, 8 Feb 2023 15:55:20 +0100 Subject: [PATCH 09/11] Fix executable --- pab/Main.hs | 3 ++- plutus-starter.cabal | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/pab/Main.hs b/pab/Main.hs index c33e273..bf9e093 100644 --- a/pab/Main.hs +++ b/pab/Main.hs @@ -26,7 +26,8 @@ import Plutus.PAB.Simulator (SimulatorEffectHandlers) import qualified Plutus.PAB.Simulator as Simulator import qualified Plutus.PAB.Webserver.Server as PAB.Server import Plutus.Contracts.Game as Game -import Plutus.Trace.Emulator.Extract (writeScriptsTo, ScriptsConfig (..), Command (..)) +import Plutus.Trace.Emulator.Extract (writeScriptsTo, ScriptsConfig (..), Command (..), + ValidatorMode(FullyAppliedValidators)) import Prettyprinter (Pretty (..), viaShow) import qualified Wallet.Emulator.Wallet as Wallet diff --git a/plutus-starter.cabal b/plutus-starter.cabal index 486d0f4..1a4cac2 100644 --- a/plutus-starter.cabal +++ b/plutus-starter.cabal @@ -83,3 +83,22 @@ test-suite plutus-example-projects-test text -any, tasty-hedgehog >=0.2.0.0 + +executable plutus-starter-pab + import: lang + main-is: Main.hs + hs-source-dirs: pab + ghc-options: + -threaded + build-depends: + base >= 4.9 && < 5, + data-default -any, + plutus-contract -any, + plutus-pab -any, + plutus-starter -any, + aeson -any, + freer-simple -any, + prettyprinter -any, + freer-extras -any, + plutus-ledger -any, + openapi3 -any, From 344ec6bd43624591c7172e083b7dc7c4d65d48f7 Mon Sep 17 00:00:00 2001 From: Nicolas Biri Date: Thu, 9 Feb 2023 16:06:15 +0100 Subject: [PATCH 10/11] fix div-container version and doc --- .devcontainer/devcontainer.json | 2 +- CONTRIBUTING.md | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index def1401..c8524bd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Plutus Starter Project", - "image": "docker.io/inputoutput/plutus-starter-devcontainer:v0.1.0", + "image": "docker.io/inputoutput/plutus-starter-devcontainer:v1.0.0", "remoteUser": "plutus", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3b62dc..7e38f41 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,19 +5,12 @@ 1. Go to https://github.com/input-output-hk/plutus-apps/tags and take note of the latest `v.X.Y.Z` tag. 2. Update the tag and/or hash in the following files: - `.devcontainer/devcontainer.json` - - `nix/sources.json` - - `nix/pkgs/haskell/sha256map.nix` - `cabal.project` 3. Copy over most of https://github.com/input-output-hk/plutus-apps/blob/main/cabal.project into `cabal.project`. - 4. Copy over the `sha256map` values from - https://github.com/input-output-hk/plutus-apps/blob/main/nix/pkgs/haskell/sha256map.nix into - `nix/pkgs/haskell/sha256map.nix` (but leave the first line that you just changed in step 2). - To get the right hash value for `plutus-apps`, change one digit, then run `nix develop`. - You will get an error that shows the correct hash. - 5. It’s likely that the code for the guessing game needs to be changed; + 4. It’s likely that the code for the guessing game needs to be changed; the example is not sync with plutus-apps anymore, so it has to be fixed locally. - 6. Test the different parts: + 5. Test the different parts: - VSCode * You need to make sure to rebuild the image * Then, once in VSCode, do `cabal build` and `cabal test`, and then make sure HLS works From d077a79559bace5a6c79744ff01e90cae803b999 Mon Sep 17 00:00:00 2001 From: Nicolas Biri Date: Fri, 10 Feb 2023 11:00:03 +0100 Subject: [PATCH 11/11] change nixos cache settings in github actions --- .github/workflows/test.yml | 8 ++++---- .gitignore | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1bf635..6c16393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,8 +16,8 @@ jobs: with: nix_conf: | allowed-uris = https://github.com/NixOS/nixpkgs https://github.com/input-output-hk https://github.com/NixOS/nixpkgs-channels - trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/ + trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk= + substituters = https://iohk.cachix.org https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com - run: nix-build release.nix --restrict-eval -I . -A required --no-out-link guessing-game: @@ -31,6 +31,6 @@ jobs: with: nix_conf: | allowed-uris = https://github.com/NixOS/nixpkgs https://github.com/input-output-hk https://github.com/NixOS/nixpkgs-channels - trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/ + trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk= + substituters = https://iohk.cachix.org https://cache.nixos.org/ https://cache.iog.io https://cache.zw3rk.com - run: ./scripts/test diff --git a/.gitignore b/.gitignore index 9e5b284..78feaa4 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ cabal.project.local~ .ghc.environment.* result* .envrc +.direnv .vim scripts/wallet -status.json \ No newline at end of file +status.json